-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/invoice discount consideration #85
Bugfix/invoice discount consideration #85
Conversation
Add invoice discount to invoice_double_entry [resolve #59]
Release/v0.5.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-joemarkiewicz Mostly good to go, just needs a bit of polish!
models/double_entry_transactions/int_quickbooks__invoice_double_entry.sql
Show resolved
Hide resolved
# - package: fivetran/quickbooks_source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
standard revert packages message
models/double_entry_transactions/int_quickbooks__invoice_double_entry.sql
Show resolved
Hide resolved
Co-authored-by: Avinash Kunnath <108772760+fivetran-avinash@users.noreply.github.com>
Co-authored-by: Avinash Kunnath <108772760+fivetran-avinash@users.noreply.github.com>
Thanks for reviewing @fivetran-avinash! All updates have been applied and comments have been replied to. Let me know if you have any other questions 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question about the invoice_double_entry changes but approved otherwise!
{% else %} | ||
coalesce(invoice_lines.account_id, items.income_account_id) as account_id, | ||
case when invoice_lines.detail_type is not null then invoice_lines.detail_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick clarifying question: The when clause was changed because detail_type will have the SubTotalLineDetail? What does DescriptionOnly refer to, an invoice line item ro wwhere there's an amount but no id associated with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly!
PR Overview
This PR will address the following Issue/Feature: Issue #59
This PR will result in the following new package version:
v0.9.0
This has some pretty large changes included. As such, I would be most comfortable with this update being categorized as a breaking change.
Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:
This PR in particular modifies the
int_quickbooks__invoice_double_entry
model pretty significantly to account for invoice discounts as well as leveraging the newdetail_type
field (added in November of 2021) to more accurately identify which items of the invoice line items should be considered in the downstream general ledger entries (specifically wanting to not includeSubTotalLineDetail
types.Detail Type Addition
detail_type
field instead (if available). For the records where this is not available, we will use the same coalesce statement from previous versions of the package.Invoice Discount Consideration
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
Before marking this PR as “ready for review” the following have been applied:
Detailed Validation
Please acknowledge that the following validation checks have been performed prior to marking this PR as “ready for review”:
This package was validated with a customer dataset and verified that before these changes the profit and loss statement did not tie out to the expected revenue and expense totals; however, with the changes in this PR (particularly taking into account the invoice discount) the revenue and expense totals in the downstream profit and loss statement tied out as expected.
Additionally, I was able to validate that the delta on the revenue side of the profit and loss for a given month was tied back exactly to the invoice discounts that were not previously being recorded by the package. Please discuss with @fivetran-joemarkiewicz for additional validation steps and confirmation.
Standard Updates
Please acknowledge that your PR contains the following standard updates:
dbt Docs
Please acknowledge that after the above were all completed the below were applied to your branch:
If you had to summarize this PR in an emoji, which would it be?
🥏