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):
|
def get_perfomance(self, name=None):
|
||||||
res = Decimal(0)
|
res = Decimal(0)
|
||||||
origin = sum(p.quantity for p in self.bom.outputs ) * self.quantity
|
if self.bom:
|
||||||
result = sum(p.quantity for p in self.outputs)
|
origin = sum(p.quantity for p in self.bom.outputs ) * self.quantity
|
||||||
if result != 0 and origin != 0:
|
result = sum(p.quantity for p in self.outputs)
|
||||||
res = Decimal(str(round(result*100/origin, 2)))
|
if result != 0 and origin != 0:
|
||||||
|
res = Decimal(str(round(result*100/origin, 2)))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def update_product_cost(self, product):
|
def update_product_cost(self, product):
|
||||||
|
|
Loading…
Reference in New Issue