summaryrefslogtreecommitdiff
path: root/calculate_margin_invoice_v2.ktr
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-10-09 11:32:11 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-10-09 11:32:11 +0700
commit3d45a7f35995f2ec26f11e33de9f12a35870dfd6 (patch)
tree790c812662fdb0828e5d8d4f462f1e6bf229f5aa /calculate_margin_invoice_v2.ktr
parent4e65c357791c7778e03758b1ce42409ee6dc73bc (diff)
add where condition in calculate margin invoice v2
Diffstat (limited to 'calculate_margin_invoice_v2.ktr')
-rw-r--r--calculate_margin_invoice_v2.ktr8
1 files changed, 5 insertions, 3 deletions
diff --git a/calculate_margin_invoice_v2.ktr b/calculate_margin_invoice_v2.ktr
index 83afda0..f145e2b 100644
--- a/calculate_margin_invoice_v2.ktr
+++ b/calculate_margin_invoice_v2.ktr
@@ -1166,7 +1166,8 @@ left join res_partner rp3 on rp3.id = tsol.vendor_id
where aml.account_id in (466)
and am.state = 'posted'
and tso.state in ('sale', 'done')
-and aml.date >= '2024-06-01'
+--and aml.date >= '2024-06-01'
+and aml.write_date >= (now() - '3 days'::interval)
order by tsol.id</sql>
<limit>0</limit>
<lookup/>
@@ -1623,7 +1624,7 @@ order by tsol.id</sql>
</remotesteps>
<GUI>
<xloc>368</xloc>
- <yloc>128</yloc>
+ <yloc>112</yloc>
<draw>Y</draw>
</GUI>
</step>
@@ -1658,7 +1659,8 @@ left join res_partner rp3 on rp3.id = tsol.vendor_id
where aml.account_id in (462)
and am.state = 'posted'
and tso.state in ('sale', 'done')
-and aml.date >= '2024-06-01'
+--and aml.date >= '2024-06-01'
+and aml.write_date >= (now() - '3 days'::interval)
order by tsol.id</sql>
<limit>0</limit>
<lookup/>