From ed11b23f797441cd576ae025ce5fc621bc35a250 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Sun, 22 Mar 2026 20:53:42 +0100 Subject: [PATCH] 22.03.26 --- modules/purchase_trade/purchase.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/purchase_trade/purchase.py b/modules/purchase_trade/purchase.py index 6633e65..5a874bf 100755 --- a/modules/purchase_trade/purchase.py +++ b/modules/purchase_trade/purchase.py @@ -1438,14 +1438,18 @@ class Line(metaclass=PoolMeta): p.price_component = pc.id p.quantity = round(Decimal(pc.quota),5) price = round(Decimal(self.getnearprice(pl,d,'price')),4) + logger.info("PL:%s",pl) + logger.info("PRICE:%s",price) p.settl_price = price if price > 0: cumul_qt += pc.quota p.fixed_qt = round(Decimal(cumul_qt),5) 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() if p.fixed_qt_price == 0: 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) if p.unfixed_qt < 0.001: p.unfixed_qt = Decimal(0)