Skip to content

Commit

Permalink
Merge pull request #31 from fivetran/bugfix/balance-sheet-dupes
Browse files Browse the repository at this point in the history
Bugfix/balance sheet dupes
  • Loading branch information
fivetran-sheringuyen authored Jun 17, 2022
2 parents f6e1f27 + ecaad12 commit b7554b5
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# dbt_xero v0.4.2
## Bug Fix
- Fixes duplicate values in `net_amount` field in `xero__balance_sheet_report` when leveraging logic to union multiple Xero connectors
## Contributors
- [@danieltaft](https://github.com/danieltaft)[#30](https://github.com/fivetran/dbt_xero/pull/30)

# dbt_xero v0.4.1
## Features
- Adds the `xero__using_bank_transaction` variable to disable the associated models on instances of Xero that don't include the `bank_transaction` source table. ([#27](https://github.com/fivetran/dbt_xero/pull/27))
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'xero'
version: '0.4.1'
version: '0.4.2'
config-version: 2
require-dbt-version: [">=1.0.0", "<2.0.0"]

Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/index.html

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'xero_integration_tests'
version: '0.4.1'
version: '0.4.2'
profile: 'integration_tests'
config-version: 2

Expand Down
4 changes: 3 additions & 1 deletion models/xero__balance_sheet_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ with calendar as (
when cast(extract(year from current_date) || '-' || financial_year_end_month || '-' || financial_year_end_day as date) >= current_date
then cast(extract(year from current_date) || '-' || financial_year_end_month || '-' || financial_year_end_day as date)
else cast(extract(year from {{ dbt_utils.dateadd('year', -1, 'current_date') }}) || '-' || financial_year_end_month || '-' || financial_year_end_day as date)
end as current_year_end_date
end as current_year_end_date,
source_relation
from organization

), joined as (
Expand Down Expand Up @@ -54,6 +55,7 @@ with calendar as (
inner join ledger
on calendar.date_month >= cast({{ dbt_utils.date_trunc('month', 'ledger.journal_date') }} as date)
cross join year_end
where year_end.source_relation = ledger.source_relation
{{ dbt_utils.group_by(7) }}

)
Expand Down

0 comments on commit b7554b5

Please sign in to comment.