I’m currently using the formula
total_price - (refund subtotal + tax) + (order_adjustment amount + tax)
where:
-
total_price is from the order,
-
subtotal is from the refund,
-
amount is from the order adjustment.
For orders and refunds, I’m using processed_at field and converting it to my timezone. For order adjustments, I’m using the processed_at from the refund. However, my calculations still don’t match the reported total sales. I don’t have any duties or fees applied to my orders. Are there any additional components or adjustments I might be missing?