Repository navigation
fix: preserve fractional invoice line unit prices - #160
Closed
Bortlesboat wants to merge 1 commit into
Closed
Bortlesboat wants to merge 1 commit into
Bortlesboat wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #163, which contains only the SQL model change requested in #159. The fixtures, tests and generated docs remain here for reference.
Resolves #159
Please provide your name and company
Bortlesboat, contributing independently.
Describe what this PR changes and how it addresses the linked issue or feature request.
Fallback invoice line unit prices retain fractional values when an integer amount is divided by quantity. PostgreSQL previously truncated those values, including negative adjustments. Zero-quantity handling and the existing currency-conversion behavior are preserved.
How did you validate the changes introduced within this PR, and what warehouse did you use for testing?
The PostgreSQL regression failed on three fractional values before the fix and passed afterward. The full model build passed 78 nodes; a separate all-tests run passed all 16 tests, including the new regression. The focused regression also passed with currency conversion enabled and disabled. Checked-in docs were regenerated from PostgreSQL with credit-note models enabled.
Full DuckDB and cloud-warehouse execution remain unverified.
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