From 6e83fec5ca5286bd36b150e1b5660d0e71c3d270 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 23:22:18 +0530 Subject: [PATCH] fix: consider service item cost in the RM cost of the BOM (backport #43962) (#44111) fix: consider service item cost in the RM cost of the BOM (#43962) (cherry picked from commit c0ffaa444cc870f1751468cdad8928515bbf26d6) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 843528de706f..c3105b8e9eca 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -742,11 +742,8 @@ def calculate_rm_cost(self, save=False): base_total_rm_cost = 0 for d in self.get("items"): - if not d.is_stock_item and self.rm_cost_as_per == "Valuation Rate": - continue - old_rate = d.rate - if not self.bom_creator: + if not self.bom_creator and d.is_stock_item: d.rate = self.get_rm_rate( { "company": self.company,