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

Fix: The "total" column of the shipping order-lines in the database doesn't include taxes #2034

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Conversation

tvlokven
Copy link
Contributor

@tvlokven tvlokven commented Dec 10, 2024

When prices are stored exclusive of tax, the subtotal should exclude taxes, and the total should include taxes.

The issue occurs because the CalculateTax pipeline adds the tax to the cart's shippingTotal, but not to the shippingAddress' shippingTotal. The address' shippingTotal is then used by the CreateShippingLine pipeline to create the record in the lunar_order_lines table.

Screenshot of the lunar_order_lines table, filtered to only show the shipping lines:

image

Also: The TestTaxDriver doesn't take into account whether prices are stored inclusive of tax or not, which results in it calculating the wrong taxBreakdown if they are.

…oesn't include taxes. This is because the shippingTotal is retrieved from the Cart's shippingAddress, and the taxes aren't added to that shippingTotal by the CalculateTax pipeline.

Also: The TestTaxDriver doesn't take into account whether prices are stored inclusive of tax or not, which results in it calculating the wrong taxBreakdown if they are.
Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 11:04am

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