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

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

(cherry picked from commit 29ff682eca)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-10-15 16:04:36 +05:30
committed by GitHub
parent afa0c13587
commit c490a66540

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;