Use Sales History Transaction for Sales Analysis Is Better than Invoice History

Use Sales History Transaction for Sales Analysis Is Better than Invoice History

Release Date: 07/02/2026
Version: 7.x & up

QAre you able to tell me what is calculating the total sales by sales person in the ARSLMFIL? I’m trying to find the difference between why our sales are different in invoices history, compared to the ARSLMFIL. My guess would be adjustments, finance charges, and debits that wouldn’t be calculating in the invoice history table but I wanted to be sure instead of assuming.

AThere could be many reasons why they don't reconcile, for examples:
  1. As you said, any transactions come from the AR side will not be reflected in COP invoice history, but may affect ARSLMFIL.
  2. When you calculate the sales from invoice history, watch out the order type.  For order type “C”, the line item quantity and amount are positive. Unless you adjust it in your calculation logic, otherwise, they won’t reconcile.

 

If you want to match COP and ARSLMFIL, the best table to analyze and match with is actual CPHSTTRX for the following reasons:

  • For credit memo, the sale amount in CPHSTTRX would be negative. It is easy and straight forward for sales analysis purpose.
  • The CPHSTTRX is compact result in better performance.
  • The first column of CPHSTTRX is invoice date which is the primary key. Since when you perform sales analysis, you would always specify the invoice date range, so PSQL (Zen) can actually use the provided date range with the primary key to narrow the data to make the inquiry much faster.
  • Even if CPHSTTRX does not have all the data you want, you still join with other table like ARCUSFIL, IMITMFIL or even CPINVHDR if need to.  General speaking, it will lead to faster reporting time or more accurate result.
  • So  while it sounds intuitive to use invoice history for sales analysis, but it is not the best approach.  I suggest using Sales History Transaction (CPHSTTRX) table for sales analysis.


EMK
    • Related Articles

    • BB2100 Bank Book Bank Reconcile File Maintenance

      Bank Reconcile File Maintenance Application Overview This is a maintenance file for each bank account defined in Bank File Maintenance. It contains all the deposits and checks that have been merged (Processing menu) and/or reconciled for this cash ...
    • Slow PSQL Relational Engine Performance

      Release Date: 12/15/2017 Many users encounter situations where a particular relational engine SQL query can sometimes be slow. This can be complicated to diagnose due to a lot of reasons. Sometimes it's because of a SQL SELECT statement that's not ...
    • BB3000 Bank Book Inquiry Bank Reconcile File Inquiry

      Inquiry Bank Reconcile File Inquiry Application Overview The Bank Reconcile File Inquiry gives a screen display of all checks and deposits that are in the Bank Reconcile File. This file can be manually maintained by Bank Reconcile File in the ...
    • Feature - Stock Analysis Processing

      Release Date: 10/28/16 This new feature is available under COP -> Processing -> Pick/Pack Tickets/Ship Labels-> Stock Analysis. This new feature is only available when the QTYAVAILBYCOMP, QTYAVAILBYCOM2 and QTYAVAILBYCOM3 attributes are in use. These ...
    • I Am Running Out of Invoice Numbers -- I Need Direction to Archive Invoices

      Q: Within the next 6 months we will run out of invoice numbers. I don't want to purge my invoice history because it contains valuable data that I would like to go back to in the future. So I would prefer a method to archive my invoice history instead ...