diff --git a/production.py b/production.py index a6f693d..50b24d7 100644 --- a/production.py +++ b/production.py @@ -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):