MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Order Processing > Programs > Open Order Shipping/Billing Entry - Purpose > Open Order Shipping/Billing Entry - Calculations

Open Order Shipping/Billing Entry - Calculations

OP120E

A.   Housekeeping

1.   See the Common Processing Routines - Housekeeping section of this manual for a general description of this subroutine.  Processing specific to this program is described below.

2.   The Company Name, Manufacturing Company and Warehouse, Lot Control Option, and Balances Available for Distribution are retrieved from the System Control file (CT100M).

3.   Arrays and fields are initialized from the Reference file (REFERP).

4.   G61 category code is used to retrieve document format code. 

B.   Mainline

Control is passed among the following six screens.

1.   Open Order Shipping and Billing Function Select screen (OP120S01).

From the select screen, a request is made to ship and potentially bill (if Consolidated Invoicing flag is N) a previously entered sales order.  Shipping and billing entry can be made for all unshipped warehouses on an order, or for a specific unshipped warehouse on the order.  To ship all warehouses on the order, the warehouse is left blank; only the company, order number, and document type are entered.  To ship a specific warehouse, the company and warehouse are entered on the select screen along with the other fields mentioned above.  The following processing is performed:

a.   The select screen is displayed.  Command  keys are available for command line, exit, valid values prompting, and to rekey data.

b.   The select screen request is validated.  See the Order Processing User Manual for validation rules.  In addition to screen field validation, the Accounts Receivable/Accrued Receivable or Cash and Cash Discount, and Tax General Ledger Account Numbers to be used in billing the order are retrieved/validated to ensure that the billing activity can be completed.

A check is also made to determine if recovery/restart processing is required, or if the warehouse has already been shipped and billed for the Order Number entered.  This check is performed by accessing the logical Sales Order Header Workfile (OP120AL1) to see if a header record is already present in the workfile for this order.  If the header record is present, an external program (CF600C) monitors whether the failed shipment requires recovery.  If it does require recovery, one of the two following conditions must be met:

·     The job number on the Sales Order Header file (OP100M1), for the failed shipment must NOT be active on the system.  (No spool files for the failed shipments job can exist on the system.)

·     The shipment requested must be recovered by the same user from the same workstation, and with the same job number as when it failed.

If the job is not active, the Online Processing Complete Flag on the Shipping/Billing Header Workfile for that order is checked.  If the flag is equal to "No," the shipment can be recovered.

c.   The header, line, discount detail, and comment workfile records are written using the data from the sales order files.  If the product class has been changed on the Part Master file since the Sales Order Line was entered, the Workfile Line written from the Sales Order Line will NOT reflect the change.

d.   If lots were reserved during order entry, the Line Location Workfile is created, and the lines are priced and marked as shipped.

e.   If the document type is not cash sale, credit checking is performed.  The credit check program is not called if Reference File category D38 specifies that credit checking is not performed at shipping, or if the customer is exempt from credit checking (CMCRTP = 0).  See the CRDCHK program description in this manual for a discussion of this processing.

f.    The order is locked with a shipping/billing lock from category D01 of the Reference file.  If the order being shipped is a release, the parent order is locked with a parent lock from category D01 of the Reference file.  This prevents the order (and the parent, if applicable) from being maintained simultaneously by two users.

g.   If all fields are valid, the following conditions determine which screen is displayed next:

Condition to Display

Screen Display

A recovery/restart transaction is not being processed.

Open Order Shipping/Billing Header

A recovery/restart transaction is not being processed an no warning messages are to be displayed.

Open Order Shipping/Billing Multi-line

A recovery/restart transaction is being processed.

Open Order Shipping/Billing Recap

2.   Open Order Shipping and Billing Header screen (OP120S02).

The header screen allows the maintenance of order level data.  The following processing is performed:

a.   The header screen is displayed.  All data displayed is based on the sales order header values and system defaults.

