Documentation >
MAC-PAC Technical Library >
Distribution >
Order Processing >
Programs >
Postbilling And Memo Entry - Purpose >
Postbilling And Memo Entry - Calculations
Postbilling And Memo Entry - Calculations
OP130E
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 System Control file (CT100M) is accessed to obtain the Company Name, the Manufacturing Company and Warehouse, the four Balance Types, and the planning flags. If the Balance Types or planning flags are not found, the program ends.
3. Arrays and fields are initialized from the Reference file.
4. The AR Days Overdue Exception Days field is retrieved from Reference File category 412 for use in credit checking.
5. If called from the RMA Receipt Control program (OP215E), the fast path and inquiry function keys are disabled. A flag is also set in order to perform processing for RMA.
6. Category G61 is used to retrieve Document format types.
B. Mainline
Control is passed among the following six screens.
1. Postbilling and Memo Entry Function Select screen (OP130S01).
From the select screen, an invoice, debit memo, credit memo or cash sale transaction may be selected. The Company/Warehouse, Customer Number, and Document Type are required. The following processing is performed:
a. The select screen is displayed. Command keys are available for exit, command, select, recovery, and to rekey data.
b. If F4 - Prompt is pressed and cursor is positioned on a promptable field, a valid values program is called. A list of valid values for the fields is then displayed.
c. If F8 (Recover Document) is selected, a document number field is then displayed. Any document needing recovery can be entered. An external program (CF600C) checks that one of the following recovery conditions is met:
· The transaction must be recovered by the same user, from the same workstation, and with the same job number as when it failed.
· If F20 - Call Customer Maintenance program.
· The job for the failed transaction must NOT be active on the system. (No spool files for the failed transaction's job exist on the system.)
If one of the two conditions has been met, the transaction can be recovered. If the job is not active, the header status for the document is checked. If the header status is equal to "NEW", the document can be recovered.
d. If F14 - Toggle to Payment Entry/Application is pressed, the program calls the Payment Entry and Application program (AR120E). The Payment Entry and Application program has single-path exiting capability from its payment processing screen to the Postbilling and Memo Entry screen.
e. The select screen request is validated. See the Order Processing User Manual for validation rules.
f. Credit checking is performed if the document type is not cash sale or credit memo, and if the credit check flag on the Customer Master file is not zero (indicating that the customer is exempt from credit checking). Credit checking uses a total order amount of zero. See the CRDCHK program description in this manual for a discussion of this processing.
g. If the transaction is valid, the Postbilling and Memo Entry Multi-line Screen is displayed.
2. Postbilling and Memo Entry Header screen (OP130S02)
The header screen allows entry of transaction level data. The following processing is performed.
a. If the header has not been posted previously (that is, an add transaction), the header information is displayed using default values. Otherwise, the values from the logical Open Item file (AROPENL7) are displayed. In Add mode document format code and customer is retrieved from ARADDRP file and validation is done against the document format code array.
b. A command key is available to display header pricing/discounting information.
c. A command key is available to display the recap screen. If no lines have been posted or if errors are displayed on the header screen, this command key is not displayed and is disabled. A command key is also available to display a list of valid values for a selected field.
d. The screen is validated. See the Order Processing User Manual for validation rules.
e. If all fields are valid, the following occurs:
(1) The date on the screen is posted to the Open Item Header file.
(2) If it is a change transaction, and if any of the Customer Discount Percentages have been changed, each distribution line is repriced and control totals are updated. See the PRICING program description in this manual for a discussion of this processing.
f. The following conditions determine which screen is displayed next:
|
|
An add transaction is being processed and the Comments field contains N.
|
Postbilling and Memo Entry Multi-Line
|
The previous screen was the multi-line screen.
|
Postbilling and Memo Entry Multi-Line
|
The previous screen was the line detail screen.
|
Postbilling and Memo Entry Line Detail
|
The previous screen was the recap screen.
|
Postbilling and Memo Entry Recap
|
The Comments field contains Y.
|
Postbilling and Memo Entry Comments
|
3. Postbilling and Memo Entry Multi-Line screen (OP130S03)
The multi-line screen allows the addition of line records. Up to seven line records can be added or changed per multi-line screen.
Only two items must be entered for a line add: the Part Number and Order Quantity. The following processing is performed.
If processing for RMA Receipt Control and this is first time into multi-line screen, the multi-line screen is loaded with receipt status codes from the open RMA. This processing occurs when the Inv Adj or Customer Credit status are waiting.
a. The multi-line screen is displayed.
b. Command keys are available to display the line detail, header, or recap screen. If any errors are displayed on the multi-line screen, these command keys are not displayed and are disabled. Also, if no lines are posted, the command keys to display the line detail and recap screens are not displayed and are disabled. F4 - Prompt is also available to display a list of valid values for a selected field.
c. The screen is validated. See the Order Processing User Manual for validation rules.
d. If all fields are valid, the following occurs:
(1) Quantity calculations are performed:
(a) The sign (positive or negative) of the New Shipped Quantity is determined.
(i) The sign is reversed if all three of the following conditions are met:
· The inventory addition flag for the adjustment code is no.
· The inventory reduction flag for the adjustment code is no.
· A credit memo is being processed.
(ii) The sign is reversed if the inventory addition flag for the adjustment code is yes.
(b) If the New Shipped Quantity does not equal the New Order Quantity, a warning message is written.
(2) Pricing is performed. See the PRICING program description in this manual for a discussion of this processing.
(3) Costing is performed. See the COSTING program description in this manual for a discussion of this processing.
(4) Gross margin checking is performed. See the Common Processing Routines - Gross Margin Checking section of this manual for a discussion of this processing.
(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 for a discussion of this processing.
(8) Unit of measure conversions are performed when necessary. See the Common Processing Routines - Unit of Measure Conversion section of this manual for a discussion of this processing.
(9) Control totals are incremented.
(10) The logical Open Item Distribution file (ARDISTP) is updated.
(11) The Open Item Discount Detail file (ARDSCP) is updated.
e. The subfile record is updated.
f. The following conditions determine which screen is displayed next:
|
|
The subfile page being displayed contains seven line items. (The next page of the subfile is displayed.)
|
Postbilling and Memo Entry Multi-Line
|
The subfile page being displayed does not contain seven line items.
|
Postbilling and Memo Entry Recap
|
g. If the part is serial controlled, the serial number assignment window is automatically displayed.
4. Postbilling and Memo Entry Line Detail screen (OP130S04)
The line detail screen allows the maintenance of detail information for the line. Only line changes can be processed from this screen. The following processing is performed.
a. The line detail screen is displayed.
b. A command key is available to access the pricing and discounting information for the line.
c. Command keys are available to display the multi-line, header, recap, serial number assignment, or comments screen. If any errors are displayed on the line detail screen, these command keys are not displayed and are disable.
d. The screen is validated. See the Order Processing User Manual for validation rules.
e. If all fields are valid, the following occurs:
(1) Quantity calculations are performed. See step 3d of this program description for a discussion of this processing.
(2) Pricing is performed. See the PRICING program description in this manual for a discussion of this processing.
(3) Costing is performed. See the COSTING program description in this manual for a discussion of this processing.
(4) Gross margin checking is performed. See the Common Processing Routines - Gross Margin Checking section of this manual for a discussion of this processing.
(5) Tax processing is performed.
(6) VAT processing is performed.
(7) GST/PST Processing is performed. See the GSTCHK program description in this manual for a discussion of the processing.
(8) Weight and volume calculations are performed. See the Common Processing Routines - Weight and Volume Calculations section of this manual for a discussion of this processing.
(9) Unit of measure conversions are performed when necessary. See the Common Processing Routines - Unit of Measure Conversion section of this manual for a discussion of this processing.
(10) Control totals are incremented.
(11) The logical Open Item Distribution file (ARDISTP) is updated.
f. The subfile record is updated.
g. The following conditions determine which screen is displayed next:
|
|
The previous screen was the multi-line, and the last line for the transaction has not been displayed. The detail for the next line is displayed.
|
Postbilling and Memo Entry Line Detail
|
The previous screen was the recap, and all the selected lines have not yet been displayed. The next line selected will be displayed.
|
Postbilling and Memo Entry Line Detail
|
The previous screen was the multi-line and all lines have been displayed.
|
Postbilling and Memo Entry Multi-Line
|
All other cases.
|
Postbilling and Memo Entry Recap.
|
5. Postbilling and Memo Entry Recap screen (OP130S05)
The recap screen allows the user to end the transaction. It provides a summary of all lines posted and the transaction totals. The following processing is performed:
a. The Gross Sales, Total Discount, Net Amount and Tax Amount are calculated. Although the Freight Amount is displayed as a positive number, it is calculated as a negative number when determining the Net Amount.
b. Credit checking is performed if the document type is not cash sale or credit memo, and if the credit check flag on the Customer Master file is not zero. (If the credit check flag is zero, the customer is exempt from credit checking.) See the CRDCHK program description in this manual for a discussion of this processing.
c. The recap screen is displayed. Lines that have warning errors are associated with them are flagged with an asterisk (*) in the Select field.
d. Command keys are available to display the multi-line, header, or comments screen. If any errors are displayed on the recap screen, these command keys are not displayed and are disabled.
e. The screen is validated. See the Order Processing User Manual for validation rules.
f. If all fields are valid, the following occurs:
(1) If an X has been entered into the Select field for any line, or if a valid Line Number has been entered:
(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 comments screen for the specified line is displayed.
(2) Control totals are updated.
(3) If documents have been requested, the appropriate print flag is set on.
g. If a cancel transaction is being processed each line is closed. All comments associated with the line are closed, and the header record and header comments are closed.
h. If all fields are valid and F22 (End Billing) is pressed, end transaction processing occurs:
(1) If this is not a cancel transaction, but all the lines are closed, the header record is closed.
(2) Line master file updates are performed if necessary. The master files that may be updated are:
· Accounting Transaction file (AR510AP)
· Part Master file (DE100M)
· Multiple Location file (IC130M)*
· Configuration Code file (EC140M)
· Warehouse Balance file (IC140M)
· Sales History file (OP120M)
· Sales History Discount Detail file (OP120M2)
*The Multiple Location file (IC130M) is updated if either the Inventory/Value Addition flag or the Inventory/Value Reduction flag is set to Y for the associated adjustment code.
A record is written to the Configuration Code file (EC140M) if the configuration code does not exist in the warehouse where the transaction took place.
Balance fields and year-to-date activity are updated on the Warehouse Balance file if either Inventory/Value flag is set to Y.
Part statistics fields are updated on the Warehouse Balance file if the Update Part Statistics flag is set to Y.
(3) The Part Master file (DE100M) is only updated if the net change flag was set on.
(4) Line audit trail and transaction register records and associated error message records are written.
(5) Comment audit trail and transaction register records are written.
(6) Freight processing is performed if a freight amount has been entered. See the Common Processing Routines - Process Freight Amount section of this manual for a discussion of this processing. Audit trail and transactions register records for the freight line are written.
(7) If this is a non-VAT environment, tax processing is performed.
(8) The appropriate master files are updated. The master files that may be updated are:
-
Customer Master file (ARCUSTP)**
-
Customer Name and Address file (ARADDRP)**
-
Accounts Receivable Activity file (ARLOGP)
-
Open Item Header file (AROPENP)
-
Accounting Transaction file (AR510AP)
-
RMA Header (OP145M1)
** These files are updated only if the Update Customer Statistics flag for the adjustment code used is equal to Y.
(9) If the Invoice Release Code on the open item header is immediate, a record is written to the Open Item Print Request file (OP535AP).
i. Audit trail and transactions register records and associated error message records for the header are written.
j. The select screen is displayed with a message indicating that the transaction was successfully posted or canceled.
6. Postbilling and Memo Entry Comment screen (OP130S06)
The comments screen allows the maintenance of comment records for a transaction. Up to 99 comments can be entered for a header record and 99 comments can be entered for each line. Also, predefined extended comment codes can be entered. Each order header and each order line may have one extended comment only.
Each comment and each extended comment has an associated print code, which determines where and when the comment will print. 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 header, the lower portion of the screen is displayed. The Print Codes and Message Codes are displayed with default values from the Customer Master file. The Message Codes are decoded using the Reference file. If extended comments are being entered for the header, the comment code and print code must be entered. The print code is validated against Reference File category 410. The extended comment code is checked to ensure it exists on the Extended Comments Header file. If the code is found, a short decode is moved to the screen field. If the print code is not entered, one is defaulted from the Extended Comments Header file. The extended comments are used by batch programs. If the comments being displayed are for a specific line, the lower portion of the screen will not be displayed. Extended comments can be entered one for each line in the same manner as for the header.
b. 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. If no lines are posted, the "Display Recap" command key is not displayed and is disabled. F4 - Prompt is available to display a list of valid values for a selected field.
c. The screen is validated. See the Order Processing User Manual for validation rules.
d. If the fields are valid, the following occurs:
(1) The comments are posted to the Open Item Comments file. Extended comments are posted to the Open Item Header or Open Item Detail file.
(2) If the comments displayed were for the header, and if any of the comment information stored on the header was changed, these changes, including extended comments, are posted to the Open Item Header file.
e. The following conditions determine which screen is displayed next:
|
|
A valid line number was entered on the comments screen. The comments for that line are displayed.
|
Postbilling and Memo Entry Comments
|
If more comments exist on the comment subfile, the next page of the comment subfile is displayed.
|
Postbilling and Memo Entry Comments
|
The previous screen was the recap screen and all the comment records for 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.
|
Postbilling and Memo Entry Comments
|
An add transaction is not being processed, and the previous screen was the header screen.
|
Postbilling and Memo Entry Header
|
The previous screen was the recap and all comment records for the line have been displayed.
|
Postbilling and Memo Entry Recap
|
An add transaction is being processed and the previous screen was the header screen.
|
Postbilling and Memo Entry Multi-Line
|
The previous screen was line detail screen.
|
Postbilling and Memo Entry Line Detail
|