fix: set `received_qty` before_validate SCR
diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py
index bce5360..c7f592b 100644
--- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py
+++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py
@@ -58,6 +58,7 @@
def before_validate(self):
super(SubcontractingReceipt, self).before_validate()
self.set_items_bom()
+ self.set_received_qty()
self.set_items_cost_center()
self.set_items_expense_account()
@@ -212,6 +213,10 @@
"bom",
)
+ def set_received_qty(self):
+ for item in self.items:
+ item.received_qty = flt(item.qty) + flt(item.rejected_qty)
+
def set_items_cost_center(self):
if self.company:
cost_center = frappe.get_cached_value("Company", self.company, "cost_center")