Merge pull request #39835 from s-aga-r/FIX-9623

fix: create SBB for `transfer_qty` in SE
This commit is contained in:
s-aga-r 2024-02-12 18:18:46 +05:30 committed by GitHub
commit 1c2a7801b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1040,7 +1040,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(
@ -1050,7 +1050,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:
@ -1062,7 +1062,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,