How to know shipping origin per OrderLine? #3706
imacks
announced in
How-to Guides
Replies: 1 comment
-
Hi, Maybe you can do something like this:
Alternatively, you should also be able to use the relation of OrderLine -> Allocation -> StockLocation which exists in the data model to access the information directly by DB query, without the need for the above. Let me know if that is helpful. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
I'm coming at this from a US tax perspective, though I suspect it may be even more nuisanced if we are to consider all tax jurisdictions in the world.
Broadly speaking, you may need to know both the seller's shipment origin address and the shipping address in order to calculate sales tax within the US. My idea is to extend StockLocation with a custom struct field called TaxAddress. To my dismay, there is no way to figure out which StockLocation is picked at the point where a draft Order is about to transition to ArrangingPayment state.
Describe the solution you'd like
OrderLine should have a field to indicate which StockLocation is used. This field needs to be populated when an product variant is added to cart.
Describe alternatives you've considered
Extend Seller with tax address field. But this won't work if the seller has nexus in more than 1 state.
Additional context
To cater to US sales tax, an OrderProcess is added that modifies the tax related fields in the Order just before the order transitions to ArrangingPayment. Internally, we would need to call an external service like taxjar.
Beta Was this translation helpful? Give feedback.
All reactions