Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4832c88
feature/exchange-gain-loss
fivetran-catfritz Jun 26, 2026
1b004fa
fixes
fivetran-catfritz Jun 26, 2026
32a70b8
decisionlog
fivetran-catfritz Jun 30, 2026
94498cd
yml
fivetran-catfritz Jun 30, 2026
8458080
Merge branch 'main' into feature/exchange-gain-loss
fivetran-catfritz Jun 30, 2026
c67d3c5
Apply suggestion from @fivetran-catfritz
fivetran-catfritz Jun 30, 2026
02d2ae2
ad some aliases
fivetran-catfritz Jul 6, 2026
0546876
convert to full
fivetran-catfritz Jul 6, 2026
7d30d3e
Generate dbt docs via GitHub Actions
github-actions[bot] Jul 6, 2026
ab37ec4
update vars
fivetran-catfritz Jul 6, 2026
76d1595
update docs
fivetran-catfritz Jul 6, 2026
288ff86
Generate dbt docs via GitHub Actions
github-actions[bot] Jul 6, 2026
8a527f9
Apply suggestions from code review
fivetran-catfritz Jul 7, 2026
22f70ee
resolve conflicts
fivetran-catfritz Jul 7, 2026
dcd1f37
fix seed ids
fivetran-catfritz Jul 7, 2026
a0b989d
fix seed dupes
fivetran-catfritz Jul 7, 2026
052720a
put the seeds back
fivetran-catfritz Jul 7, 2026
1901141
Merge branch 'release/1.9.0' into feature/exchange-gain-loss
fivetran-catfritz Jul 7, 2026
19dace7
restore seeds again
fivetran-catfritz Jul 7, 2026
6ec394d
restore seeds again
fivetran-catfritz Jul 7, 2026
cad79f2
restore seeds again
fivetran-catfritz Jul 7, 2026
66c07c7
update col seed types
fivetran-catfritz Jul 7, 2026
25070ea
Generate dbt docs via GitHub Actions
github-actions[bot] Jul 8, 2026
075a53f
merge conflicts
fivetran-catfritz Jul 8, 2026
eab7a5a
merge conflicts
fivetran-catfritz Jul 8, 2026
89629a6
Merge branch 'release/1.9.0' into feature/exchange-gain-loss
fivetran-catfritz Jul 10, 2026
8e671ea
Merge branch 'release/1.9.0' into feature/exchange-gain-loss
fivetran-catfritz Jul 11, 2026
dcac347
Update CHANGELOG with tax line model changes
fivetran-catfritz Jul 11, 2026
5e32fc2
Update CHANGELOG.md
fivetran-catfritz Jul 11, 2026
6b11c81
Revise CHANGELOG for new features and updates
fivetran-catfritz Jul 11, 2026
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
8 changes: 7 additions & 1 deletion .quickstart/quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,14 @@ supported_vars:
description: "The primary reporting currency, use the same 3-letter ISO currency code (e.g., USD, EUR, GBP, CAD) that appears in your QuickBooks `currency_id` field. Relevant for organizations with multiple currencies, this field defaults to an empty string; when not set, the package applies exchange rate conversions to all transactions, regardless of currency."
display_name: "Home Currency"

quickbooks__exchange_gain_loss_enabled:
type: boolean
value: false
description: "Enable to generate exchange gain/loss entries for foreign currency bill payments and customer payments where the exchange rate differs between the original transaction and the settlement. Requires multi-currency transactions and an Exchange Gain or Loss account configured in QuickBooks."
display_name: "Enable Exchange Gain/Loss Entries"

