diff --git a/modules/purchase_trade/lot.py b/modules/purchase_trade/lot.py index b818cea..72a0634 100755 --- a/modules/purchase_trade/lot.py +++ b/modules/purchase_trade/lot.py @@ -1294,6 +1294,7 @@ class LotQt( wh &= (sa.party == client) if not finished: wh &= (pl.finished == False) + wh &= (sl.finished == False) AvQt = Case(((lqt.lot_p>0) & (lqt.lot_s>0), 0),else_=Case((lqt.lot_p>0,lqt.lot_quantity),else_=-lqt.lot_quantity)) MaQt = Case(((lqt.lot_p>0) & (lqt.lot_s>0), lqt.lot_quantity),else_=0)