Just for net amounts, you can go through all Orders and:
- Check if the order has any tenders or refunds:
- If it’s not a refund: Add the order->total_money->amount to the total.
- If it’s a refund: Subtract the order->refunds->refund->amount_money->amount from the total
That’s it, that should get you your “net sales”. If you want gross sales, then you need to it slightly different:
- If the order has tenders, refunds, or is in a
COMPLETED
state (100% discounted order) then… - Add the following to the total: total money, tip money, and discount money
Let me know if that helps at all.