Skip to content

fix: correct noncash asset signs in cash flow statements - #226

Open
Bortlesboat wants to merge 2 commits into
fivetran:mainfrom
Bortlesboat:fix/quickbooks-cash-flow-asset-signs
Open

Bortlesboat wants to merge 2 commits into
fivetran:mainfrom
Bortlesboat:fix/quickbooks-cash-flow-asset-signs

Conversation

@Bortlesboat

@Bortlesboat Bortlesboat commented Oct 8, 2026 •

Copy link
Copy Markdown

Resolves #133

Please provide your name and company

Bortlesboat, contributing independently.

Describe what this PR changes and how it addresses the linked issue or feature request.

Cash-flow statements now treat an increase in a noncash Asset balance as a use of cash and a decrease as a source of cash. The rule applies to original and converted amounts; Bank, Liability and Equity balances retain their existing signs. Balanced synthetic journal entries cover asset purchases, releases and control accounts.

How did you validate the changes introduced within this PR, and what warehouse did you use for testing?

The exact regression failed on four asset-month results before the fix and passed afterward. PostgreSQL passed 54 seeds, 127 models and all four cash-flow checks; an independent rerun passed those checks. DuckDB passed 96 default models, then 74 models and four cash-flow checks with report-date FX enabled and a home currency specified. Checked-in docs were regenerated from PostgreSQL.

The broader DuckDB test run passed 53 of 54 tests. The remaining balance-sheet integrity failure reproduces on untouched upstream with the same five failing periods; this PR leaves that separate behavior unchanged. Cloud warehouses and Buildkite were not exercised locally.

November 25 refresh

Merged release 1.12.0 (28d88f6) and kept its generated catalog and manifest for the maintainer's docs:ready workflow. On DuckDB, I reloaded the four affected seeds, rebuilt the cash-flow statement and ran dbt test --select cash_flow_amounts_match cash_flow_non_cash_asset_signs quickbooks__cash_flow_statement --vars '{fivetran_validation_tests_enabled: true, using_report_date_fx_conversion: true, quickbooks__home_currency: USD}' with one thread. All four selected checks passed on the refreshed branch.

Feedback

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.

PR Template

@fivetran-avinash

Copy link
Copy Markdown
Contributor

Hi @Bortlesboat , thanks for submitting this PR. Can you link to the Quickbooks Online documentation supporting this assertion?

Cash-flow statements now treat an increase in a noncash Asset balance as a use of cash and a decrease as a source of cash. The rule applies to original and converted amounts; Bank, Liability and Equity balances retain their existing signs.

@Bortlesboat

Copy link
Copy Markdown
Author

@fivetran-avinash These Intuit sources support the cash-flow direction:

The exact account_class = 'Asset' / noncash account rule comes from your team's decision in #133, following its finance review of this package's balance-sheet convention. I did not find an Intuit API document that specifies that complete predicate or this package's converted-amount columns.

The PR implements that package decision: reverse the noncash Asset balances before taking period differences, in both amount columns. The synthetic regression covers prepaid and fixed assets, with Bank, Liability and Equity controls. It does not establish complete parity with QBO's report for every noncash adjustment or currency scenario. The quoted statement should be read as this model's sign convention, with that scope.

@Bortlesboat
Bortlesboat force-pushed the fix/quickbooks-cash-flow-asset-signs branch from 18ef61a to 33d87ef Compare October 20, 2026 18:56
@cla-assistant

cla-assistant Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Keep the current release catalog and manifest for the maintainer docs workflow. Preserve the model, synthetic inputs and cash-flow regressions.
@Bortlesboat
Bortlesboat requested a review from a team as a code owner November 25, 2026 18:00

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Cash Flow statement is not flipping signs appropriately.

2 participants