From 2cda7f90f65ac940a6484c18bc33d8e3484195e8 Mon Sep 17 00:00:00 2001 From: Saurabh Sengar Date: Thu, 25 Aug 2022 16:04:24 +0530 Subject: [PATCH 1/2] Update balance_sheet.sql Added transactions_with_converted_amounts after line 80 --- Netsuite/Netsuite_Queries/BigQuery/balance_sheet.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Netsuite/Netsuite_Queries/BigQuery/balance_sheet.sql b/Netsuite/Netsuite_Queries/BigQuery/balance_sheet.sql index da0c6f6..f75ab1c 100644 --- a/Netsuite/Netsuite_Queries/BigQuery/balance_sheet.sql +++ b/Netsuite/Netsuite_Queries/BigQuery/balance_sheet.sql @@ -77,7 +77,7 @@ with transactions_with_converted_amounts as ( on exchange_transaction_period.accounting_period_id = transactions_in_every_calculation_period.transaction_accounting_period_id and exchange_transaction_period.account_id = transactions_in_every_calculation_period.account_id and exchange_transaction_period.from_subsidiary_id = transactions_in_every_calculation_period.subsidiary_id - ) + ), transactions_with_converted_amounts as ( select transactions_in_every_calculation_period_w_exchange_rates.*, unconverted_amount * exchange_rate_reporting_period as converted_amount_using_reporting_month, From 08f010c9692a5646f5fbb145fa7c598fd4b97453 Mon Sep 17 00:00:00 2001 From: Saurabh Sengar Date: Thu, 25 Aug 2022 16:43:09 +0530 Subject: [PATCH 2/2] Update transactions_with_converted_amounts.sql Removed with transactions_with_converted_amounts as (...) from query --- .../BigQuery/transactions_with_converted_amounts.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Netsuite/Netsuite_Queries/BigQuery/transactions_with_converted_amounts.sql b/Netsuite/Netsuite_Queries/BigQuery/transactions_with_converted_amounts.sql index 7248e7f..b1ad188 100644 --- a/Netsuite/Netsuite_Queries/BigQuery/transactions_with_converted_amounts.sql +++ b/Netsuite/Netsuite_Queries/BigQuery/transactions_with_converted_amounts.sql @@ -1,5 +1,4 @@ -with transactions_with_converted_amounts as ( - with period_exchange_rate_map as ( /* exchange rates used, by accounting period, to convert to parent subsidiary */ +with period_exchange_rate_map as ( /* exchange rates used, by accounting period, to convert to parent subsidiary */ select consolidated_exchange_rates.accounting_period_id, consolidated_exchange_rates.average_rate, @@ -95,4 +94,3 @@ with transactions_with_converted_amounts as ( else null end as account_category from transactions_in_every_calculation_period_w_exchange_rates join netsuite.accounts on accounts.account_id = transactions_in_every_calculation_period_w_exchange_rates.account_id -)