fix: zero rm-cost in SCR

(cherry picked from commit f70d757b82)
This commit is contained in:
s-aga-r
2023-01-14 21:08:52 +05:30
committed by Mergify
parent 5631cbba6a
commit 2dfbc6e4eb

View File

@@ -63,6 +63,11 @@ class SubcontractingReceipt(SubcontractingController):
self.set_items_expense_account()
def validate(self):
if (
frappe.db.get_single_value("Buying Settings", "backflush_raw_materials_of_subcontract_based_on")
== "BOM"
):
self.supplied_items = []
super(SubcontractingReceipt, self).validate()
self.set_missing_values()
self.validate_posting_time()