MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Expert Configurator > Programs > Sales Order Entry/Pricing Configurator Process - Purpose > Sales Order Entry/Pricing Configurator Process - Calculations

Sales Order Entry/Pricing Configurator Process - Calculations

EC210E

A.   Housekeeping

1.   Common Processing routines - Housekeeping

2.   Workfields are defined and program constants are initialized.

3.   The following information is retrieved from the Reference file.

a.   The operating system's file access codes are retrieved from category 015.  If this record is not found, the program ends abnormally.

b.   The date format record (category 049) is retrieved.  If record is not found, the date format defaults to MMDDYY, a message is sent to the system operator, and processing continues.

4.   Retrieve number of decimals for quantity fields.

5.   An array with ten to the power of one through six is loaded to convert packed decimal fields.

B.   Mainline

1.   The sales order line options or the quote order line options if called from OP170E, the part master information, and the group and subgroup information are retrieved.  The options are loaded into the Options Array.

2.   All distribution rules for the part are processed if the part is configured for distribution.

a.   Starting with the virtual rule, the first released rule for the part is retrieved.

(1)  If it is a *ALL rule, the *ALL and rule version numbers are compared to the part's distribution rule version number.

(2)  If it is a group rule, the part is checked to see if it is a member of the group and the group and rule version numbers are compared to the part's distribution rule version number

(3)  If it is a subgroup rule, the part is checked to see if it is a member of the subgroup and the subgroup and rule version numbers are compared to the part's distribution rule version number.

(3A)  If the rule is a configured component rule, the new part is retrieved and processing begins at Mainline step 2a.

(4)  If it is a specific part rule, the rule version number is compared to the part's distribution rule version number.

b.   If a rule is found, it is processed.

(1)  If debug is active, the rule information is saved for end debug.

(2)  If the rule is a screen rule, the screen is processed, displayed, and validated.

(3)  If the rule is a standard rule, the condition, resultant 1, and resultant 2 are processed according to action code.

(3A)  If the rule is a configured component rule, the new part is retrieved and processing begins at Mainline step 2a.

(4)  If the rule is an end debug rule, the debug screen is processed, displayed, and validated.

(5)  If an error occurred, the processing is ended and the error flag is set to on.

c.   The rules are retrieved recursively.  First, the rules released by the current rule are retrieved.  When they have all been retrieved, the rules released by the parent rule of the current rule are retrieved.

d.   If there are no more distribution rules and debug is active, the debug screen is processed, displayed, and validated.

3.   If a finalize date rule was found, calculate the commit date.

4.   All pricing rules for the part are processed if the part is configured for pricing rules and no errors occurred during the processing of the distribution rules.

a.   The same retrieval and processing procedures used for the distribution rules are used for the pricing rules.

5.   If an error occurred during processing of distribution or pricing rules and debug is active, the debug screen is processed, displayed, and validated.

6.   If command key 3 (F3-Exit) is pressed, the processing is ended and the Options file is not updated.

7.   The Configuration Template is retrieved for all configured parts and configured component parts from the Configuration Template Master (EC160M).  The values for each element in the template are retrieved.  These values can be options, secondary variables, global variables, internal variable, or literals.

8.   Once the Configuration Code and Expanded Configuration Code are created for each configured part and configured component part, the Sales Order Options file (EC200M) and the Quote Order Options file (EC200M2) are updated with the Configuration Code.

9.   The Configuration Code file (EC140M) is checked.  If the Part Number/Configuration Code combination does not exist it is added.  If a finalize cost rule was executed, the Standard Material Cost and Total Standard Cost fields are updated.  If necessary, the Expanded Configuration Code is also added.

10.  If no errors occurred during the processing of either rule types, the Sales Order Options file or the Quote Order Options file is updated and the program returns to OP100E.  However, if the item being configured is a configured component, then processing returns to the rules which invoked the configured component.

a.   If pricing rules or finalize date rules were processed, a parameter is returned to OP100E signifying that the price or date was configured.