-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
docs(create tax provider): tax line code required #5540
Conversation
|
@nickmonad 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.
Thank you for your contribution! I've added suggestions on how we can add notes explaining the unique constraint on item_id, code
and shipping_method_id, code
…r.md Co-authored-by: Shahed Nasser <[email protected]>
…r.md Co-authored-by: Shahed Nasser <[email protected]>
@shahednasser Done! |
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.
LGTM! Thanks for your contribution!
@shahednasser I ran into this issue as well. I created a custom tax provider but forgot to set the tax_code in the medusa interface: This resulted in some order having trippled VAT lines. Why is this field not enforced as required in the medusa interface? *edit: when I try to edit the rate, the VAT code is enforced. Somehow I ended up having |
Hi @BorisKamp can you open an issue with this? |
Hey! Done: |
While I was developing a custom tax provider, I ran into a pretty frustrating issue related to multiple tax lines and incorrect / unexpected tax total calculations. I outlined the issue in discord, before finding the solution: https://discord.com/channels/876835651130097704/1169705457804398662
After some digging, I found this issue from a while back: #1262, where it states there is now a unique constraint on
item_id, code
andshipping_method_id, code
. But, in the current documentation for creating a custom tax provider, it states these fields as part of the tax line items returned are optional.If these
code
values are left out, it can cause tax lines to be applied multiple times (as seen here as well: #1901)I'm not entirely sure how this should be phrased in the documentation, so I just wanted to get this up and on your radar for resolution. If it ends up being that
code
truly should not be optional, I suspect some type definitions would need to change as well?