From 92e6017a298bfb01679b5388f478a3055143a80e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 19:59:07 +0530 Subject: [PATCH] fix: create SBB for `transfer_qty` in SE (backport #39835) (#39863) fix: create SBB for `transfer_qty` in SE (cherry picked from commit d59caf08e6459c4f378c7bd6b032b84a899f8e20) Co-authored-by: s-aga-r --- erpnext/stock/doctype/stock_entry/stock_entry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 0a96c6b41d..81be3d1fc1 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1035,7 +1035,7 @@ class StockEntry(StockController): continue bundle_doc = None - if row.serial_and_batch_bundle and abs(row.qty) != abs( + if row.serial_and_batch_bundle and abs(row.transfer_qty) != abs( frappe.get_cached_value("Serial and Batch Bundle", row.serial_and_batch_bundle, "total_qty") ): bundle_doc = SerialBatchCreation( @@ -1045,7 +1045,7 @@ class StockEntry(StockController): "serial_and_batch_bundle": row.serial_and_batch_bundle, "type_of_transaction": "Outward", "ignore_serial_nos": already_picked_serial_nos, - "qty": row.qty * -1, + "qty": row.transfer_qty * -1, } ).update_serial_and_batch_entries() elif not row.serial_and_batch_bundle: @@ -1057,7 +1057,7 @@ class StockEntry(StockController): "posting_time": self.posting_time, "voucher_type": self.doctype, "voucher_detail_no": row.name, - "qty": row.qty * -1, + "qty": row.transfer_qty * -1, "ignore_serial_nos": already_picked_serial_nos, "type_of_transaction": "Outward", "company": self.company,