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 <sagarsharma.s312@gmail.com>
This commit is contained in:
mergify[bot] 2024-02-12 19:59:07 +05:30 committed by GitHub
parent 10f17dfcc8
commit 92e6017a29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,