From 344f9c1ddec0adad5dfba29c442d7a2e5f66836b Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 3 Mar 2025 14:55:07 +0700 Subject: forget to handle partial available qty in bug reserved --- bug_fix_reserved_stock.ktr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bug_fix_reserved_stock.ktr b/bug_fix_reserved_stock.ktr index 7a333a8..e2aa677 100644 --- a/bug_fix_reserved_stock.ktr +++ b/bug_fix_reserved_stock.ktr @@ -719,10 +719,11 @@ erp indoteknik production (localhost) - select sm.product_id, sum(sm.product_uom_qty) as qty_reserved_must + select sm.product_id, sum(sml.product_uom_qty) as qty_reserved_must from stock_move sm +join stock_move_line sml on sml.move_id = sm.id where 1=1 -and sm.state = 'assigned' +and sm.state in ('assigned', 'partially_available') and sm.location_id = 57 and sm.product_id in( select sq.product_id -- cgit v1.2.3