Merge pull request #39335 from s-aga-r/FIX-8359

fix: SBB Total Qty validation for SE
This commit is contained in:
rohitwaghchaure 2024-01-12 20:59:46 +05:30 committed by GitHub
commit 402a1b91f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -395,11 +395,7 @@ class StockController(AccountsController):
}
for row in self.get(table_name):
for field in [
"serial_and_batch_bundle",
"current_serial_and_batch_bundle",
"rejected_serial_and_batch_bundle",
]:
for field in QTY_FIELD.keys():
if row.get(field):
frappe.get_doc("Serial and Batch Bundle", row.get(field)).set_serial_and_batch_values(
self, row, qty_field=QTY_FIELD[field]

View File

@ -490,8 +490,10 @@ class SerialandBatchBundle(Document):
qty_field = "qty"
precision = row.precision
if row.get("doctype") in ["Subcontracting Receipt Supplied Item"]:
if row.get("doctype") == "Subcontracting Receipt Supplied Item":
qty_field = "consumed_qty"
elif row.get("doctype") == "Stock Entry Detail":
qty_field = "transfer_qty"
qty = row.get(qty_field)
if qty_field == "qty" and row.get("stock_qty"):