Documentation >
MAC-PAC Technical Library >
Distribution >
Sales Analysis >
Programs >
Sales Statistics Post - Purpose
Sales Statistics Post - Purpose
SA100E
The Sales Statistics Post program (SA100E) updates the Sales Analysis file (SA100M) from the Sales History file (OP120M). Each valid sales history record is used to update sales statistics by period for both the current, and the previous sales years on the corresponding sales analysis record. Once posted, the sales history record is updated to indicate that it has been processed. Sales statistics are rolled from the next period into the current period fields on both the Customer Name and Address file (ARADDRP), and the Warehouse Balance file (IC140M).
If sales period 1 is being updated, the Sales Analysis file is read sequentially; and records meeting the deletion criteria are deleted. If a Sales Analysis record is not deleted, the sales statistics from the current periods are rolled into the previous year periods. Sales statistics on the Customer Name and Address file and the Warehouse Balance file are rolled from year-to-date fields into previous year fields.