Hi there,
the refunded tax amount is being removed from the report: https://github.com/vendidero/one-stop-shop-woocommerce/blob/main/src/AsyncReportGenerator.php#L157
In case a refund is created within the next month a correction for the last month would be necessary (new report).
On-hold orders are not included within the report (only order statuses that WooCommerce treats as paid statuses are included).
Cheers
Hi, thank you for the answer.
Regarding the refunds I think this is not quite the best way to handle it.
Why not just handle the refunds separately the dates they are created at?
Best,
d.
Hi there,
It’s not that easy. Refund orders do not include as much data (e.g. billing details such as country, address etc.) as normal orders do. They depend on their parent order. The plugin is open to contribution though in case you can come up with a better solution: https://github.com/vendidero/one-stop-shop-woocommerce
Cheers
Again, thanks for the answer, but actually it is not very complicated to access the original order of a refund which will provide all the information necessary.
I would love to contribute, but tried to use this for a very old WC version (2.9) and of course it won’t work with it.
So I have to write my own plugin.
Hi,
no, it’s not complicated but the parent order data may change (after creating a refund), e.g. the address data, total data etc. may be adjusted without the refund knowing. Furthermore the whole order query used to find orders by their taxable country (https://github.com/vendidero/one-stop-shop-woocommerce/blob/main/src/Package.php#L498) would break because a separate join would be necessary to retrieve the refund’s parent data.
Cheers
The problem with changed order data is the same the way refunds are handled right now.
I just think it is not easy (from a user point of view) to keep track of refunds and which reports might have to be submitted again.
No, it is not the same. Right now orders (and their related refunds) are booked at the same time. In case a refund is booked (e.g. one month) later, the actual order has been booked for the previous report and the refund may be booked to a different country (as the order has changed meanwhile) in comparison to the related order.
But yes, we’ll investigate whether better solutions exist here. Technically it is not quite easy as our setup quite heavily relies on the order query functionality which does, by default, not support joining refunds with their corresponding parent to retrieve additional data (e.g. billing_country).
Cheers