mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-02 21:18:27 +00:00
Merge pull request #53707 from frappe/mergify/bp/version-16-hotfix/pr-53705
fix: batch validation for subcontracting receipt (backport #53705)
This commit is contained in:
@@ -1087,6 +1087,12 @@ class SubcontractingController(StockController):
|
|||||||
if self.doctype not in ["Purchase Invoice", "Purchase Receipt", "Subcontracting Receipt"]:
|
if self.doctype not in ["Purchase Invoice", "Purchase Receipt", "Subcontracting Receipt"]:
|
||||||
return
|
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):
|
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))
|
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):
|
if not self.__transferred_items or not self.__transferred_items.get(key):
|
||||||
|
|||||||
Reference in New Issue
Block a user