I want to calculate the Total Invoice Revenue coming via Infs API
I can see there are three tables:
- Invoice Item
- Invoice Payments
Needed some help and clarity in the formulae that we should use to get the Total, Gross Total of Revenue using these three tables, columns and variables involved and the filters that should be used. Questions below
- What filters should we use to remove orders that were refunded/not paid etc? Any other filters to be used here for totals and gross totals - discounts etc?
- What’s the difference between “TotalDue” and “TotalPaid” in Invoice table?
- What should the final formulae of “Totals” and “Gross Totals” look like?
Let me know your thoughts/answers or point me to the right directions, please. Thanks!