b.   Command keys are available to prompt for valid values, to access the header pricing and discounting information, to display the recap screen, cancel shipment entry, and to rekey data.  If critical errors appear on the header screen, F11 (Display Recap) is not displayed and is disabled.

c.   The screen is validated.  See the Order Processing User Manual for validation rules.

d.   If all fields are valid, the following occurs:

(1)  The original exchange rate is saved so that sales order totals that change can be converted to bookkeeping currency using a consistent exchange rate.

(2)  In a change transaction, if any of the header pricing or discounting information has been changed, each line on the order is processed.  If the line is open, and the line's price is not firm, then the line is repriced and control totals are updated.

(3)  If any header screen fields have been changed, the header workfile record is retrieved and updated.

e.   The following conditions determine which screen is displayed next:

Condition to Display

Screen Display

The Comments field contains N.

Open Order Shipping/Billing Multi-Line

The Comments field contains Y.

Open Order Shipping/Billing Comments

The previous screen was the multi-line screen.

Open Order Shipping/Billing Multi-Line

The previous screen was the line detail screen.

Open Order Shipping/Billing Line Detail

The previous screen was the recap screen.

Open Order Shipping/Billing Recap

The previous screen was the comment screen.

Open Order Shipping/Billing Multi-Line

3.   Open Order Shipping and Billing Multi-Line screen (OP120S04).

The multi-line screen allows the entry of detail shipping transactions against existing sales order lines, and the addition of new lines to be shipped.  Only one shipping transaction may be entered at a time due to the possibility of multiple stock locations and/or balance types and/or lot numbers being used to fill the order line.  The following processing is performed:

a.   The multi-line screen is displayed.

b.   Command keys are available to display the header, line detail, or recap screen.  If any errors are displayed on the multi-line screen, these command keys are not displayed and are disabled.  In addition, command keys are available to prompt for valid values, to cancel shipment entry and to rekey data.

c.   The input line on the screen is validated.  See the Order Processing User Manual for validation rules.

d.   If all fields are valid, the following occurs:

(1)  Inventory update calculations are performed based on the shipment detail entered.

(2)  Pricing is performed.  See the PRICING program description in this manual.

(3)  Costing is performed.  See the COSTING program description in this manual.

(4)  Gross margin checking is performed.  See the Common Processing Routines - Gross Margin Checking section of this manual.

(5)  Tax processing is performed.

(6)  Value added tax processing is performed.

(7)  Weight and volume calculations are performed.  See the Common Processing Routines - Weight and Volume Calculations section of this manual.

(8)  Unit of measure conversions are performed when necessary.  See the Common Processing Routines - Unit of Measure Conversion section of this manual.

(9)  Open item and sales order control totals are incremented at a later point by an external control totals program (OP225E).

(10) Records are updated or added to the line workfile, the discount detail workfile, and line location workfile.  The multi-line subfile is updated with the new line information.  If an order contains a bundle, the bundle header is not displayed.

(11) The Serial Number Assignment Window (OP112W01) is processed if item is serial controlled.

e.   Control is then passed to the multi-line or recap screen:

Condition to Display

Screen Display

The last line of the line subfile has not been displayed.

Open Order Shipping/Billing Multi-Line

The last line of the line subfile has been displayed.

Open Order Shipping/Billing Recap

4.   Open Order Shipping and Billing Line Detail screen (OP120S05).

The line detail screen allows maintenance of detail information for shipped sales order lines.  The following processing is performed:

a.   The line detail screen is displayed.

b.   Command keys are available to display the multi-line, header, recap, serial number assignment, a window with pricing and discounting information, or comments screen.  If any errors are displayed on the line detail screen, these command keys are not displayed and are disabled.  In addition, command keys are available to prompt for valid values, to cancel shipment entry and to rekey data.

c.   If all fields are valid, the following occurs:

(1)  If the line status has changed to closed, line close processing is performed and the following steps are bypassed.

(2)  Inventory update calculations are performed based on the shipment detail changes entered.

