Skip to content

fix: preserve fractional invoice line unit prices - #160

Closed
Bortlesboat wants to merge 1 commit into
fivetran:mainfrom
Bortlesboat:fix/fractional-invoice-unit-prices
Closed

Bortlesboat wants to merge 1 commit into
fivetran:mainfrom
Bortlesboat:fix/fractional-invoice-unit-prices

Conversation

@Bortlesboat

@Bortlesboat Bortlesboat commented Oct 8, 2026 •

Copy link
Copy Markdown

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

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] Fractional unit prices are truncated on PostgreSQL

1 participant