Documentation >
MAC-PAC Technical Library >
Distribution >
Purchasing >
Programs >
Vendor Quota Calculation - Purpose >
Vendor Quota Calculation - Calculations
Vendor Quota Calculation - Calculations
PO285E
A. Housekeeping
1. Parameter and key lists are established, fields are defined and initialized, Help and Error Message information is retrieved, and general processing information is retrieved from the Reference file (REFERP).
B. Mainline
1. The program reads a record from the Item/Vendor Relationship file (PO140M1).
a. Each time a record is read from PO140M1 the following information is validated: the Item/Vendor Relationship Status, if a Planned Quantity has been defined, and the Vendor Status. Once this information is validated, it is posted to the Report file (PO590EP).
b. For each valid record the Quota Calculation is processed. To do this, the program reads the Purchase Order Line Logical file (PO180L17) and checks the date and quantity . To be valid: the Date must be between the Effectivity Date and the Expiration Date, the Planned Quantity this year must not be greater than the maximum Line Quantity allowed.
c. The Planned Quantity and the maximum Line Quantity are then converted to SKU to be used in the Quota Calculation. The Date and Vendor information is saved.
(1) The program calculates the percentage allocated and updates the Item/Vendor Relationship file (PO140M1) with the new percentage The percentage is calculated as follows:
(a) If the quota is calculated by Item/Vendor Planned Quantity
Vendor Quota = Vendor Planned Quantity Sum of Vendors Planned Quantities
(b) If the quota is calculated by Item/Vendor Quantity Not Received
Vendor Quota = Quantity Not Received Sum of Vendors Planned Quantities
(2) The program quits processing if all vendors have reached their budgeted quantity. If this is the case, the Item/Vendor Relationship file (PO140M1) is updated.
d. Information from the updated files is then written to the Quota Transaction file (PO285CP).
2. Once this program has completed, the Quota information is passed back to the Vendor Allocation Update program (PO280E).