Skip to content

Commit

Permalink
Fix is_account_intercompany on balance_sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
jmongerlyra committed Sep 30, 2024
1 parent e67f7bb commit 4468b25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions models/netsuite2/netsuite2__balance_sheet.sql
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ balance_sheet as (
end as account_number,
case
when not accounts.is_balancesheet then false
else accounts.is_eliminate
end as is_account_intercompany,
case
when not accounts.is_balancesheet then false
else accounts.is_leftside
end as is_account_leftside

Expand Down Expand Up @@ -233,6 +237,7 @@ balance_sheet as (
'cumulative_translation_adjustment' as account_type_id,
null as account_id,
(select accounts.account_number from accounts where lower(accounts.special_account_type_id) = 'cumultransadj' limit 1) as account_number,
false as is_account_intercompany,
false as is_account_leftside,

{% if var('accounts_pass_through_columns') %}
Expand Down
2 changes: 1 addition & 1 deletion models/netsuite2/netsuite2__transaction_details.sql
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ transaction_details as (

--The below script allows for subsidiaries table pass through columns.
{{ fivetran_utils.persist_pass_through_columns('subsidiaries_pass_through_columns', identifier='subsidiaries') }},

case
when lower(accounts.account_type_id) in ('income', 'othincome') then -transactions_with_converted_amounts.converted_amount_using_transaction_accounting_period
else transactions_with_converted_amounts.converted_amount_using_transaction_accounting_period
Expand Down

0 comments on commit 4468b25

Please sign in to comment.