-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Added vat exempt logic #14577
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
base: develop
Are you sure you want to change the base?
Added vat exempt logic #14577
Conversation
🦋 Changeset detectedLatest commit: 38f41b3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 76 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@pepijn-vanvlaanderen is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Summary
What — What changes are introduced in this PR?
Added a vat exempt flag for the getTaxLines to use. It is based on the cart or order metadata or defaults to false.
Why — Why are these changes relevant or necessary?
In europe if you sell outside your counry VAT is exempt for businesses entering a valid VAT number. By adding this PR changes, you can easily set the metadata key of vat_exempt to true and make sure vat is not charged.
How — How have these changes been implemented?
Extended the normalizeTaxModuleContext, added retrieval of cart/order metadata to be passed to getItemsTaxLinesStep
Testing — How have these changes been tested, or how can the reviewer test the feature?
Wrote patches for client projects, also added an integration test.
Checklist
Please ensure the following before requesting a review:
yarn changesetand follow the promptsNote
Introduces VAT exemption support driven by
order/cartmetadata.vat_exempt.metadatain cart/order query fields and pass through tax workflowsTaxCalculationContextwithvat_exemptand populate it innormalizeTaxModuleContextSystemTaxService.getTaxLinesto return 0% rates for items and shipping whenvat_exemptis trueWritten by Cursor Bugbot for commit 38f41b3. This will update automatically on new commits. Configure here.