fix: batch validation for subcontracting receipt

(cherry picked from commit b8d201658a)
This commit is contained in:
Rohit Waghchaure
2026-03-23 16:29:47 +05:30
committed by Mergify
parent cd1dfeeab3
commit 604739d1dc

View File

@@ -1087,6 +1087,12 @@ class SubcontractingController(StockController):
if self.doctype not in ["Purchase Invoice", "Purchase Receipt", "Subcontracting Receipt"]:
return
if (
frappe.db.get_single_value("Buying Settings", "backflush_raw_materials_of_subcontract_based_on")
== "BOM"
):
return
for row in self.get(self.raw_material_table):
key = (row.rm_item_code, row.main_item_code, row.get(self.subcontract_data.order_field))
if not self.__transferred_items or not self.__transferred_items.get(key):