22.03.26
This commit is contained in:
@@ -1438,14 +1438,18 @@ class Line(metaclass=PoolMeta):
|
|||||||
p.price_component = pc.id
|
p.price_component = pc.id
|
||||||
p.quantity = round(Decimal(pc.quota),5)
|
p.quantity = round(Decimal(pc.quota),5)
|
||||||
price = round(Decimal(self.getnearprice(pl,d,'price')),4)
|
price = round(Decimal(self.getnearprice(pl,d,'price')),4)
|
||||||
|
logger.info("PL:%s",pl)
|
||||||
|
logger.info("PRICE:%s",price)
|
||||||
p.settl_price = price
|
p.settl_price = price
|
||||||
if price > 0:
|
if price > 0:
|
||||||
cumul_qt += pc.quota
|
cumul_qt += pc.quota
|
||||||
p.fixed_qt = round(Decimal(cumul_qt),5)
|
p.fixed_qt = round(Decimal(cumul_qt),5)
|
||||||
p.fixed_qt_price = round(Decimal(self.getnearprice(pl,d,'avg')),4)
|
p.fixed_qt_price = round(Decimal(self.getnearprice(pl,d,'avg')),4)
|
||||||
|
logger.info("PRICE_AVG:%s",p.fixed_qt_price)
|
||||||
#p.fixed_qt_price = p.get_fixed_price()
|
#p.fixed_qt_price = p.get_fixed_price()
|
||||||
if p.fixed_qt_price == 0:
|
if p.fixed_qt_price == 0:
|
||||||
p.fixed_qt_price = round(Decimal(self.getnearprice(pl,d,'avg_minus_1')),4)
|
p.fixed_qt_price = round(Decimal(self.getnearprice(pl,d,'avg_minus_1')),4)
|
||||||
|
logger.info("PRICE_AVG_MIN:%s",p.fixed_qt_price)
|
||||||
p.unfixed_qt = round(Decimal(self.quantity_theorical) - Decimal(cumul_qt),5)
|
p.unfixed_qt = round(Decimal(self.quantity_theorical) - Decimal(cumul_qt),5)
|
||||||
if p.unfixed_qt < 0.001:
|
if p.unfixed_qt < 0.001:
|
||||||
p.unfixed_qt = Decimal(0)
|
p.unfixed_qt = Decimal(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user