minor fix

This commit is contained in:
wilsongomez 2022-08-31 14:55:08 -05:00
parent bbc92d2e16
commit 96aa1c4cae
1 changed files with 2 additions and 2 deletions

View File

@ -91,11 +91,11 @@ class Production(metaclass=PoolMeta):
return new_cost_price
def get_perfomance(self):
res = 0
res = Decimal(0)
origin = sum(p.quantity for p in self.bom.outputs )
result = sum(p.quantity for p in self.outputs)
if result != 0 and origin != 0:
res = result/origin
res = Decimal(str(round(result/origin), 2))
return res
def update_product_cost(self, product):