Documentation >
MAC-PAC Technical Library >
Distribution >
Order Processing >
Programs >
Contract Price File Maintenance - Purpose >
Contract Price File Maintenance - Calculations
Contract Price File Maintenance - Calculations
OP140E
A. Housekeeping
1. See the Common Processing Routines - Housekeeping section of this manual for a general discussion of this subroutine. Processing specific to this program is described below.
2. The following information is retrieved from the Reference file (REFERP):
a. The company name is retrieved from the entity name record (category 002).
b. The date format record (category 049) is retrieved.
c. Decimal precision for cost field is retrieved from Reference File category 446.
3. The select screen is formatted.
a. The key fields are cleared.
b. All error indicators are set to off.
c. program Status is set to Prompt.
B. Mainline
Control is passed between the following two screens:
1. Contract Price File Maintenance Function Select screen (OP140S01).
From the select screen, a request is made to add, change or delete price information. If desired, effectivity and expiration dates relating to a particular entry may be entered. For all three transactions either a Corporate Number or Customer Number is required. However, both may not be entered for the same transaction.
a. The select screen is displayed. Command keys are available to exit, fast path, rekey data and transfer to the Contract Price Inquiry program (OP810E).
b. The select screen request is validated. See the Order Processing User Manual for validation rules.
c. program status is set to multi-line and the header portion of the multi-line screen is formatted.
(1) Either the Corporate or Customer heading will be displayed depending on what is entered on the select screen.
(2) If customer number is entered, the appropriate salesperson's name and number are retrieved from the Reference File (category 315).
d. Price information for the desired customer is retrieved from the Contract Price file (OP140M).
e. This price information is loaded into the multi-line subfile.
(1) File fields are moved to subfile and corresponding hidden fields.
(2) The subfile record is written.
(3) The next price record is retrieved.
f. When the subfile has been loaded, the multi-line screen is displayed.
2. Contract Price File Maintenance Multi-Line (OP140S02).
This screen allows the addition and maintenance of line records to the Contract Price file (OP140M). Up to five hundred line records can be added or changed per multi-line screen. The following processing is performed:
a. The multi-line screen is displayed. Command keys are available to exit, fast path, rekey data, transfer to the Contract Price Inquiry program (OP810E) and display rebate information.
b. Each line on the screen is validated. If a line is valid, processing occurs as described in steps 2c, d and e. If a line is found to be invalid, the remaining lines are validated and posted. See the Order Processing User Manual for validation rules.
c. If all fields are valid and the line is to be added, the following occurs:
(1) The displayed screen fields are moved to the file fields.
(2) The creation fields and last maintenance fields are initialized.
(3) The Contract Price file (OP140M) record is written.
(4) The Audit Trail and Transaction Register records are written.
d. If all fields are valid and the line is to be changed, the following occurs:
(1) The displayed fields are compared to the hidden fields.
(2) If anything changed, the Contract Price file (OP140M) is updated with the new values.
(3) The Audit Trail and Transaction Register records are written.
e. If all fields are valid and the line is to be deleted, the following occurs:
(1) Blanks are moved to all subfile fields.
(2) The record is deleted from the Contract Price file (OP140M).
(3) The Audit Trail and Transaction Register records are written.
f. After maintenance has been completed, program status is set to Prompt and the select screen is redisplayed.