Skip to content
Closed
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3e354c7
Update invoice tax line data
fivetran-avinash Jul 9, 2025
95c441f
Update seed files to test new invoice tax line logic
fivetran-avinash Jul 10, 2025
771f86b
Documentation
fivetran-avinash Jul 11, 2025
2512e79
Q2 FY26: Apply automated update.
fivetran-catfritz Jul 16, 2025
60cb98e
Merge conflicts
fivetran-avinash Jul 16, 2025
be5ae28
docs
fivetran-avinash Jul 16, 2025
1685748
Add all tax lines
fivetran-avinash Jul 17, 2025
7219aea
Variable flip to false enable
fivetran-avinash Jul 17, 2025
49822ad
New seed sources
fivetran-avinash Jul 17, 2025
b125eb1
Update integration_tests data/config
fivetran-avinash Jul 17, 2025
ecb8196
update quickstart.yml and add variables
fivetran-avinash Jul 17, 2025
c68ebdf
Model fixes
fivetran-avinash Jul 18, 2025
153e8cb
comment out disabled models
fivetran-avinash Jul 21, 2025
82822a1
Q2 FY26: Update auto-release workflow only.
fivetran-catfritz Jul 22, 2025
0a6d16a
PR changes plus new tax line PR updates
fivetran-avinash Jul 29, 2025
e52d2d6
Apply new variable config logic to double entry Models + resolve merg…
fivetran-avinash Jul 30, 2025
a5c6f5c
Resolve merge conflicts from docs generator PR
fivetran-avinash Jul 30, 2025
3c32e2f
small change to merge
fivetran-avinash Jul 30, 2025
685cf75
small change to merge
fivetran-avinash Jul 30, 2025
d2b70af
Trigger merge to close PR (#170)
fivetran-data-model-bot Jul 30, 2025
5cdeecb
packages.yml
fivetran-avinash Jul 31, 2025
b780f1b
PR review
fivetran-avinash Aug 5, 2025
921024c
PR re-review
fivetran-avinash Aug 6, 2025
74129d2
PR notes
fivetran-avinash Aug 7, 2025
edd4831
pin to pre-release package
fivetran-avinash Aug 12, 2025
1cc667b
address merge conflicts
fivetran-joemarkiewicz Aug 26, 2025
8a47956
cleanup merge conflicts
fivetran-joemarkiewicz Aug 26, 2025
dd6bd1d
bugfix/invoice-bundles (#175)
fivetran-joemarkiewicz Aug 27, 2025
1ff58e3
update for pre-release
fivetran-avinash Aug 27, 2025
3d22662
packages for docs gen
fivetran-avinash Aug 28, 2025
166ed21
Generate dbt docs via GitHub Actions
github-actions[bot] Aug 28, 2025
b317823
changelog + packages
fivetran-avinash Aug 28, 2025
4488fa1
Merge branch 'feature/add-all-tax-lines' of https://github.com/fivetr…
fivetran-avinash Aug 28, 2025
8d2f73d
Generate dbt docs via GitHub Actions
github-actions[bot] Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/scripts/run_models.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dbt seed --target "$db" --full-refresh
dbt source freshness --target "$db" || echo "...Only verifying freshness runs..."
dbt run --target "$db" --full-refresh
dbt test --target "$db"
dbt run --vars '{using_credit_card_payment_txn: true, using_address: false, using_bill: false, using_credit_memo: false, using_department: false, using_deposit: false, using_estimate: false, using_invoice: false, using_invoice_bundle: false, using_journal_entry: false, using_payment: false, using_refund_receipt: false, using_transfer: false, using_vendor_credit: false, using_sales_receipt: false}' --target "$db" --full-refresh
dbt run --vars '{using_credit_card_payment_txn: true, using_address: false, using_bill: false, using_credit_memo: false, using_department: false, using_deposit: false, using_estimate: false, using_invoice: false, using_invoice_bundle: false, using_invoice_tax_line: true, using_journal_entry: false, using_journal_entry_tax_line: true, using_payment: false, using_purchase_tax_line: true, using_refund_receipt: false, using_refund_receipt_tax_line: true, using_sales_receipt: false, using_sales_receipt_tax_line: true, using_tax_agency: true, using_tax_rate: true, using_transfer: false, using_vendor_credit: false}' --target "$db" --full-refresh
dbt test --target "$db"

dbt run-operation fivetran_utils.drop_schemas_automation --target "$db"
11 changes: 6 additions & 5 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ on:
pull_request:
types:
- closed
branches:
- main
- labeled

jobs:
call-workflow-passing-data:
if: github.event.pull_request.merged
release:
if: |
(github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main') ||
github.event.label.name == 'pre-release'
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
secrets: inherit
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'generate dbt docs'
on:
pull_request:
types:
- labeled

jobs:
generate-docs:
if: github.event.label.name == 'docs:ready'
uses: fivetran/dbt_package_automations/.github/workflows/generate-docs.yml@main
secrets: inherit
with:
schema_var_name: quickbooks_schema
75 changes: 70 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,73 @@

target/
# dbt
**/package-lock.yml
package-lock.yml
.dbt/
dbt_modules/
dbt_packages/
logs/
profiles.yml
target/
*.log

# IDE files
.idea/
.vscode/
*~
*.swp
*.swo

# Jupyter Notebook
.ipynb_checkpoints

# OS generated files
**/.DS_Store
.DS_Store
integration_tests/.DS_Store
dbt_packages/
env/
.Spotlight-V100
.Trashes
._*
Thumbs.db
ehthumbs.db

# Python
*.egg
*.egg-info/
*.py[cod]
*.so
*$py.class
.Python
__pycache__/
build/
develop-eggs/
dist/
downloads/
eggs/
.env
.installed.cfg
lib/
lib64/
MANIFEST
parts/
sdist/
var/
wheels/

# Secrets and credentials
.env.*
.secrets
credentials.json
service-account.json

# Temporary files
.cache/
*.temp
*.tmp

# Virtual environments
.conda/
.env
.venv
ENV/
env/
env.bak/
venv/
venv.bak/
14 changes: 14 additions & 0 deletions .quickstart/quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,29 @@ table_variables:
- bundle_item
- bundle
- invoice_line_bundle
using_invoice_tax_line:
- invoice_tax_line
using_journal_entry:
- journal_entry_line
- journal_entry
using_journal_entry_tax_line:
- journal_entry_tax_line
using_payment:
- payment_line
- payment
using_purchase_tax_line:
- purchase_tax_line
using_refund_receipt:
- refund_receipt_line
- refund_receipt
using_refund_receipt_tax_line:
- refund_receipt_tax_line
using_sales_receipt_tax_line:
- sales_receipt_tax_line
using_tax_agency:
- tax_agency
using_tax_rate:
- tax_rate
using_transfer:
- transfer
using_vendor_credit:
Expand Down
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
# dbt_quickbooks v0.21.0-a1
[PR #166](https://github.com/fivetran/dbt_quickbooks/pull/166) is a pre-release that introduces the following updates.

## Schema Updates
**14 new models -- 14 potential breaking changes**

| Data Model | Change Type | Old Name | New Name | Notes |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ---------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [`stg_quickbooks__invoice_tax_line`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__invoice_tax_line) | New Staging Model | | | Source: `invoice_tax_line` table. Disabled by default, leverage `using_invoice_tax_line` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__journal_entry_tax_line`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__journal_entry_tax_line) | New Staging Model | | | Source: `journal_entry_tax_line` table. Disabled by default, leverage `using_journal_entry_tax_line` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__purchase_tax_line`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__purchase_tax_line) | New Staging Model | | | Source: `purchase_tax_line` table. Disabled by default, leverage `using_purchase_tax_line` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__refund_receipt_tax_line`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__refund_receipt_tax_line) | New Staging Model | | | Source: `refund_receipt_tax_line` table. Disabled by default, leverage `using_refund_receipt_tax_line` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__sales_receipt_tax_line`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__sales_receipt_tax_line) | New Staging Model | | | Source: `sales_receipt_tax_line` table. Disabled by default, leverage `using_sales_receipt_tax_line` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__tax_agency`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__tax_agency) | New Staging Model | | | Source: `tax_agency` table. Disabled by default, leverage `using_tax_agency` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__tax_rate`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__tax_rate) | New Staging Model | | | Source: `tax_rate` table. Disabled by default, leverage `using_tax_rate` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__invoice_tax_line_tmp`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__invoice_tax_line_tmp) | New Temp Model | | | Source: `invoice_tax_line` table. Enabled by default, leverage `using_invoice_tax_line` variable in `dbt_project.yml` to disable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__journal_entry_tax_line_tmp`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__journal_entry_tax_line_tmp) | New Temp Model | | | Source: `journal_entry_tax_line` table. Disabled by default, leverage `using_journal_entry_tax_line` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__purchase_tax_line_tmp`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__purchase_tax_line_tmp) | New Temp Model | | | Source: `purchase_tax_line` table. Disabled by default, leverage `using_purchase_tax_line` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__refund_receipt_tax_line_tmp`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__refund_receipt_tax_line_tmp) | New Temp Model | | | Source: `refund_receipt_tax_line` table. Disabled by default, leverage `using_refund_receipt_tax_line` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__sales_receipt_tax_line_tmp`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__sales_receipt_tax_line_tmp) | New Temp Model | | | Source: `sales_receipt_tax_line` table. Disabled by default, leverage `using_sales_receipt_tax_line` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__tax_agency_tmp`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__tax_agency_tmp) | New Temp Model | | | Source: `tax_agency` table. Disabled by default, leverage `using_tax_agency` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |
| [`stg_quickbooks__tax_rate_tmp`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.stg_quickbooks__tax_rate_tmp) | New Temp Model | | | Source: `tax_rate` table. Disabled by default, leverage `using_tax_rate` variable in `dbt_project.yml` to enable. (This will be dynamically handled for Quickstart users.) |

