From 5c000c02fca439e6cec5f373712edc1af5af713f Mon Sep 17 00:00:00 2001 From: CIEF ACC1 Date: Mon, 29 Jan 2024 09:53:16 +0000 Subject: [PATCH 1/2] Fix total_value_rm formula --- models/marts/warehouse/fct_exchange__transaction_costs.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/marts/warehouse/fct_exchange__transaction_costs.sql b/models/marts/warehouse/fct_exchange__transaction_costs.sql index 62d85cc..e373e74 100644 --- a/models/marts/warehouse/fct_exchange__transaction_costs.sql +++ b/models/marts/warehouse/fct_exchange__transaction_costs.sql @@ -62,7 +62,7 @@ transaction_costs_lists AS ( transaction_costs.base_service_charge, -9999999999) AS service_charge_rm, - (value_rm + service_charge_rm + tax_rm) AS total_value_rm, + (value_rm - service_charge_rm - tax_rm) AS total_value_rm, transaction_costs.expired_datetime, transaction_costs.deleted_datetime, From b174496caa5df869384202e3bc69b794fa5749ff Mon Sep 17 00:00:00 2001 From: CIEF ACC1 Date: Mon, 29 Jan 2024 09:53:27 +0000 Subject: [PATCH 2/2] Fix total_value_rm formula --- models/marts/warehouse/fct_exchange__transaction_orders.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/marts/warehouse/fct_exchange__transaction_orders.sql b/models/marts/warehouse/fct_exchange__transaction_orders.sql index f479946..7115ae6 100644 --- a/models/marts/warehouse/fct_exchange__transaction_orders.sql +++ b/models/marts/warehouse/fct_exchange__transaction_orders.sql @@ -240,7 +240,7 @@ transaction_orders_lists AS ( transaction_orders.base_service_charge, -9999999999) AS service_charge_rm, - (value_rm + service_charge_rm + tax_rm) AS total_value_rm, + (value_rm - service_charge_rm - tax_rm) AS total_value_rm, transaction_orders.expired_datetime AS order_expected_expired_datetime, transaction_orders.deleted_datetime AS order_deleted_datetime, @@ -318,7 +318,7 @@ transaction_costs_lists AS ( base_service_charge, -9999999999) AS service_charge_rm, - (value_rm + service_charge_rm + tax_rm) AS total_value_rm, + (value_rm - service_charge_rm - tax_rm) AS total_value_rm, expired_datetime, deleted_datetime,