Skip to content

fix(core): Use tax-inclusive amount when cancelling shipping with pricesIncludeTax#4370

Draft
BibiSebi wants to merge 1 commit intomasterfrom
fix/oss-360-cancel-order-shipping-tax-remainder
Draft

fix(core): Use tax-inclusive amount when cancelling shipping with pricesIncludeTax#4370
BibiSebi wants to merge 1 commit intomasterfrom
fix/oss-360-cancel-order-shipping-tax-remainder

Conversation

@BibiSebi
Copy link
Collaborator

Summary

  • When cancelling an order with cancelShipping=true and pricesIncludeTax=true, the shipping cancellation adjustment used the tax-exclusive discountedPrice instead of the tax-inclusive discountedPriceWithTax
  • This left a remainder equal to the tax amount on the shipping cost
  • Now uses discountedPriceWithTax when listPriceIncludesTax=true so the adjustment fully zeroes out shipping

Test plan

  • Added e2e test: cancels order with pricesIncludeTax=true and verifies shipping, shippingWithTax, and totalWithTax are all 0
  • Existing cancellation by orderId tests still pass

Fixes #4348

@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vendure-storybook Ready Ready Preview, Comment Feb 17, 2026 1:16pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/oss-360-cancel-order-shipping-tax-remainder

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Cancelling an order leaves a shipping cost equal to the shipping tax

1 participant