fix: minor changes added

(cherry picked from commit ddc0127e05)
This commit is contained in:
Vishal
2022-12-15 11:56:17 +05:30
committed by Mergify
parent 0035ee2a74
commit 7fd8cef4d3

View File

@@ -614,7 +614,7 @@ class BOM(WebsiteGenerator):
"""Update workstation rate and calculates totals""" """Update workstation rate and calculates totals"""
self.operating_cost = 0 self.operating_cost = 0
self.base_operating_cost = 0 self.base_operating_cost = 0
if (self.get("with_operations")): if self.get("with_operations"):
for d in self.get("operations"): for d in self.get("operations"):
if d.workstation: if d.workstation:
self.update_rate_and_time(d, update_hour_rate) self.update_rate_and_time(d, update_hour_rate)
@@ -628,8 +628,10 @@ class BOM(WebsiteGenerator):
self.operating_cost += flt(operating_cost) self.operating_cost += flt(operating_cost)
self.base_operating_cost += flt(base_operating_cost) self.base_operating_cost += flt(base_operating_cost)
elif(self.get("fg_based_operating_cost")): elif self.get("fg_based_operating_cost"):
total_operating_cost = flt(self.get("quantity")) * flt(self.get("operating_cost_per_bom_quantity")) total_operating_cost = flt(self.get("quantity")) * flt(
self.get("operating_cost_per_bom_quantity")
)
self.operating_cost = total_operating_cost self.operating_cost = total_operating_cost
self.base_operating_cost = flt(total_operating_cost * self.conversion_rate, 2) self.base_operating_cost = flt(total_operating_cost * self.conversion_rate, 2)