From 90593b70c2add23ce1b1ec733d9d6c05efc9821c Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Sun, 10 May 2026 21:56:47 +0200 Subject: [PATCH] Lost Management Mark as finished --- modules/purchase_trade/lot.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/purchase_trade/lot.py b/modules/purchase_trade/lot.py index e2aa4c3..964786a 100755 --- a/modules/purchase_trade/lot.py +++ b/modules/purchase_trade/lot.py @@ -1323,14 +1323,14 @@ class LotQt( #wh &= (((lqt.create_date >= asof) & ((lqt.create_date-datetime.timedelta(1)) <= todate))) if ps == 'P': wh &= (lqt.lot_p != None) - if not finished: - wh &= (pl.finished == False) elif ps == 'S': wh &= (lqt.lot_s != None) - if not finished: - wh &= (sl.finished == False) - if purchase: - wh &= (pu.id == purchase) + if not finished: + wh &= ( + ((lqt.lot_p == None) | (pl.finished == False)) + & ((lqt.lot_s == None) | (sl.finished == False))) + if purchase: + wh &= (pu.id == purchase) if sale: wh &= (sa.id == sale) if state != 'all':