fix: incorrect warehouse in the serial no selector for rejection (#43671)

This commit is contained in:
rohitwaghchaure
2024-10-15 15:43:29 +05:30
committed by GitHub
parent 0a7da4f1f6
commit 29ff682eca

View File

@@ -678,6 +678,10 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
}
get_warehouse() {
if (this.item?.is_rejected) {
return this.item.rejected_warehouse;
}
return this.item?.type_of_transaction === "Outward"
? this.item.warehouse || this.item.s_warehouse
: this.item.warehouse || this.item.t_warehouse;