MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Purchasing > Programs > Receipt Inquiry - Purpose > Receipt Inquiry - Calculations

Receipt Inquiry - Calculations

PO890E

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 application installed record (category 012) is retrieved to check if the order processing module is installed. 

b.   The date format record (category 049) is retrieved.  If this record is not found, the date format defaults to MMDDYY.

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 defaults record (category 133) is retrieved.  If the address format is set to the free-form format, then the display will have the address in free-form format rather than U.S. format.  If the record is not found, the program aborts.

e.   The default company/warehouse is retrieved from the workstation assignment record (category 428).

f.    The following categories are retrieved and stored in arrays for access during processing:

·      Approval status codes (category 499)

·      Quantity control status codes (category 500)

·      Quality control status codes (category 501)

6.   All valid company/warehouse combinations are retrieved from the Warehouse Description file (IC170M) and stored in the valid company/warehouse array.  The corresponding plant name is retrieved and stored in a separate array.

B.   Select

1.   The Receipt Inquiry Function Select screen (PO890S01) is initialized and displayed.

2.   The user may request one of four inquiries:

a.   The Selected Receipt inquiry displays the Receipt Inquiry Detail screen (PO890S06) if a valid Receipt Number and Receipt Line Number are entered.  If only a Receipt Number is entered, the Receipt Inquiry Header screen (PO860S05) is displayed, showing all receipt lines for the entered receipt.  The user may select any line for detail display.

b.   The Receipts by Purchase Order inquiry displays the Receipts by Purchase Order List screen (PO890S02) if a purchase order number is entered.  All receipt lines meeting the selection criteria are displayed.  The user may select any line for detail display.

c.   The Receipts by Item inquiry displays the Receipts by Item List screen (PO890S03) if a valid part number is entered.  All receipt lines meeting the selection criteria are displayed.  The user may select any line for detail display.

d.   The Receipts by Vendor inquiry displays the Receipts by Vendor List screen (PO890S04) if a valid vendor number is entered.  All receipt lines meeting the selection criteria are displayed.  The user may select any line for detail display.

3.   After the user has entered data and pressed the ENTER key, the data is validated.  See the Purchasing User Manual, Inquiry Screens-Purchasing Control, for validation rules.

4.   A priming read is performed to ensure records exist for the requested inquiry:

a.   For the Selected Receipt inquiry, the Receipt Number is used to access the Purchase Order Receipt Header file (PO210M1).  If a Line Number has been entered, the Line Number is used to access the Purchase Order Receipt Line file (PO210M2).

b.   For a Receipts by Purchase Order inquiry, the logical Purchase Order Receipt Header file (PO211ML3) is read keyed by the entered Purchase Order Number.  If a receipt is found, the Purchase Order Receipt Line file (PO210M2) is checked to see if any lines exist for the receipt.

c.   For a Receipts by Item Number inquiry, the logical Purchase Order Receipt Line file (PO212ML4) is read keyed by the entered Part Number.  If a receipt is found, the Purchase Order Receipt Header file (PO210M2) is accessed to retrieve the header information.

d.   For a Receipts by Vendor Number inquiry, the logical Purchase Order Receipt Header file (PO211ML4) is read keyed by the entered Vendor Number.  If a receipt is found, the Purchase Order Receipt Line file (PO210M2) is checked to see if any lines exist for the receipt.

5.   If no errors have occurred, the next screen is displayed.

C.   Receipts by Purchase Order List

1.   The Receipt Inquiry Receipts by Purchase Order List screen (PO890S02) is initialized and the subfile loaded with values from the logical Purchase Order Receipt Header file (PO211ML3).  Receipt lines are read on the Purchase Order Receipt Line file (PO210M2).  Each record read is checked against the selection criteria entered on the Function Select screen.  Each matching record is loaded into the subfile for display.

2.   Status decodes are retrieved from the arrays loaded in Housekeeping.

3.   The screen is displayed.

4.   The user may select one line for detail display by entering an X in the Select field.  When F4 - Display Detail is pressed, the selected line record is saved and the Receipt Inquiry Detail screen (PO890S06) is displayed.

