Documentation >
MAC-PAC Technical Library >
Distribution >
Purchasing >
Programs >
Purchase Order Inquiry - Purpose >
Purchase Order Inquiry - Calculations
Purchase Order Inquiry - Calculations
PO880E
A. Housekeeping
1. See Common Processing Routines - Housekeeping of this manual for a general discussion of the Housekeeping subroutine. Processing specific to this program is described below.
2. A parameter list is set up for the fast path and help screen parameters.
3. Key lists are defined for each file retrieved by the program.
4. Workfields are defined and program constants are initialized.
5. The following records are retrieved from the Reference file (REFERP):
a. The date format record (category 049) is retrieved. If this record is not found, the date format defaults to MMDDYY.
b. The following categories are retrieved and stored in arrays for access during processing:
· Vendor message codes (category 236)
· Order types (category 401)
· Purchase order types (category 437)
· Purchase order acknowledgment status codes (category 478)
c. All company/warehouses to which the user is authorized are retrieved from the user company/warehouse authorization record (category 409) and loaded into an array. If no records are found for the user, a flag is set authorizing the user to all company/warehouses.
d. The system option assignment record (category 133) is retrieved. The single/multiple currency record is checked to determine if the base currency should be displayed on the screen(s).
The address format is also checked to determine if addresses should be displayed in free-form or U.S. format.
e. Reference File category 012 is used to retrieve information regarding installation of application. In this case the category is used to screen whether the order processing module or Expert Configurator module is installed. If the OP module is installed then an indicator is set on to display the Sales Order fields. If the EC module is installed, the configuration code fields will be displayed.
f. Reference File category 492 (Purchasing System Defaults 2) is retrieved. The Delivery Performance Statistics option is used to determine whether the original promised date is displayed.
B. Select
1. The Purchase Order Inquiry Function Select screen (PO880S01) is initialized and displayed.
The company/location is validated. The base currency for the company/location is retrieved and validated. The VAT flag is also retrieved.
2. After the user has entered data and pressed the ENTER key, the data is validated. See the Purchasing User Manual, Inquiry Screens-Purchasing Planning, for validation rules.
3. The following processing occurs according to the inquiry selected:
a. Purchase Orders by Vendor: A priming read is made on the logical Purchase Order Header file (PO180ML1) to ensure at least one record that meets the selection criteria exists. If so, the Orders by Vendor List screen (PO880S02) is displayed.
b. Purchase Orders by Item: A priming read is made on the logical Purchase Order Line file (PO180ML6) to ensure at least one record that meets the selection criteria exists. If so, the Orders by Item List screen (PO880S03) is displayed.
c. Purchase Orders by Buyer: A priming read is made on the logical Purchase Order Header file (PO180ML2) to ensure at least one record that meets the selection criteria exists. If so, the Orders by Buyer List screen (PO880S04) is displayed.
d. One specific Purchase Order: The specified purchase order is retrieved from the Purchase Order Header file (PO180M1). The Vendor Header screen (PO880S05) is displayed.
4. The following command keys are available:
a. Command key F9 - Maintenance allows the user to exit this program and enter the Purchase Order Maintenance program (PO180E).
b. Command key F4 - Prompt displays a window containing the valid values for the prompted field.
c. Command key F2 - Command displays a window which enable users to prompt commands.
C. Orders by Vendor List
1. All records meeting the selection criteria are retrieved from the logical Purchase Order Header file (PO180ML1) and loaded into a subfile.
2. Decodes are retrieved from the arrays built in Housekeeping.
3. The Purchase Order Inquiry Orders by Vendor List screen (PO880S02) is displayed to the user. The user may choose any one line for detail display by entering an X in the Select field and pressing F5 - Detail. The Vendor Header screen (PO880S05) is displayed for the selected purchase order.
D. Orders by Item List
1. All records meeting the selection criteria are retrieved from the logical Purchase Order Line file (PO180ML6) and loaded into a subfile.
2. The Item Description is retrieved from the Part Master file.
3. The Purchase Order Inquiry Orders by Item List screen (PO880S03) is displayed to the user. The user may choose any one line for detail display by entering an X in the Select field and pressing F5 - Detail. The Vendor Header screen (PO880S05) is displayed for the selected purchase order.
E. Orders by Buyer List
1. All records meeting the selection criteria are retrieved from the logical Purchase Order Header file (PO180ML2) and loaded into a subfile.
2. Decodes are retrieved from the Reference file and from the arrays built in Housekeeping.
3. The Purchase Order Inquiry Orders by Buyer List screen (PO880S04) is displayed to the user. The user may choose any one line for detail display by entering an X in the Select field and pressing F5 - Detail. The Vendor Header screen (PO880S05) is displayed for the selected purchase order.
F. Vendor Header
1. If this screen is displayed directly after the Function Select screen (a Specific Purchase Order request), the data from the purchase order header record is formatted for display. If this screen is called from one of the list screens, the purchase order header record is retrieved from the Purchase Order Header file (PO180M1) for the selected purchase order.
2. Decodes are retrieved from the Reference file and from the arrays built in Housekeeping.
3. The Purchase Order Inquiry Vendor Header screen (PO880S05) is displayed to the user.
4. If the ENTER key is pressed, the Header screen (PO880S5B) is displayed.
5. The following command keys are available:
a. F2 - Displays a window which enable users to prompt commands.
b. F8 - Return to List redisplays the list screen (Orders by Vendor List, Orders by Item List, or Orders by Buyer List) that called this screen. This command key is valid only if this screen was called via a list screen.
c. F9 - Maintenance calls the Purchase Order Maintenance program (PO180E). The current Company/Warehouse, Order Number and Vendor Number are passed to the maintenance program.
d. F10 - Select ends the current inquiry and redisplays the Function Select screen.
e. F11 - Recap displays the Recap screen (PO880S06) for the current purchase order.
f. F12 - Comments displays the Header Comment screen (PO880SA) for the current purchase order; this command key is valid only if the Comments Flag equals Y (comments exist).
G. Header
1. Data from the purchase order header record is formatted for display.
2. Decodes are retrieved from the Reference file and from the arrays built in Housekeeping.
3. If the Order Type is Direct then an indicator is turned on to display the Sales Order fields.
4. A priming read is performed on the Purchase Order Comments file (PO180M4) for the current purchase order. If header comments are found (a record exists for line 00), the Comments Flag is set to Y; otherwise, it is set to N.
5. The Purchase Order Inquiry Header screen (PO880S5B) is displayed to the user.
6. The following command keys are available:
a. F2 - Command displays a window which enable users to prompt commands.
b. F8 - Return to List redisplays the list screen (Orders by Vendor List, Orders by Item List, or Orders by Buyer List) that called this screen. This command key is valid only if this screen was called via a list screen.
c. F9 - Maintenance calls the Purchase Order Maintenance program (PO180E). The current Company/Warehouse, Order Number and Vendor Number are passed to the maintenance program.
d. F10 - Select ends the current inquiry and redisplays the Function Select screen.
e. F11 - Recap displays the Recap screen (PO880S06) for the current purchase order.
f. F12 - Comments displays the Header Comment screen (PO880SA) for the current purchase order; this command key is valid only if the Comments Flag equals Y (comments exist).
H. Recap
1. Each purchase order line for the current purchase order is retrieved from the logical Purchase Order Line file (PO180ML7) and formatted in a subfile for display.
2. Decodes are retrieved from the arrays built in Housekeeping. The Item Description is retrieved from the Part Master file (DE100M).
3. Cost fields are calculated.
a. The Net Amount is calculated as follows:
· if in a U.S. tax environment: Total Purchase Amount (POTOPA) plus the Tax Amount (POTXMT).
· if in a VAT environment: Total Purchase Amount (POTOPA) plus the VAT Amount (POVAAM).
· in a GST environment: Total Purchase Amount (POTOPA) plus the GST Amount (POVAAM) plus the PST Amount (POTXMT).
b. The Balance Due is calculated as the Current Order Quantity (PHPUOQ) minus the Current Received Quantity (PHPURQ).
c. The Extended Price is calculated as the Total Ordered Quantity (PHTQPU) times the Purchasing Unit Cost (PHUNCT).
4. The Purchase Order Inquiry Recap screen (PO880S06) is displayed to the user. The user may choose any one line for detail display by entering an X in the Select field and pressing F14 - Display Line Detail.
5. The following command keys are available:
a. F2 - Command displays a window which enable users to prompt commands.
b. F8 - Return to List redisplays the list screen (Orders by Vendor List, Orders by Item List, or Orders by Buyer List) that called this screen. This command key is valid only if this screen was called via a list screen.
c. F9 - Maintenance calls the Purchase Order Maintenance program (PO180E). The current Company/Warehouse, Order Number and Vendor Number are passed to the maintenance program.
d. F10 - Select ends the current inquiry and redisplays the Function Select screen.
e. F12 - Comments displays the Line Comment screen (PO880SB) for the selected purchase order line; this command key is valid only if the Comments Flag equals Y (comments exist).
f. F14 - Line Detail displays the Line Detail screen (PO880S07) for the selected purchase order line.
g. F16 - Release List displays the Release List screen (PO880S08) for the current purchase order. If the line is for a phantom order, the Release List (Phantom Order) screen (PO880S09) will be displayed instead. This option is valid only if release records exist on the Purchase Order Release file (PO180M3) for the current purchase order.
I. Line Detail
1. The purchase order line record is retrieved from the Purchase Order Line file (PO180M2) and formatted for display.
2. Decodes are retrieved from the arrays built in Housekeeping.
3. The Purchase Order Inquiry Line Detail screen (PO880S07) is displayed to the user.
4. The following command keys are available:
a. F2 - Command displays a window which enable users to prompt commands.
b. F8 - Return to List redisplays the list screen (Orders by Vendor List, Orders by Item List, or Orders by Buyer List) that called this screen. This command key is valid only if this screen was called via a list screen.
c. F9 - Maintenance calls the Purchase Order Maintenance program (PO180E). The current Company/Warehouse, Order Number, Part Number and Purchase Order Line Number are passed to the maintenance program.
d. F10 - Select ends the current inquiry and redisplays the Function Select screen.
e. F11 - Recap redisplays the Recap screen (PO880S06).
f. F12 - Comments displays the Line Comment screen (PO880SB) for the current purchase order line; this command key is valid only if the Comments Flag equals Y (comments exist).
g. F14 - Displays the Expanded Configuration Code Window for Configuration Coded Parts.
h. F16 - Release List displays the Release List screen (PO880S08) for the current purchase order. If the line is for a phantom order, the Release List (Phantom Order) screen (PO880S09) will be displayed instead. This option is valid only if release records exist on the Purchase Order Release Detail file (PO180M3) for the current purchase order.
J. Release List
1. All release records for the selected purchase order are retrieved from the Purchase Order Release Detail file (PO180M3) and formatted for display.
2. The Part Description is retrieved from the Part Master file.
3. The Purchase Order Inquiry Release List screen (PO880S08) or Purchase Order Inquiry Release List (Phantom Order) screen (PO880S09) is displayed to the user.
4. The following command keys are available:
a. F2 - Command displays a window which enable users to prompt commands.
b. F10 - Select ends the current inquiry and redisplays the Function Select screen.
c. F11 - Recap redisplays the Recap screen (PO880S06).
d. F12 - Comments displays the Line Comment screen (PO880SB) for the current purchase order line; this command key is valid only if the Comments Flag equals Y (comments exist).
K. Comment Header and Comment Line
1. All comment records for the selected purchase order header or line are retrieved from the Purchase Order Comment file (PO180M4) and formatted for display.
2. Decodes are retrieved from the Reference file and from the arrays built in Housekeeping.
3. The Purchase Order Inquiry Comment Header screen (PO880SA) or Purchase Order Inquiry Comment Line screen (PO880SB) is displayed to the user.
4. The following command keys are available:
a. F2 - Command displays a window which enable users to prompt commands.
b. F8 - Return to List redisplays the list screen (Orders by Vendor List, Orders by Item List, or Orders by Buyer List) that called this screen. This command key is valid only if this screen was called via a list screen.
c. F9 - Maintenance calls the Purchase Order Maintenance program (PO180E). If pressed from the Header Comment screen, the current Company/Warehouse and Order Number are passed to the maintenance program. If pressed from the Line Comment screen, the current Company/Warehouse, Order Number, Line Number and Part Number are passed to the maintenance program.
d. F10 - Select ends the current inquiry and redisplays the Function Select screen.
e. F11 - Recap redisplays the Recap screen (PO880S06).
f. F14 - Line Detail redisplays the Line Detail screen (PO880S07) if the Line Comment screen was called from it. This command key does not appear on the Header Comment screen.
g. F16 - Release List redisplays the Release List screen (PO880S08 or PO880S09) if the comment screen was called from it.