From 29ff682ecaddad9450a735e02f7a631f555b145e Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 15 Oct 2024 15:43:29 +0530 Subject: [PATCH] fix: incorrect warehouse in the serial no selector for rejection (#43671) --- erpnext/public/js/utils/serial_no_batch_selector.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 1045965e43d..8329e5c9d55 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -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;