From ddc0127e05f920c48503ee8eecba194be920f861 Mon Sep 17 00:00:00 2001 From: Vishal Date: Thu, 15 Dec 2022 11:56:17 +0530 Subject: [PATCH] fix: minor changes added --- erpnext/manufacturing/doctype/bom/bom.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 7048d131af..8ab79e68be 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -614,7 +614,7 @@ class BOM(WebsiteGenerator): """Update workstation rate and calculates totals""" self.operating_cost = 0 self.base_operating_cost = 0 - if (self.get("with_operations")): + if self.get("with_operations"): for d in self.get("operations"): if d.workstation: self.update_rate_and_time(d, update_hour_rate) @@ -628,8 +628,10 @@ class BOM(WebsiteGenerator): self.operating_cost += flt(operating_cost) self.base_operating_cost += flt(base_operating_cost) - elif(self.get("fg_based_operating_cost")): - total_operating_cost = flt(self.get("quantity")) * flt(self.get("operating_cost_per_bom_quantity")) + elif self.get("fg_based_operating_cost"): + total_operating_cost = flt(self.get("quantity")) * flt( + self.get("operating_cost_per_bom_quantity") + ) self.operating_cost = total_operating_cost self.base_operating_cost = flt(total_operating_cost * self.conversion_rate, 2)