diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 1a56116718d..7696c7952d1 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -621,6 +621,12 @@ class BOM(WebsiteGenerator): if d.set_cost_based_on_bom_qty: operating_cost = flt(d.cost_per_unit) * flt(self.quantity) base_operating_cost = flt(d.base_cost_per_unit) * flt(self.quantity) +<<<<<<< HEAD +======= + + self.operating_cost += flt(operating_cost) + self.base_operating_cost += flt(base_operating_cost) +>>>>>>> 2e2985e4f1 (fix: calculate operating cost based on BOM Quantity (#27464)) self.operating_cost += flt(operating_cost) self.base_operating_cost += flt(base_operating_cost) diff --git a/erpnext/manufacturing/doctype/bom/test_bom.py b/erpnext/manufacturing/doctype/bom/test_bom.py index 6425769cf38..77a3942d1e2 100644 --- a/erpnext/manufacturing/doctype/bom/test_bom.py +++ b/erpnext/manufacturing/doctype/bom/test_bom.py @@ -140,7 +140,11 @@ class TestBOM(FrappeTestCase): for op_row in bom.operations: self.assertAlmostEqual(op_row.cost_per_unit, op_row.operating_cost / 2) +<<<<<<< HEAD self.assertAlmostEqual(bom.operating_cost, op_cost / 2) +======= + self.assertAlmostEqual(bom.operating_cost, op_cost/2) +>>>>>>> 2e2985e4f1 (fix: calculate operating cost based on BOM Quantity (#27464)) bom.delete() def test_bom_cost_multi_uom_multi_currency_based_on_price_list(self): diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json index 6bd64594202..882823084c6 100644 --- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json +++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json @@ -11,7 +11,10 @@ "col_break1", "workstation", "time_in_mins", +<<<<<<< HEAD "fixed_time", +======= +>>>>>>> 2e2985e4f1 (fix: calculate operating cost based on BOM Quantity (#27464)) "costing_section", "hour_rate", "base_hour_rate", @@ -186,7 +189,11 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2022-08-22 01:18:33.547481", +======= + "modified": "2021-09-13 16:45:01.092868", +>>>>>>> 2e2985e4f1 (fix: calculate operating cost based on BOM Quantity (#27464)) "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Operation",