From 9f208bc0b73ffcf100ebafae512641a1eb20c3df Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 8 Apr 2021 12:35:22 -0400 Subject: [PATCH] only snap fx for forecast orders --- build/snap_fx.sql | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/snap_fx.sql b/build/snap_fx.sql index a8ce6ca..acd0c28 100644 --- a/build/snap_fx.sql +++ b/build/snap_fx.sql @@ -1,8 +1,9 @@ ------------update fx rates----------------------------------------------------------------- -UPDATE rlarp.osmf_dev SET r_rate = .7900 WHERE r_currency = 'CA' AND version = 'b22'; -UPDATE rlarp.osmf_dev SET r_rate = 1.0000 WHERE r_currency = 'US' AND version = 'b22'; -UPDATE rlarp.osmf_dev SET c_rate = .7900 WHERE c_currency = 'CA' AND version = 'b22'; -UPDATE rlarp.osmf_dev SET c_rate = 1.0000 WHERE c_currency = 'US' AND version = 'b22'; +---only apply fx to forecast orders---- +UPDATE rlarp.osmf_dev SET r_rate = .7900 WHERE r_currency = 'CA' AND odate >= '2021-04-08'; +UPDATE rlarp.osmf_dev SET r_rate = 1.0000 WHERE r_currency = 'US' AND odate >= '2021-04-08'; +UPDATE rlarp.osmf_dev SET c_rate = .7900 WHERE c_currency = 'CA' AND odate >= '2021-04-08'; +UPDATE rlarp.osmf_dev SET c_rate = 1.0000 WHERE c_currency = 'US' AND odate >= '2021-04-08'; --UPDATE rlarp.osm_pool SET r_rate = .7900 WHERE r_currency = 'CA' AND version = 'b22'; --UPDATE rlarp.osm_pool SET value_usd = value_loc * r_rate WHERE r_currency = 'CA' AND version = 'b22'; --UPDATE rlarp.osm_pool SET c_rate = .7900 WHERE c_currency = 'CA' AND version = 'b22';