Skip to content

Feature/add all tax lines#171

Closed
fivetran-avinash wants to merge 34 commits intomainfrom
feature/add-all-tax-lines
Closed

Feature/add all tax lines#171
fivetran-avinash wants to merge 34 commits intomainfrom
feature/add-all-tax-lines

Conversation

@fivetran-avinash
Copy link
Copy Markdown
Contributor

@fivetran-avinash fivetran-avinash commented Jul 17, 2025

PR Overview

Package version introduced in this PR:

  • 0.22.0-a1

This PR addresses the following Issue/Feature(s):

Summary of changes:

  • Adding tax lines to our transaction models and thus adding those lines into the financial end models.

Submission Checklist

  • Alignment meeting with the reviewer (if needed)
    • Timeline and validation requirements discussed
  • Provide validation details:
    • Validation Steps: Check for unintentional effects (e.g., add/run consistency & integrity tests)
    • Testing Instructions: Confirm the change addresses the issue(s)
    • Focus Areas: Complex logic or queries that need extra attention
  • Merge any relevant open PRs into this PR

Changelog

  • Draft changelog for PR
  • Final changelog for release review

@fivetran-avinash fivetran-avinash self-assigned this Jul 30, 2025
@fivetran-avinash fivetran-avinash marked this pull request as ready for review July 31, 2025 03:41
Copy link
Copy Markdown
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

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

@fivetran-avinash thanks for working through these updates and combining these updates! A few comments/questions/suggestions before approving.

Comment thread CHANGELOG.md Outdated
Comment thread dbt_project.yml
Comment thread dbt_project.yml
Comment thread integration_tests/dbt_project.yml Outdated
Comment thread models/double_entry_transactions/int_quickbooks__journal_entry_double_entry.sql Outdated
Comment thread models/double_entry_transactions/int_quickbooks__journal_entry_double_entry.sql Outdated
Comment thread README.md
Copy link
Copy Markdown
Contributor Author

@fivetran-avinash fivetran-avinash left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz Did some updates to the variable logic and I think everything is working now. Ready for re-review.

Copy link
Copy Markdown
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

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

@fivetran-avinash a few more questions before pre-release.

Comment thread DECISIONLOG.md Outdated

## 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.
- 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.

Comment thread DECISIONLOG.md Outdated
Comment thread models/double_entry_transactions/int_quickbooks__journal_entry_double_entry.sql Outdated
Comment thread packages.yml Outdated
Comment on lines +2 to +6
# - package: fivetran/quickbooks_source
# version: 0.14.0-a1
- git: https://github.com/fivetran/dbt_quickbooks_source.git
revision: feature/add-all-tax-lines
warn-unpinned: false No newline at end of file
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.

Reminder to update before pre-release

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.

Bump to change before pre-release

),


{% if var('using_sales_receipt_tax_line', False) %}
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.

when the following variables are set I run into a general ledger unique id test failure. Can you look into why that would be the case.

  using_sales_receipt_tax_line: true 
  using_tax_agency: true  
  using_tax_rate: false  

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.

The same happens for invoice and I imagine the others.

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.

Tax agency shouldn't be true when tax rate is false, so reconfigured the variables so that tax agency is only true when tax rate is enabled.

Copy link
Copy Markdown
Contributor Author

@fivetran-avinash fivetran-avinash left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz Ready for re-review. Variables reconfigured and tested that several configurations worked as expected.

Copy link
Copy Markdown
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

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

@fivetran-avinash a few final questions before ready for pre-release.

{% endif %}

{% if var('using_invoice_bundle', True) %}
{% if var('using_invoice_bundle', False) %}
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.

Was this an intentional change? It looks like default is still meant to be true per our README docs.

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.

No, it wasn't, reverted.

Comment on lines +76 to +92
{% if using_tax_agency %}
tax_agencies as (

select *
from {{ ref('stg_quickbooks__tax_agency') }}
),

{% endif %}

{% if using_tax_rate %}
tax_rates as (

select *
from {{ ref('stg_quickbooks__tax_rate') }}
),

{% endif %}
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.

Would a customer ever use these tax variables, when using_journal_entry_tax_line is disabled? If not, why have them exist outside that conditional? They should all be in the same conditional block.

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.

You can also likely consolidate conditionals this way

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.

Consolidated.

Copy link
Copy Markdown
Contributor Author

@fivetran-avinash fivetran-avinash left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz ready for re-review pending Buildkite

Copy link
Copy Markdown
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

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

Looks good for pre-release following the latest updates!

Comment thread packages.yml Outdated
Comment on lines +2 to +6
# - package: fivetran/quickbooks_source
# version: 0.14.0-a1
- git: https://github.com/fivetran/dbt_quickbooks_source.git
revision: feature/add-all-tax-lines
warn-unpinned: false No newline at end of file
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.

Bump to change before pre-release

@fivetran-avinash fivetran-avinash added docs:ready Triggers the docs generator workflow. pre-release Triggers the auto-releaser workflow. labels Aug 12, 2025
fivetran-joemarkiewicz and others added 5 commits August 26, 2025 13:45
* bugfix/invoice-bundles

* additional bundle updates and minor global tax update

* minor updates

* Update README.md

* Update CHANGELOG.md

* review updates
@fivetran-avinash fivetran-avinash added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. pre-release Triggers the auto-releaser workflow. labels Aug 28, 2025
@fivetran-avinash fivetran-avinash added the pre-release Triggers the auto-releaser workflow. label Aug 28, 2025
@fivetran-avinash fivetran-avinash added docs:ready Triggers the docs generator workflow. and removed docs:ready Triggers the docs generator workflow. labels Aug 28, 2025
@fivetran-avinash
Copy link
Copy Markdown
Contributor Author

Closing this, as we have released newer versions of this package and [PR #179] now handles the latest update.

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

Labels

docs:ready Triggers the docs generator workflow. pre-release Triggers the auto-releaser workflow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants