Well it depends on exactly what data you like to show in the report. Generally you should NEVER user the "Sales Invoice Header" or "Sales Invoice Line" tables for statistical purposes. As you might know, then the default code allows the user to delete a posted sales invoice as long as it has been posted. Instead you should base your reports/statistics on actual entry tables, like in your case either the Customer Ledger Entry or Value Entry tables. If you still go ahead with the Sales Invoice Line table, then you should recheck the requirements, to find out what to do with any sales which may have been credited again. So you may need to include the Sales Credit Memo Line table into the report to get the correct amount.
↧