summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-06-10 16:30:19 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-06-10 16:30:19 +0700
commit8881864d8489c1411ae6fa785690f64d31787aba (patch)
tree800d742c004327a8585f3d798306157e51b98c49
parent609b3df88f57144c6943d76ed92065381af0f29c (diff)
add where condition
-rw-r--r--import_link_po_to_inv.ktr8
1 files changed, 6 insertions, 2 deletions
diff --git a/import_link_po_to_inv.ktr b/import_link_po_to_inv.ktr
index f4c5218..b45ef83 100644
--- a/import_link_po_to_inv.ktr
+++ b/import_link_po_to_inv.ktr
@@ -561,7 +561,9 @@
<schema_name/>
</partitioning>
<connection>erp indoteknik production (localhost)</connection>
- <sql>select * from account_move_purchase_order_rel</sql>
+ <sql>select * from account_move_purchase_order_rel r
+join purchase_order po on po.id = r.purchase_order_id
+where po.write_date >= (now() - '3 days'::interval)</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
@@ -643,7 +645,9 @@
<schema_name/>
</partitioning>
<connection>erp indoteknik production (localhost)</connection>
- <sql>select * from purchase_order_stock_picking_rel</sql>
+ <sql>select * from purchase_order_stock_picking_rel
+join purchase_order po on po.id = r.purchase_order_id
+where po.write_date >= (now() - '3 days'::interval)</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>