Skip to content

PTHMINT-133: Ensure fixed-point formatting in CartItem.add_tax_rate_p…#69

Open
zulquer wants to merge 1 commit into
masterfrom
PTHMINT-133
Open

PTHMINT-133: Ensure fixed-point formatting in CartItem.add_tax_rate_p…#69
zulquer wants to merge 1 commit into
masterfrom
PTHMINT-133

Conversation

@zulquer

@zulquer zulquer commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes an issue in CartItem.add_tax_rate_percentage where converting the calculated tax rate ratio to a string via str(rating) could produce scientific exponential notation (such as '0E-10' or '1E-8') when handling Decimal objects with negative exponents.

When '0E-10' is sent in the API payload, it fails to match zero-tax rule keys (e.g. '0') in checkout_options.tax_tables.alternate, causing shopping cart validation errors.

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.

1 participant