Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-avinash committed Jan 13, 2025
1 parent 02c226b commit a863ba0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ vars:
netsuite_data_model_override: netsuite

# Enable below when generating docs
netsuite2__multibook_accounting_enabled: true
netsuite2__using_to_subsidiary: true
# netsuite2__multibook_accounting_enabled: true
# netsuite2__using_to_subsidiary: true

netsuite_source:
# Netsuite Seed Data
Expand Down
2 changes: 1 addition & 1 deletion models/netsuite2/netsuite2__balance_sheet.sql
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ balance_sheet as (
else accounts.is_leftside
end as is_account_leftside
--The below script allows for accounts table pass through columns.
{{ netsuite.persist_pass_through_columns(var('accounts_pass_through_columns'), identifier='accounts') }},
{{ netsuite.persist_pass_through_columns(var('accounts_pass_through_columns', []), identifier='accounts') }},

case
when not accounts.is_balancesheet and lower(accounts.general_rate_type) in ('historical', 'average') then -converted_amount_using_transaction_accounting_period
Expand Down
6 changes: 3 additions & 3 deletions models/netsuite2/netsuite2__income_statement.sql
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,22 @@ income_statement as (
subsidiaries_currencies.symbol as subsidiary_currency_symbol

--The below script allows for accounts table pass through columns.
{{ netsuite.persist_pass_through_columns(var('accounts_pass_through_columns'), identifier='accounts') }},
{{ netsuite.persist_pass_through_columns(var('accounts_pass_through_columns', []), identifier='accounts') }},

{{ dbt.concat(['accounts.account_number',"'-'", 'accounts.name']) }} as account_number_and_name,
classes.class_id,
classes.full_name as class_full_name

--The below script allows for accounts table pass through columns.
{{ netsuite.persist_pass_through_columns(var('classes_pass_through_columns'), identifier='classes') }},
{{ netsuite.persist_pass_through_columns(var('classes_pass_through_columns', []), identifier='classes') }},

locations.location_id,
locations.full_name as location_full_name,
departments.department_id,
departments.full_name as department_full_name

--The below script allows for departments table pass through columns.
{{ netsuite.persist_pass_through_columns(var('departments_pass_through_columns'), identifier='departments') }},
{{ netsuite.persist_pass_through_columns(var('departments_pass_through_columns', []), identifier='departments') }},

transactions_with_converted_amounts.account_category as account_category,
case when lower(accounts.account_type_id) = 'income' then 1
Expand Down
12 changes: 6 additions & 6 deletions models/netsuite2/netsuite2__transaction_details.sql
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ transaction_details as (

--The below script allows for transactions table pass through columns.

{{ netsuite.persist_pass_through_columns(var('transactions_pass_through_columns'), identifier='transactions') }}
{{ netsuite.persist_pass_through_columns(var('transactions_pass_through_columns', []), identifier='transactions') }}

--The below script allows for transaction lines table pass through columns.

{{ netsuite.persist_pass_through_columns(var('transaction_lines_pass_through_columns'), identifier='transaction_lines') }},
{{ netsuite.persist_pass_through_columns(var('transaction_lines_pass_through_columns', []), identifier='transaction_lines') }},

accounting_periods.ending_at as accounting_period_ending,
accounting_periods.name as accounting_period_name,
Expand All @@ -145,7 +145,7 @@ transaction_details as (
accounts.account_number

--The below script allows for accounts table pass through columns.
{{ netsuite.persist_pass_through_columns(var('accounts_pass_through_columns'), identifier='accounts') }},
{{ netsuite.persist_pass_through_columns(var('accounts_pass_through_columns', []), identifier='accounts') }},

accounts.is_leftside as is_account_leftside,
lower(accounts.account_type_id) = 'acctpay' as is_accounts_payable,
Expand Down Expand Up @@ -204,7 +204,7 @@ transaction_details as (
locations.country as location_country

-- The below script allows for locations table pass through columns.
{{ netsuite.persist_pass_through_columns(var('locations_pass_through_columns'), identifier='locations') }},
{{ netsuite.persist_pass_through_columns(var('locations_pass_through_columns', []), identifier='locations') }},

{% if var('netsuite2__using_vendor_categories', true) %}
case
Expand Down Expand Up @@ -241,15 +241,15 @@ transaction_details as (
departments.name as department_name

--The below script allows for departments table pass through columns.
{{ netsuite.persist_pass_through_columns(var('departments_pass_through_columns'), identifier='departments') }},
{{ netsuite.persist_pass_through_columns(var('departments_pass_through_columns', []), identifier='departments') }},

subsidiaries.subsidiary_id,
subsidiaries.full_name as subsidiary_full_name,
subsidiaries.name as subsidiary_name,
subsidiaries_currencies.symbol as subsidiary_currency_symbol

--The below script allows for subsidiaries table pass through columns.
{{ netsuite.persist_pass_through_columns(var('subsidiaries_pass_through_columns'), identifier='subsidiaries') }},
{{ netsuite.persist_pass_through_columns(var('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
Expand Down

0 comments on commit a863ba0

Please sign in to comment.