-
Notifications
You must be signed in to change notification settings - Fork 347
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
Map customer code to a metadata field in the Taxes App #1189
Map customer code to a metadata field in the Taxes App #1189
Conversation
🦋 Changeset detectedLatest commit: 4313ea0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Ignored Deployments
|
Please remember about the docs (or add in issue to update them later) |
f727049
to
9b80364
Compare
@@ -27,6 +27,7 @@ export class AvataxEntityTypeMatcher { | |||
return result.value?.[0].code || this.returnFallback(); | |||
} | |||
|
|||
// Now that we get the customer code from user metadata, maybe we should get the entity code from the same place? |
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.
Question: should it be marked as TODO?
Co-authored-by: Jonatan Witoszek <[email protected]>
Co-authored-by: Jonatan Witoszek <[email protected]>
Context
Taxes App synchronizes a group of fields from Saleor to an AvaTax transaction. Some of these fields are used to determine the tax value (e.g. the customer code).
The general approach is to use the Saleor field that matches the purpose of the AvaTax field the most. However, users sometimes want to override that value with their own. This usually comes into play when multiple other systems (where e.g. one system manages the customers) collaborate on the tax calculation.
Scope of the PR
UserFragment
everywhereChecklist
Note
This PR isn't breaking. If the metadata field is not found, the app will fall back as usual. We will add the migrations next week.