fix: SBB Total Qty validation for SE
(cherry picked from commit c20241fcb5d7269c08c38f51c92bf73289650708)
This commit is contained in:
parent
049864e7a2
commit
ca18853785
@ -387,11 +387,7 @@ class StockController(AccountsController):
|
|||||||
}
|
}
|
||||||
|
|
||||||
for row in self.get(table_name):
|
for row in self.get(table_name):
|
||||||
for field in [
|
for field in QTY_FIELD.keys():
|
||||||
"serial_and_batch_bundle",
|
|
||||||
"current_serial_and_batch_bundle",
|
|
||||||
"rejected_serial_and_batch_bundle",
|
|
||||||
]:
|
|
||||||
if row.get(field):
|
if row.get(field):
|
||||||
frappe.get_doc("Serial and Batch Bundle", row.get(field)).set_serial_and_batch_values(
|
frappe.get_doc("Serial and Batch Bundle", row.get(field)).set_serial_and_batch_values(
|
||||||
self, row, qty_field=QTY_FIELD[field]
|
self, row, qty_field=QTY_FIELD[field]
|
||||||
|
@ -490,8 +490,10 @@ class SerialandBatchBundle(Document):
|
|||||||
qty_field = "qty"
|
qty_field = "qty"
|
||||||
|
|
||||||
precision = row.precision
|
precision = row.precision
|
||||||
if row.get("doctype") in ["Subcontracting Receipt Supplied Item"]:
|
if row.get("doctype") == "Subcontracting Receipt Supplied Item":
|
||||||
qty_field = "consumed_qty"
|
qty_field = "consumed_qty"
|
||||||
|
elif row.get("doctype") == "Stock Entry Detail":
|
||||||
|
qty_field = "transfer_qty"
|
||||||
|
|
||||||
qty = row.get(qty_field)
|
qty = row.get(qty_field)
|
||||||
if qty_field == "qty" and row.get("stock_qty"):
|
if qty_field == "qty" and row.get("stock_qty"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user