minor fix
This commit is contained in:
parent
4eaf0e8b85
commit
8dcd0c885e
|
@ -92,10 +92,11 @@ class Production(metaclass=PoolMeta):
|
|||
|
||||
def get_perfomance(self, name=None):
|
||||
res = Decimal(0)
|
||||
origin = sum(p.quantity for p in self.bom.outputs ) * self.quantity
|
||||
result = sum(p.quantity for p in self.outputs)
|
||||
if result != 0 and origin != 0:
|
||||
res = Decimal(str(round(result*100/origin, 2)))
|
||||
if self.bom:
|
||||
origin = sum(p.quantity for p in self.bom.outputs ) * self.quantity
|
||||
result = sum(p.quantity for p in self.outputs)
|
||||
if result != 0 and origin != 0:
|
||||
res = Decimal(str(round(result*100/origin, 2)))
|
||||
return res
|
||||
|
||||
def update_product_cost(self, product):
|
||||
|
|
Loading…
Reference in New Issue