diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2025-03-03 14:55:07 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2025-03-03 14:55:07 +0700 |
| commit | 344f9c1ddec0adad5dfba29c442d7a2e5f66836b (patch) | |
| tree | 2f5da1eb07e3593a1eed9bd8fed4dc7268b44def | |
| parent | 09d200d4332ba3933350e8ff90bac3e51dbe1b15 (diff) | |
forget to handle partial available qty in bug reserved
| -rw-r--r-- | bug_fix_reserved_stock.ktr | 5 |
1 files 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 @@ <schema_name/> </partitioning> <connection>erp indoteknik production (localhost)</connection> - <sql>select sm.product_id, sum(sm.product_uom_qty) as qty_reserved_must + <sql>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 |
