Skip to content

Commit

Permalink
Merge pull request #109 from fivetran/bugfix/double-entry-account-joins
Browse files Browse the repository at this point in the history
bugfix/double-entry-account-joins
  • Loading branch information
fivetran-joemarkiewicz authored Nov 29, 2023
2 parents 74da53b + 5c932f1 commit d74221d
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 28 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# dbt_quickbooks v0.12.1
[PR #109](https://github.com/fivetran/dbt_quickbooks/pull/109) includes the following updates:

## Bug Fixes
- Adjusted the joins within the below intermediate double entry models to be `left join` as opposed to an `inner join`. This update was necessary as there was the possibility of the respective account cte joins to return no records. If this was the case, the logic could erroneously remove transactions from the record.
- [int_quickbooks__bill_payment_double_entry](https://github.com/fivetran/dbt_quickbooks/blob/main/models/double_entry_transactions/int_quickbooks__bill_payment_double_entry.sql)
- [int_quickbooks__credit_memo_double_entry](https://github.com/fivetran/dbt_quickbooks/blob/main/models/double_entry_transactions/int_quickbooks__credit_memo_double_entry.sql)
- [int_quickbooks__deposit_double_entry](https://github.com/fivetran/dbt_quickbooks/blob/main/models/double_entry_transactions/int_quickbooks__deposit_double_entry.sql)
- [int_quickbooks__invoice_double_entry](https://github.com/fivetran/dbt_quickbooks/blob/main/models/double_entry_transactions/int_quickbooks__invoice_double_entry.sql)
- [int_quickbooks__payment_double_entry](https://github.com/fivetran/dbt_quickbooks/blob/main/models/double_entry_transactions/int_quickbooks__payment_double_entry.sql)

# dbt_quickbooks v0.12.0
[PR #103](https://github.com/fivetran/dbt_quickbooks/pull/103/files) includes the following updates:
## 🚘 Under the Hood
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-version: 2
name: 'quickbooks'

version: '0.12.0'
version: '0.12.1'

require-dbt-version: [">=1.3.0", "<2.0.0"]

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

Large diffs are not rendered by default.

24 changes: 12 additions & 12 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.

3 changes: 2 additions & 1 deletion integration_tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ target/
dbt_modules/
dbt_packages/
logs/
env/
env/
package-lock.yml
2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'quickbooks_integration_tests'

version: '0.12.0'
version: '0.12.1'

profile: 'integration_tests'
config-version: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ bill_payment_join as (
bill_payments.department_id
from bill_payments

inner join ap_accounts
on ap_accounts.source_relation = bill_payments.source_relation
left join ap_accounts
on ap_accounts.source_relation = bill_payments.source_relation
),

final as (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ final as (
'credit_memo' as transaction_source
from credit_memo_join

inner join df_accounts
on df_accounts.source_relation = credit_memo_join.source_relation
left join df_accounts
on df_accounts.source_relation = credit_memo_join.source_relation
)

select *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ deposit_join as (
on deposits.deposit_id = deposit_lines.deposit_id
and deposits.source_relation = deposit_lines.source_relation

inner join uf_accounts
on uf_accounts.source_relation = deposits.source_relation
left join uf_accounts
on uf_accounts.source_relation = deposits.source_relation

),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ final as (
end as transaction_source
from invoice_filter

inner join ar_accounts
on ar_accounts.source_relation = invoice_filter.source_relation
left join ar_accounts
on ar_accounts.source_relation = invoice_filter.source_relation
)

select *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ final as (
'payment' as transaction_source
from payment_join

inner join ar_accounts
on ar_accounts.source_relation = payment_join.source_relation
left join ar_accounts
on ar_accounts.source_relation = payment_join.source_relation
)

select *
Expand Down

0 comments on commit d74221d

Please sign in to comment.