Information Systems:IN-CUSTSLS - Customer Sales History
Purpose
This program summarizes customer sales and displays a detailed breakdown of item categories.
Notes
Markup class changes
This program relies on one main stats file, which is WEBPRDD/WSCSTSLS2P (query this file to see what it looks like if curious). This file is built nightly by the program BLDCSTSL2 (click here to see it in the overnight CL script), erasing the current month's records. Markup classes change on a regular basis, and because the markup class for brand name drugs is hard-coded (i.e. is a constant variable) in BLDCSTSL2, the code needs to be altered to reflect changes to the markup classes. The source can then be recompiled and the program will continue to run nightly, now with the correct information. The relevant code:
0153.00 c* eval ppmarkup = 'RX 8/10 8/10' 140417 0154.00 c* uwd4 eval ppmarkup = 'RX 8/8.665' 150401 0155.00 c* eval ppmarkup = 'RX 8/9.193' 160708 0156.00 c eval ppmarkup = 'RX 8/9.695' 160708
Note: Notice how the old statements have been commented out (the asterisk beside the c).
Out of balance with Sales from Transactions
This program is used heavily by finance/management at the beginning of each month. The results (dollar amounts) are often compared with those retrieved from another Infonet program - Sales from Transactions. A small dollar amount difference between the two (at the summary level or the store level) is normal, but when they're out by a considerable amount, IT will be asked to troubleshoot. Obviously, an imbalance can arise from a many number of factors (our job to find out), but consider that the 2 programs are essentially comparing the following:
- Sales for a given customer within a date range, as derived from the invoice detail file.
- Sales for a given customer within a date range, as derived from the Analyser files (namely, ANOBAL).
Thus, it is highly likely that the problem stems from out-of-sync Analyser files, the fix for which involves rebuilding customer summary levels (try 111 or 115). The comparison as described above should also point out another key point - that the A/R and G/L files are not directly involved here.