fix: minor changes added

This commit is contained in:
Vishal 2022-12-15 11:56:17 +05:30
parent bc1bdd58a7
commit 6b0b49ee3f

View File

@ -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)