quickbooks__tax_lines_enabled:
type: boolean
value: false
description: "Toggle to enable tax lines. Ensure individual tax line tables are syncing to include them in your models."
display_name: "Enable Tax Lines"
display_name: "Enable Tax Lines"
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@
| `stg_quickbooks__deposit_tax_line`<br>`stg_quickbooks__deposit_tax_line_tmp` | New models (opt-in) | — | — | Enabled via `quickbooks__tax_lines_enabled: true` and `using_deposit_tax_line: true`. [See the README](https://github.com/fivetran/dbt_quickbooks/tree/main#enabling-tax-lines) for details. |
| `stg_quickbooks__estimate_tax_line`<br>`stg_quickbooks__estimate_tax_line_tmp` | New models (opt-in) | — | — | Enabled via `quickbooks__tax_lines_enabled: true` and `using_estimate_tax_line: true`. [See the README](https://github.com/fivetran/dbt_quickbooks/tree/main#enabling-tax-lines) for details. |

## Feature Updates
### Exchange Gain/Loss
- Adds the ability to realize exchange gain/loss entries to `int_quickbooks__bill_payment_double_entry` and `int_quickbooks__payment_double_entry`, which populate in `quickbooks__general_ledger` and quickbooks__general_ledger_by_period`, to capture the currency impact when a foreign currency transaction is settled at a different exchange rate than when it was originally recorded. Requires an account with a subtype of `ExchangeGainOrLoss` in QuickBooks to generate entries.
- Adds the `using_exchange_gain_loss` variable (default `false`) to opt into exchange gain/loss entry generation. Enable this if your QuickBooks data includes multi-currency transactions and you have an `ExchangeGainOrLoss` account configured. See the [README](https://github.com/fivetran/dbt_quickbooks/tree/main#enabling-exchange-gainloss-entries) for configuration details.

# dbt_quickbooks v1.9.0-a1
[PR #212](https://github.com/fivetran/dbt_quickbooks/pull/212) includes the following updates:

## Schema/Data Change
**2 total changes • 0 possible breaking changes**

| Data Model(s) | Change type | Old | New | Notes |
| ------------- | ----------- | --- | --- | ----- |
| `quickbooks__general_ledger`<br>`quickbooks__general_ledger_by_period` | New records | — | Exchange gain/loss entries | |

## Feature Update
- Adds realized exchange gain/loss entries to `int_quickbooks__bill_payment_double_entry` and `int_quickbooks__payment_double_entry` to capture the currency impact when a foreign currency transaction is settled at a different exchange rate than when it was originally recorded. Requires an account with a subtype of `ExchangeGainOrLoss` in QuickBooks to generate entries.
- Adds the `using_exchange_gain_loss` variable (default `true`) to disable exchange gain/loss entry generation for users without multi-currency transactions or an Exchange Gain or Loss account. See the [README](https://github.com/fivetran/dbt_quickbooks/tree/main#disabling-exchange-gainloss-entries) for details.

# dbt_quickbooks v1.8.1
[PR #214](https://github.com/fivetran/dbt_quickbooks/pull/214) includes the following update:

Expand Down
13 changes: 13 additions & 0 deletions DECISIONLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ If neither of those accounts are available, the `quickbooks__sales_tax_account_r

This behavior pertains to the bill, credit memo, deposit, invoice, journal entry, purchase, refund receipt, and sales receipt tax line entries.

## Exchange Gain/Loss: Clearing AR/AP at the Original Transaction Rate
Comment thread
fivetran-catfritz marked this conversation as resolved.
Resolved
When `using_exchange_gain_loss` is set to `true`, exchange gain/loss entries are generated in `int_quickbooks__payment_double_entry` and `int_quickbooks__bill_payment_double_entry` for foreign currency payments and bill payments settled at a different exchange rate than the original invoice or bill. This behavior is disabled by default.

When enabled, the AR credit (payment model) and AP debit (bill payment model) use the **original invoice/bill exchange rate** to compute `converted_amount`, not the payment exchange rate. The difference between the payment rate and the original rate is posted separately to the Exchange Gain or Loss account. This mirrors QuickBooks's own behavior.

An alternative considered was to credit/debit AR/AP at the payment rate and add a secondary offsetting AR/AP entry to walk back the difference. This was rejected because:
- It produced a positive `adjusted_converted_amount` for the AR/AP offset entry, making the general ledger appear unbalanced to end users (both the gain/loss entry and its offset showed the same sign).
- It introduced an additional entry per transaction with no user-facing benefit.

Using the original rate clears AR/AP at book value with a single entry, and the exchange gain/loss entry stands alone as income or expense recognition, which is consistent with standard accrual accounting.

The `using_exchange_gain_loss` variable defaults to `false` because this feature requires a specific QuickBooks account configuration (a subtype of `ExchangeGainOrLoss`) and is only relevant for businesses with multi-currency transactions. Enabling it without that setup would cause model errors or produce no meaningful data. Enable it by setting `using_exchange_gain_loss: true` in your `dbt_project.yml`. See the [README](https://github.com/fivetran/dbt_quickbooks/tree/main#enabling-exchange-gainloss-entries) for details.

## Designating a single Accounts Payable/Accounts Receivable account
The `int_quickbooks__bill_payment_double_entry` model requires a single account designated as 'Accounts Payable' per currency. Similarly, the `int_quickbooks__invoice_double_entry`, `int_quickbooks__credit_memo_double_entry`, and `int_quickbooks__payment_double_entry` models require a single account designated as 'Accounts Receivable' per currency. This aligns with QuickBooks Online requirements and accounting best practices. If you have multiple accounts designated as 'Accounts Payable' or 'Accounts Receivable' in the `account_type` field, all accounts will be brought into the join, causing data fanout. See example [join logic](https://github.com/fivetran/dbt_quickbooks/blob/main/models/double_entry_transactions/int_quickbooks__bill_payment_double_entry.sql#L57) here.

Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,22 @@ vars:

**Note:** Use the same 3-letter ISO currency code (e.g., "USD", "EUR", "GBP") that appears in your QuickBooks `currency_id` field.

#### Enabling Exchange Gain/Loss Entries

By default, the package does not generate exchange gain/loss entries. Enable this feature if both of the following apply to your QuickBooks data:

- Your business records transactions in multiple currencies.
- You have an active account with a subtype of `ExchangeGainOrLoss` configured in QuickBooks.

When enabled, the package adds realized gain/loss entries to your general ledger to capture the currency impact when a foreign currency transaction is settled at a different exchange rate than when it was originally recorded.

To enable, add the following variable to your `dbt_project.yml`:

```yml
vars:
using_exchange_gain_loss: true
```

#### Customize the Cash Flow Model
**IMPORTANT**: It is very likely you will need to reconfigure your `cash_flow_type` to make sure your cash flow statement matches your specific use case. Please examine the following instructions.

Expand Down
1 change: 0 additions & 1 deletion docs/catalog.json

This file was deleted.

3 changes: 0 additions & 3 deletions docs/index.html

This file was deleted.

1 change: 0 additions & 1 deletion docs/manifest.json

This file was deleted.

5 changes: 5 additions & 0 deletions integration_tests/ci/test_scenarios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ test_scenarios:
using_customer_type: false
include_incremental: false

- name: "Exchange Gain/Loss enabled"
vars:
quickbooks__exchange_gain_loss_enabled: true
include_incremental: false

- name: "tax lines enabled"
vars:
quickbooks__tax_lines_enabled: true
Expand Down
1 change: 1 addition & 0 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ seeds:
+column_types:
due_date: date
transaction_date: date
exchange_rate: float
bill_line_data:
+column_types:
amount: "{{ 'FLOAT64' if target.type == 'bigquery' else 'float' }}"
Expand Down
4 changes: 3 additions & 1 deletion integration_tests/seeds/account_data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ id,_fivetran_synced,account_number,account_sub_type,account_type,active,balance,
91004,2024-06-30 12:00:00,914,SalesTaxPayable,Other Current Liability,TRUE,0,0,Liability,2024-06-30 00:00:00,USD,Tax liability account for State Department of Revenue,State Department of Revenue Payable,State Department of Revenue Payable,,FALSE,1,,2025-06-30 12:00:00,FALSE
91005,2024-06-30 12:00:00,915,SalesTaxPayable,Other Current Liability,TRUE,0,0,Liability,2024-06-30 00:00:00,USD,Tax liability account for Local Business Tax Agency,Local Business Tax Agency Payable,Local Business Tax Agency Payable,,FALSE,1,,2025-06-30 12:00:00,FALSE
92001,2024-06-30 12:00:00,9201,AccountsReceivable,Accounts Receivable,TRUE,0,0,Asset,2024-06-30 00:00:00,USD,Primary accounts receivable account,Accounts Receivable,Accounts Receivable,,FALSE,1,,2025-06-30 12:00:00,FALSE
92002,2026-02-01 12:00:00,9202,AccountsReceivable,Accounts Receivable,TRUE,0,0,Asset,2026-01-15 00:00:00,EUR,EUR accounts receivable account,Accounts Receivable EUR,Accounts Receivable EUR,,FALSE,1,,2026-01-15 00:00:00,FALSE
92002,2026-02-01 12:00:00,9202,AccountsReceivable,Accounts Receivable,TRUE,0,0,Asset,2026-01-15 00:00:00,EUR,EUR accounts receivable account,Accounts Receivable EUR,Accounts Receivable EUR,,FALSE,1,,2026-01-15 00:00:00,FALSE
93001,2026-01-15 00:00:00,9301,ExchangeGainOrLoss,Other Income,TRUE,0,0,Revenue,2026-01-15 00:00:00,USD,Exchange gain or loss account,Exchange Gain or Loss,Exchange Gain or Loss,,FALSE,1,,2026-01-15 00:00:00,FALSE
93002,2026-01-15 00:00:00,9302,AccountsPayable,Accounts Payable,TRUE,0,0,Liability,2026-01-15 00:00:00,EUR,EUR accounts payable account,Accounts Payable EUR,Accounts Payable EUR,,FALSE,1,,2026-01-15 00:00:00,FALSE
3 changes: 2 additions & 1 deletion integration_tests/seeds/bill_data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ id,_fivetran_deleted,_fivetran_synced,balance,created_at,currency_id,department_
111,FALSE,2020-11-10 21:00:00,0,2020-11-10 20:59:00,USD,1,,,,,,,,,,5000,2020-11-10,2020-11-10 20:59:00,1
112,FALSE,2020-11-10 21:00:01,0,2020-11-10 20:59:01,USD,1,,,,,,,,,,7000,2020-11-10,2020-11-10 20:59:01,1
5000,FALSE,2024-01-01 12:00:00,100,2024-01-01 12:00:01,USD,1,,2024-01-10,1,,,500,,,0,100,2024-01-01,2024-01-01,100
5001,FALSE,2024-01-01 12:00:00,150,2024-01-01 12:00:01,USD,1,,2024-01-10,1,,,501,,,0,150,2024-01-01,2024-01-01,101
5001,FALSE,2024-01-01 12:00:00,150,2024-01-01 12:00:01,USD,1,,2024-01-10,1,,,501,,,0,150,2024-01-01,2024-01-01,101
5002,FALSE,2026-01-15 00:00:00,500,2026-01-15 00:00:00,EUR,,,2026-02-15,1.2,,,,,,1,500,2026-01-15,2026-01-15 00:00:00,1
3 changes: 2 additions & 1 deletion integration_tests/seeds/bill_payment_data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ id,_fivetran_deleted,_fivetran_synced,check_bank_account_id,check_print_status,c
132,FALSE,2020-10-30 19:31:59,28,faf396cbd83927b72a84d2616fac76ff,2020-10-30 19:27:05,,USD,,,,4cce1cfcb51137c1ea3971e31a5ea598,,,,,51931,2020-10-30,2020-10-30 19:27:05,1
133,FALSE,2020-10-30 19:31:59,28,faf396cbd83927b72a84d2616fac76ff,2020-10-30 19:27:40,,USD,,,,4cce1cfcb51137c1ea3971e31a5ea598,,,,,83210,2020-10-30,2020-10-30 19:27:40,1
134,FALSE,2020-11-01 16:02:01,28,faf396cbd83927b72a84d2616fac76ff,2020-11-01 16:00:40,,USD,,,,4cce1cfcb51137c1ea3971e31a5ea598,,,,,37040,2020-11-01,2020-11-01 16:00:40,1
150,FALSE,2020-11-12 12:00:00,99,faf396cbd83927b72a84d2616fac76ff,2020-11-12 12:00:00,,USD,,,0.9,4cce1cfcb51137c1ea3971e31a5ea598,,,,,52353,2020-11-12,2020-11-12 12:00:00,1
150,FALSE,2020-11-12 12:00:00,99,faf396cbd83927b72a84d2616fac76ff,2020-11-12 12:00:00,,USD,,,0.9,4cce1cfcb51137c1ea3971e31a5ea598,,,,,52353,2020-11-12,2020-11-12 12:00:00,1
9001,FALSE,2026-02-01 00:00:00,99,,2026-02-01 00:00:00,,EUR,,,1.3,Check,93002,,,1,500,2026-02-01,2026-02-01 00:00:00,1
3 changes: 2 additions & 1 deletion integration_tests/seeds/bill_payment_line_data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ bill_payment_id,index,_fivetran_synced,amount,bill_id,check_id,credit_card_charg
133,0,2020-10-30 19:27:40,83210,113,,,,,,,,,
134,0,2020-11-01 16:00:40,20000,114,,,,,,,,,
134,1,2020-11-01 16:00:41,17040,115,,,,,,,,,
150,0,2020-11-12 12:10:00,52353,120,,,,,,262,,,
150,0,2020-11-12 12:10:00,52353,120,,,,,,262,,,
9001,0,2026-02-01 00:00:00,500,5002,,,,,,,,,
18 changes: 9 additions & 9 deletions integration_tests/seeds/bill_tax_line_data.csv
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
_fivetran_deleted,_fivetran_synced,amount,bill_id,index,net_amount_taxable,override_delta_amount,percent_based,tax_inclusive_amount,tax_percent,tax_rate_id
FALSE,2025-06-30 12:00:00,75.00,398,1,750.00,0.00,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,59.00,399,1,590.00,0.00,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,56.00,397,1,700.00,0.00,TRUE,,8.0,8
FALSE,2025-06-30 12:00:00,44.00,401,1,440.00,0.00,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,455.00,111,1,4550.00,0.01,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,636.00,112,1,6360.00,0.01,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,9.00,5000,1,90.00,0.00,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,11.20,5001,1,140.00,0.00,TRUE,,8.0,8
_fivetran_deleted,_fivetran_synced,amount,bill_id,index,net_amount_taxable,override_delta_amount,percent_based,tax_inclusive_amount,tax_percent,tax_rate_id
FALSE,2025-06-30 12:00:00,75.00,398,1,750.00,0.00,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,59.00,399,1,590.00,0.00,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,56.00,397,1,700.00,0.00,TRUE,,8.0,8
FALSE,2025-06-30 12:00:00,44.00,401,1,440.00,0.00,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,455.00,111,1,4550.00,0.01,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,636.00,112,1,6360.00,0.01,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,9.00,5000,1,90.00,0.00,TRUE,,10.0,5
FALSE,2025-06-30 12:00:00,11.20,5001,1,140.00,0.00,TRUE,,8.0,8
3 changes: 2 additions & 1 deletion integration_tests/seeds/payment_data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ id,_fivetran_deleted,_fivetran_synced,created_at,credit_card_amount,credit_card_
5814,FALSE,2020-01-15 0:03:27,2019-01-03 19:03:04,,,,,,,,,,,,,USD,827,40,,5,,FALSE,,463,0,19960,2019-01-03,,,0,2019-01-03 19:03:04
5936,FALSE,2020-01-15 0:03:27,2019-01-08 0:42:04,,,,,,,,,,,,,USD,698,40,,5,,FALSE,,308,0,8324.1,2019-01-07,,,0,2019-01-08 0:42:04
11653,FALSE,2020-01-15 0:03:27,2019-06-11 14:14:59,,,,,,,,,,,,,USD,1589,40,,5,,FALSE,,8245,0,11000,2019-06-11,,,0,2019-06-11 14:14:59
10777,FALSE,2020-01-15 0:03:27,2019-05-14 14:36:36,,,,,,,,,,,,,USD,858,40,,5,,FALSE,,2669,0,12853,2019-05-14,,,0,2019-05-14 14:36:36
10777,FALSE,2020-01-15 0:03:27,2019-05-14 14:36:36,,,,,,,,,,,,,USD,858,40,,5,,FALSE,,2669,0,12853,2019-05-14,,,0,2019-05-14 14:36:36
9001,FALSE,2026-02-01 00:00:00,2026-02-01 00:00:00,,,,,,,,,,,,,EUR,698,40,1.4,,,,92002,,1,1000,2026-02-01,,,0,2026-02-01 00:00:00
3 changes: 2 additions & 1 deletion integration_tests/seeds/payment_line_data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ index,payment_id,_fivetran_synced,amount,check_id,credit_card_charge_id,credit_c
0,24685,2020-03-04 2:01:35,16668,,,,,,,23531,
0,24819,2020-03-05 18:16:45,25149.04,,,,,,,23532,
0,24420,2020-02-27 15:46:05,17381.5,,,,,,,23566,
0,24183,2020-02-21 3:15:37,16147.5,,,,,,,23568,
0,24183,2020-02-21 3:15:37,16147.5,,,,,,,23568,
0,9001,2026-02-01 00:00:00,1000,,,,,,,50001,
Loading