Consider linking Returns, Claims, and Swaps with Refunds created for help with tax reporting. #3896
dwene
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a tax reporting system in the US. Similar to the Shopify Sales Tax CSV export.
In the US, if we refund a line item, we also need to refund the sales tax. Medusa does this automatically for us hooray! But, it's difficult to know which line-item was refunded, so we know how much tax to return. In the US we also have lots of weird tax categories that sometimes get tax exemptions. As an example, coffee is considered a grocery in Texas and therefore no sales tax is applied.
So consider the following order:
1 Bag of coffee for $15.00 + 0 tax.
1 T-Shirt from the coffee shop for $23.00 + 8.25% tax.
$5 shipping + 8.25% sales tax. ( because shipping is taxable in Texas :/ )
Total: $45.31
If the customer doesn't like the shirt we create a return in Medusa, and when the return is received, a refund is applied to the order.
However, when the refund is created, it does not have any reference back to the original return, except that the created_at date will be very close.
So when we do tax reporting on the order, there is a refund indicating is that there was a return, and refund of $24.90.
Since we don't know which line-item the refund was attached to, we're currently averaging the refund across all line items ((order.total - order.refunded_total) / order.total), which in this case causes the customer to have to report more sales tax than they would have had to report if we could know which line items were refunded.
If we could have line-item accuracy on refunds we would know that the only sales tax that needs to be reported is $5 * 0.0825 = $0.41
However, since we are applying the refund across the entire order, the sales tax comes out to:
(order.total - order.refunded_total / order.total) * order.tax_total
((45.31 - 24.90) / 45.31) * 2.31 = $1.04
Obviously it would be better if we could report and pay less taxes than more :)
Beta Was this translation helpful? Give feedback.
All reactions