D.   Receipts by Item List

1.   The Receipt Inquiry Receipts by Item List screen (PO890S03) is initialized and the subfile loaded with values from the logical Purchase Order Receipt Line file (PO212ML4).  The header information is retrieved from the Purchase Order Receipt Header file (PO210M1).  Each record read is checked against the selection criteria entered on the Function Select screen.  Each matching record is loaded into the subfile for display.

2.   Status decodes are retrieved from the arrays loaded in Housekeeping.

3.   The screen is displayed.

4.   The user may select one line for detail display by entering an X in the Select field.  When F4 - Display Detail is pressed, the selected line record is saved and the Receipt Inquiry Detail screen (PO890S06) is displayed.

E.   Receipts by Vendor List

1.   The Receipt Inquiry Receipts by Vendor List screen (PO890S04) is initialized and the subfile loaded with values from the logical Purchase Order Receipt Header file (PO211ML4).  Receipt lines are read on the Purchase Order Receipt Line file (PO210M2).  Each record read is checked against the selection criteria entered on the Function Select screen.  Each matching record is loaded into the subfile for display.

2.   Status decodes are retrieved from the arrays loaded in Housekeeping.

3.   The screen is displayed.

4.   The user may select one line for detail display by entering an X in the Select field.  When F4 - Display Detail is pressed, the selected line record is saved and the Receipt Inquiry Detail screen (PO890S06) is displayed.

F.   Header

1.   The Receipt Inquiry Header screen (PO890S05) is initialized and formatted with the data from the Purchase Order Receipt Header file (PO210M1).

2.   The Purchase Order Receipt Comment file (PO210M4) is accessed; if any comments exist for the current receipt, the Comments Flag is set to Y.

3.   Decodes are retrieved from the Reference file.

4.   The screen is displayed.

5.   The user may select one line for detail display by entering an X in the Select field.  When F4 - Display Detail is pressed, the selected line record is saved and the Receipt Inquiry Detail screen (PO890S06) is displayed.

G.   Detail

1.   The Receipt Inquiry Detail screen (PO890S06) is initialized and formatted with the data from the Purchase Order Receipt Line file (PO210M2), the Purchase Order Receipt Header file (PO210M1), and the Purchase Order Header file (PO180M1).

2.   The Purchase Order Receipt Comment file (PO210M4) is accessed; if any comments exist for the current receipt line, the Comments Flag is set to Y.

3.   If the Detail screen was not called from the Recap screen, the Purchase Order Receipt Parcel file (PO210M3) is accessed to see if parcels exist for the receipt.  If parcels are found, a flag is set to display the F16 - Display Parcels command key.

4.   Decodes are retrieved from the Reference file.

5.   The Difference Quantity is calculated as the Counted Quantity minus the Listed Quantity.

6.   The screen is displayed.

7.   If a command key is pressed, it is processed.

H.   Recap

1.   The Receipt Inquiry Recap screen (PO890S07) is initialized and formatted with the data from the Purchase Order Receipt Line file (PO210M2).

2.   The screen is displayed.

3.   If a command key is pressed, it is processed.

I.    Comment Header

1.   The Receipt Inquiry Comment Header screen (PO890S08) is initialized.  All comments with a Line Number equal to 000 are retrieved for the current receipt from the Purchase Order Receipt Comment file (PO210M4) and loaded into a subfile.

2.   The screen is displayed.

3.   If a command key is pressed, it is processed.

J.   Comment Line

1.   The Receipt Inquiry Comment Line screen (PO890S09) is initialized.  The receipt line information is retrieved from the Purchase Order Receipt Line file (PO210M2).  All comments for the current receipt are retrieved from the Purchase Order Receipt Comment file (PO210M4) and loaded into a subfile.

2.   The screen is displayed.

3.   If a command key is pressed, it is processed.

K.   Parcel

1.   The Receipt Inquiry Parcel screen (PO890SA) is initialized.  The parcel information is retrieved from the Purchase Order Receipt Parcel file (PO210M3) and loaded into a subfile.

2.   The screen is displayed.

3.   If a command key is pressed, it is processed.

PO890E Program Menu