Skip to content
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

Update sales receipt discount logic to provide negative amounts #130

Merged

Conversation

fivetran-avinash
Copy link
Contributor

@fivetran-avinash fivetran-avinash commented Jun 18, 2024

PR Overview

This PR will address the following Issue/Feature: [#127]

This PR will result in the following new package version: Will be folded into a wider release.

Not a breaking change, no columns are being removed, just modified in the existing logic.
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:

  • Adjusted logic for discount sales receipt lines in int_quickbooks__sales_receipt_double_entry model to bring in these values properly as negative adjusted amounts in the quickbooks__general_ledger.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt run –full-refresh && dbt test
  • dbt run (if incremental models are present) && dbt test

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked, tagged, and properly assigned
  • All necessary documentation and version upgrades have been applied
  • docs were regenerated (unless this PR does not include any code or yml updates)
  • BuildKite integration tests are passing
  • Detailed validation steps have been provided below

Detailed Validation

Please share any and all of your validation steps:

Consistency tests are passing on seed data! I provided a small filter for the adjusted_amount tests in case of minuscule amount differences that might come up in warehouses but would not cause issues with the eventual amount calculation.

Screenshot 2024-06-26 at 2 38 24 PM

If you had to summarize this PR in an emoji, which would it be?

☎️

@fivetran-avinash fivetran-avinash self-assigned this Jun 18, 2024
@fivetran-avinash fivetran-avinash changed the title Update sales receipt logic to be negative Update sales receipt discount logic to provide negative amounts Jun 18, 2024
mikerenderco and others added 6 commits June 20, 2024 14:19
Updated line 39 amount to a case statement flipping the sign for all sales receipt discounts.
Update int_quickbooks__sales_receipt_double_entry.sql
@fivetran-avinash fivetran-avinash marked this pull request as ready for review June 26, 2024 18:39
@fivetran-avinash fivetran-avinash changed the base branch from main to release/v0.14.0 June 26, 2024 18:41
Copy link
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 this looks great! Thanks for working through this and your validation tests made the review very straightforward!

I have a few minor suggestions and then one question in the sales_receipt model regarding if the account model still needs to be brought in. Let me know once all comments are addressed and I can re-review. Thanks!

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
integration_tests/dbt_project.yml Outdated Show resolved Hide resolved
Copy link
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 making the changes! This looks good to merge into the release branch!

Copy link
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!

@fivetran-avinash fivetran-avinash merged commit f49f442 into release/v0.14.0 Jun 26, 2024
8 checks passed
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.

3 participants