(3)  Pricing is performed if any of the following fields have changed:  Ship Quantity, Ship Unit of Measure, Unit Price, Price Code, Shipped Extended Price, Price Unit of Measure, Customer Discount Percent, Price List Code, Pricing Date, and the Apply Discount Flag.  See the PRICING program description in this manual.

(4)  Costing is performed.  See the COSTING program description in this manual.

(5)  Gross margin checking is performed if the Unit Price, the Unit Cost, or the Unit of Measure has changed.  See the Common Processing Routines - Gross Margin Checking section of this manual.

(6)  Tax processing is performed if the Extended Price, the tax flag, or the VAT Code has changed.

(7)  Weight and volume calculations are performed if the Order Quantity or Unit of Measure has changed.  See the Common Processing Routines - Weight and Volume Calculations section of this manual.

(8)  Unit of measure conversions are performed when necessary.  See the Common Processing Routines - Unit of Measure Conversion section of this manual.

(9)  Open item and sales order control totals are incremented at a later point by an external control totals program OP225E.

(10) Records are updated on the line workfile, the discount detail workfile, and line location workfile.  The multi-line subfile is updated with the new line information.

d.   The following conditions determine which screen is displayed next:

Condition to Display

Screen Display

The previous screen was the multi-line, and the last line for the order was not displayed.  The information for the next line location (or subfile line) is displayed.

Open Order Shipping/Billing Line Detail

The previous screen was the recap, and all the selected lines have not yet been displayed.  The next line that was selected is displayed.

Open Order Shipping/Billing Line Detail

The previous screen was the multi-line, and all Multi-Line lines have been displayed.

Open Order Shipping/Billing Multi-Line

All other cases.

Open Order Shipping/Billing Recap

5.   Open Order Shipping and Billing Recap screen (OP120S06).

The recap screen allows the user to end shipping and billing entry.  It provides a summary of all lines shipped and billing totals.  The following processing is performed:  Before the Recap screen is displayed it is formatted and during the format a subroutine is executed to restore the BOL selection window  fields. 

a.   The recap screen is displayed.  Lines for which warning errors have been detected are flagged with an asterisk (*) in the Select field.  For a bundle, the header line is not displayed.

b.   Command keys are available to display the multi-line, header, or comments screen.  If any critical errors are displayed on the recap screen, these command keys are not displayed and are disabled.  In addition, command keys are available to process a ship complete transaction and to end detail shipment entry. The "Ship Complete" (F20) command key can only be used if all lot-controlled parts have been shipped or closed from the multi-line screen.  It should only be used if no discrepancies exist between actual shipped quantities and the released quantities printed on the picker.

c.   The screen is validated.  See the Order Processing User Manual for validation rules.

d.   If all fields are valid, the following occurs:

(1)  If an X has been entered into the Select field for any line:

(a)  If the Enter key was pressed, the line detail screen for the specified line is displayed.

(b)  If F12 (Display Comments) was pressed, the comment screen for the first specified line is displayed.  Subsequent use of the Enter key displays comments for each line record in the recap subfile.

(2)  Control totals are updated at a late point by an external control totals program (OP225E).

e.   If F20 (Ship Complete) was pressed, ship complete processing is performed:

(1)  The request is validated.  If any lot-controlled lines have not been shipped and do not have lots and locations specified from order entry, the request is rejected.  If the relief code is manufacturing and a default balance type has not been specified, an on-hand balance type will be defaulted.  However, if the relief code is distribution and a default type distribution and a default type have not been specified, the request is rejected.  A critical error is written to the recap screen, and the remaining processing is bypassed.

(2)  For each line requested for shipment that has not been shipped and is not closed, valid line processing is performed (see step 3d).

(3)  End shipment processing is performed (see step 5f).

f.    If F22 (End Shipment) was pressed, ship entry end processing occurs:

