summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2025-04-15 10:36:40 +0700
committerstephanchrst <stephanchrst@gmail.com>2025-04-15 10:36:40 +0700
commit31d6cd36d3ac0ba91146c65f88e1e355980d476a (patch)
treeb91a5a003e39b4184fbbdf9b210b7589dfdd33f8
parentda95f2554e33c133a154765057a75e03de9df75a (diff)
bf
-rw-r--r--collect_fulfillment.ktr16
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>