## Feature Updates
- This update incorporates tax lines into the below double entry models.
- `int_quickbooks__invoice_double_entry`
- `int_quickbooks__journal_entry_double_entry`
- `int_quickbooks__purchase_double_entry`
- `int_quickbooks__refund_receipt_double_entry`
- `int_quickbooks__sales_receipt_double_entry`
- These lines then filter into our financial end models to provide more accurate financial reporting.
- We created logic to the account for each invoice tax line to the tax agency associated with an account.
- We provide fallbacks to the 'Sales Tax Payable' and 'Global Tax Payable' accounts if needed with variables you can leverage to configure your own custom account.
- Created equivalent double entry line for a tax item that associates with the invoice's existing Accounts Receivable account.
- To prevent uniqueness test failures with these tax line items, we start the tax line `index` in each double entry model at 10000.
- Created enable/disable variables to map to each of the new source tables and their downstream dependencies. [For dbt core users, see the README](https://github.com/fivetran/dbt_quickbooks_source/blob/main/README.md#step-4-enablingdisabling-models) for more details about how to configure these variables.

## Under the Hood
- Updated `quickstart.yml` with the new variables for each new table to enable/disable based on the whether the source tables are being utilized.
- Created new seed files for the above source tables to test and validate new models work as expected.
- Updated `run_models.sh` to execute for when the new variables are enabled.
- Removed redundant default variable configs from the `dbt_project.yml`.
- Updated conditions in `.github/workflows/auto-release.yml`.
- Added `.github/workflows/generate-docs.yml`.
- Added `+docs: show: False` to `integration_tests/dbt_project.yml`.
- Migrated `flags` (e.g., `send_anonymous_usage_stats`, `use_colors`) from `sample.profiles.yml` to `integration_tests/dbt_project.yml`.
- Updated `maintainer_pull_request_template.md` with improved checklist.
- Updated `.gitignore` to exclude additional DBT, Python, and system artifacts.

# dbt_quickbooks v0.20.1
[PR #169](https://github.com/fivetran/dbt_quickbooks/pull/169) includes the following updates:

Expand Down
9 changes: 8 additions & 1 deletion DECISIONLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,11 @@ Please leverage the below fields in your end models for your financial statement
| [quickbooks__balance_sheet](https://fivetran.github.io/dbt_quickbooks/#!/model/model.quickbooks.quickbooks__balance_sheet) | `converted_amount` | `amount` |
| [quickbooks__cash_flow_statement](https://fivetran.github.io/dbt_quickbooks/#!/model/model.quickbooks.quickbooks__cash_flow_statement) | `cash_converted_ending_period`, `cash_converted_beginning_period`, `cash_converted_net_period` | `cash_ending_period`, `cash_beginning_period`, `cash_net_period` |
| [quickbooks__ap_ar_enhanced](https://fivetran.github.io/dbt_quickbooks/#!/model/model.quickbooks.quickbooks__ap_ar_enhanced) | `total_converted_amount`, `estimate_total_converted_amount`, `total_current_converted_payment` | `total_amount`, `estimate_total_amount`, `total_current_payment` |
| [quickbooks__expenses_sales_enhanced](https://fivetran.github.io/dbt_quickbooks/#!/model/model.quickbooks.quickbooks__expenses_sales_enhanced) | `total_converted_amount`, `converted_amount` | `total_amount`, `amount` |
| [quickbooks__expenses_sales_enhanced](https://fivetran.github.io/dbt_quickbooks/#!/model/model.quickbooks.quickbooks__expenses_sales_enhanced) | `total_converted_amount`, `converted_amount` | `total_amount`, `amount` |

## Bringing in The Right Tax Accounts For Tax Lines
- When bringing in tax lines ([see the README](https://github.com/fivetran/dbt_quickbooks?tab=readme-ov-file#step-4-enablingdisabling-models) for more details on how to enable/disable tax lines), we want to make sure we are associating each line with the right account, since they usually differ from the accounts for the regular lines. That way these lines are correctly tracked, generally as liabilities.
Comment thread
fivetran-joemarkiewicz marked this conversation as resolved.
Outdated
- Our initial logic maps the tax agency display name by appending 'Payable' to the end of the name. That should match at least one account name, which is the appropriate account for that tax line.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall there was a QuickBooks doc that led us to this understanding. Can we link that here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- If tax agencies aren't where you want your mapping to take place, we then search for your default `Sales Tax Payable` and `Global Tax Payable` account available in your Quickbooks account.
- If neither of those accounts are available, the `quickbooks__sales_tax_account_reference` and `quickbooks__global_tax_account_reference` are made available to publish the account name you believe matches the tax line. [See the README for more details](https://github.com/fivetran/dbt_quickbooks?tab=readme-ov-file#configuring-account-type-names).
- This behavior pertains to the invoice, journal entry, refund receipt, and sales receipt tax line entries. (Purchase tax lines will be associated with their purchase accounts).
Loading