23.03.26
This commit is contained in:
@@ -1349,7 +1349,13 @@ class Line(metaclass=PoolMeta):
|
||||
cp = cp[0]
|
||||
price = Decimal(cp.get_last_price())
|
||||
logger.info("PRICE:%s",price)
|
||||
t.manual_price = round(t.payable_rule.compute_payable_quantity(grade) * price / Decimal(100) - t.penalty_rules.compute_penalty(grade),2)
|
||||
payable_price = Decimal(0)
|
||||
penalty_price = Decimal(0)
|
||||
if t.payable_rule:
|
||||
payable_price = t.payable_rule.compute_payable_quantity(grade) * price / Decimal(100)
|
||||
if t.penalty_rules:
|
||||
penalty_price = t.penalty_rules.compute_penalty(grade)
|
||||
t.manual_price = round(payable_price - penalty_price,2)
|
||||
t.currency = t.component.currency
|
||||
t.unit = self.unit
|
||||
Concentrate.save([t])
|
||||
|
||||
Reference in New Issue
Block a user