From d59caf08e6459c4f378c7bd6b032b84a899f8e20 Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Fri, 9 Feb 2024 19:11:08 +0530 Subject: [PATCH] fix: create SBB for `transfer_qty` in SE --- 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 10e352257904..4c1de72f9824 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -989,7 +989,7 @@ def make_serial_and_batch_bundle_for_outward(self): 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( @@ -999,7 +999,7 @@ def make_serial_and_batch_bundle_for_outward(self): "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: @@ -1011,7 +1011,7 @@ def make_serial_and_batch_bundle_for_outward(self): "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,