diff options
| -rw-r--r-- | collect_fulfillment.ktr | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/collect_fulfillment.ktr b/collect_fulfillment.ktr index 1956379..9896b66 100644 --- a/collect_fulfillment.ktr +++ b/collect_fulfillment.ktr @@ -1091,17 +1091,7 @@ order by posm.sale_line_id, sml.product_id</sql> <schema_name/> </partitioning> <connection>erp indoteknik production (localhost)</connection> - <sql>--select sm.sale_line_id as sale_order_line_id, sml.product_id, sum(sml.product_uom_qty) as reserved_stock_qty ---from stock_move_line sml ---join stock_move sm on sm.id = sml.move_id ---join stock_picking sp on sp.id = sm.picking_id ---where 1=1 ---and sp.state not in ('cancel') ---and sm.sale_line_id is not null ---and sm.write_date >= (now() - '180 days'::interval) ---group by sm.sale_line_id, sml.product_id ---order by sm.sale_line_id, sml.product_id -select sm.sale_line_id as sale_order_line_id, sml.product_id, sum(sml.product_uom_qty) as reserved_stock_qty + <sql>select sm.sale_line_id as sale_order_line_id, sml.product_id, sum(sml.product_uom_qty) as reserved_stock_qty from stock_move_line sml join stock_move sm on sm.id = sml.move_id join stock_picking sp on sp.id = sm.picking_id @@ -1110,8 +1100,8 @@ and sp.state not in ('cancel') and sm.sale_line_id is not null and sm.write_date >= (now() - '180 days'::interval) and (sp.name like '%BU/PICK%' or sp.name like '%BU/OUT%') -group by sm.sale_line_id, sml.product_id -order by sm.sale_line_id, sml.product_id</sql> +group by sm.sale_line_id,sml.product_id +order by sm.sale_line_id,sml.product_id</sql> <limit>0</limit> <lookup/> <execute_each_row>N</execute_each_row> |