(1)  A Shipping/Billing Transaction file (OP120BP) record is written.  This triggers the shipping and billing update process by the Open Order Shipping and Billing Update program (OP125E).

(2)  The header workfile is updated to indicate that entry processing is complete for this order shipment.

(3)  The select screen is displayed.

g.   F8 key is used to display the BOL Document Selection screen.  Customer is retrieved for Direct distribution and on this screen the user can prompt for command code, BOL release code, customer document format, command document format and customer invoice print and a subroutine is executed to save the BOL selection window field.  In case of error, an error message is displayed. 

6.   Open Order Shipping and Billing Comments screen (OP120S08).

The comments screen allows the maintenance of comment records for an order. Up to 99 comments can be entered for the sales order header record.  In addition, up to 99 comments can be entered for each line on the order.

Each comment has an associated Print Code, which determines where the comment will be printed, and whether the comment will be written to the Open Item Comment file by the update program (OP125E).  To close a comment line, both the Print Code and comment text must be blanked out.  The following processing is performed:

a.   If the comments being displayed are for the order header, the lower portion of the screen will be displayed.  The Print Codes, Message Codes, and Message Decodes are displayed using values from the Sales Order Header file.  These fields can be maintained on the comments screen.

b.   If the comments being displayed are for a specific line on the order, the lower portion of the screen will not be displayed.

c.   If an extended comments code is entered, the screen is redisplayed with the associated description.  If the print code is entered or changed, it is also validated.

d.   Command keys are available to display the header or recap screen.  If any errors are displayed on the comments screen, these command keys are not displayed and are disabled.  In addition, command keys are available to prompt for valid values and to rekey data.

e.   The screen is validated.  See the Order Processing User Manual for validation rules.

f.    If all fields are valid, the following occurs:

(1)  The comments are posted to the Shipping/Billing Comment Workfile (OP120AP3).

(2)  If the comments displayed were for the header, and if any of the customer message information stored on the header has been changed, these changes are posted to the Shipping/Billing Header Workfile (OP120AP1).

g.   The following conditions determine which screen is displayed next:

Condition to Display

Screen Display

A valid line number was entered on the comments screen.  The comments for the selected line are displayed.

Open Order Shipping/Billing Comments

More comments exist on the comment subfile.  The next page of the comment subfile is displayed.

Open Order Shipping/Billing Comments

The previous screen was the recap screen and all line comments for all lines on the recap screen have not been displayed.  The comments for the header are displayed first; then the comments for each line are displayed in order.

Open Order Shipping/Billing Comments

The previous screen was the recap screen, and all line comments for all lines on the recap screen have been displayed.

Open Order Shipping/Billing Recap

The previous screen was the header screen.

Open Order Shipping/Billing Multi-Line

The previous screen was the line detail screen.

Open Order Shipping/Billing Line Detail

C.   Mainline Electronic Data Collection Operation

1.   In Electronic Data Collection operation the select screen (OP120S01) is replaced by another select screen (OP120S10).  From the select screen orders from the transaction file (OP120EP) are either selected or deleted.

a.   The select screen is displayed.  Command keys are available for exit and fast path.

b.   The select screen request is validated as select (X), delete (D) or no selection made.

2.   Subsequent validation of the order is similar to the non-Electronic Data Collection operation.  However, the header screen (OP120S02) is not displayed.  No changes are allowed.

3.   The Multi-Line Screen (OP120S04) remains in the Electronic Data Collection operation.

a.   The multi-line screen is displayed.

b.   Command keys are available to prompt for valid values, to display select screen and to rekey data.

c.   Validation and update processing is similar to non-electronic data collection operation with the exceptions that the Recap Screen (OP120S06), the Billing Line Detail Screen (OP120S05), and the Billing Comments Screen (OP120S09) are not displayed.  The shipment is completed, and a trigger is written to OP120BP2.

4.   The transaction is deleted from the Error Transaction file (OP120EP).

OP120E Program Menu