diff options
| -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 |
