This commit is contained in:
2026-02-14 08:32:38 +01:00
parent 7d99f56fa5
commit 0be0194ab5
2 changed files with 3 additions and 0 deletions

View File

@@ -528,6 +528,7 @@ class Lot(ModelSQL, ModelView):
lqh = LotQtHist()
lqh.quantity_type = qt_type
lqh.quantity = net
logger.info("ADD_QUANTITY_TO_HIST:%s",gross)
lqh.gross_quantity = gross
lqh.lot = self
return lqh
@@ -544,6 +545,7 @@ class Lot(ModelSQL, ModelView):
if existing:
hist = existing[0]
hist.quantity = net
logger.info("SET_CURRENT_HIST:%s",gross)
hist.gross_quantity = gross
else:
lot_hist.append(self.add_quantity_to_hist(net, gross, lqtt[0]))

View File

@@ -630,6 +630,7 @@ class Line(metaclass=PoolMeta):
lqh = LotQtHist()
lqh.quantity_type = lqtt[0]
lqh.quantity = lot.lot_quantity
logger.info("PURCHASE_VALIDATE:%s",lot.lot_quantity)
lqh.gross_quantity = lot.lot_quantity
lot.lot_hist = [lqh]
if line.quantity > 0: