Skip to content

Commit

Permalink
Merge pull request #93 from fivetran/bugfix/purchase-credits
Browse files Browse the repository at this point in the history
Bugfix/purchase credits
  • Loading branch information
fivetran-joemarkiewicz authored May 31, 2023
2 parents 9cc37df + 9367376 commit a492423
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# dbt_quickbooks v0.9.1
[PR #93](https://github.com/fivetran/dbt_quickbooks/pull/93) includes the following updates:
## Bug Fixes
- Adjusted the purchase amount totals within the `int_quickbooks__purchase_transactions` model to factor in credits when calculating purchase amounts.

# dbt_quickbooks v0.9.0
## Bug Fixes
- Added logic to the `int_quickbooks__invoice_double_entry` model to account for invoice discounts as they should be treated as contra revenue accounts that behavior differently from normal sale item detail invoice line items. ([#85](https://github.com/fivetran/dbt_quickbooks/pull/85))
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.9.0'
version: '0.9.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.

2 changes: 1 addition & 1 deletion 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,6 +1,6 @@
name: 'quickbooks_integration_tests'

version: '0.9.0'
version: '0.9.1'

profile: 'integration_tests'
config-version: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ final as (
purchases.vendor_id,
coalesce(purchase_lines.account_expense_billable_status, purchase_lines.item_expense_billable_status) as billable_status,
purchase_lines.description,
purchase_lines.amount,
purchases.total_amount
case when coalesce(purchases.credit, false)
then -1 * purchase_lines.amount
else purchase_lines.amount
end as amount,
case when coalesce(purchases.credit, false)
then -1 * purchases.total_amount
else purchases.total_amount
end as total_amount
from purchases

inner join purchase_lines
Expand Down
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: fivetran/quickbooks_source
version: [">=0.8.0", "<0.9.0"]
version: [">=0.8.0", "<0.9.0"]

0 comments on commit a492423

Please sign in to comment.