CalcualteExtendedQuantity

Calculate the Extended Quantity

Minor Business Rule

Object Name: B3000370

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
Calculate the extended quantity by keeping track of the quantity in a linked list


2.Technical Specifications


2.5Processing 

Edits:

work fields

TempBatchQuantity 
TempRequestedQuantity


1.0 If cDeleteAllNodes  =  '1'.  Destroy the linked list set DS nNodeCount = 0 and return.
1.1 If DS mnUnitsBatchQuantity = 0 the assign TempBatchQuantity = 1. Otherwise assign  

TempBatchQuantity = DS mnUnitsBatchQuantity

1.2 If DS mnRequestedQuantity = 0 the assign TempRequestedQuantity = 1. Otherwise assign 

TempRequestedQuantity = DS mnRequestedQuantity

1.3 if DS nNodeCount = 0 Create Linked List

1.4 if   DS cFixedOrVariableQty   = 'F'  or (cFixedOrVariableQty =  '%'    and DS 

mnUnitsBatchQuantity = 0) assign DS mnExtendedQuantity = DS mnQuantity

1.5 If the DS nLevel  = 0 then 

DS  Extended Quantity  =  DS mnQuantity  * TempRequestedQuantity 

/ mnTempBatchQuantity

1.6 if DS nLevel != 0 then Get the next link list item starting at the first 

item nLevel times.                           

DS  Extended Quantity  =  DS mnQuantity  * Link List Quantity  / 

mnTempBatchQuantity 

1.7 Delete all nodes below current node and decrement node count incase the 

level is higher that previous(i.e. going form Level 1, 2, 3, 4, 2, 2, 2, 3, 

4, 1)

1.8 Add Extended cost to link list increment node count. 


Data Structure

D3000370 - Calcualte Extended Quantity

Parameter NameData ItemData TypeReq/OptI/O/Both
mnQuantityQTYMATH_NUMERICNONENONE

The number of units associated with an asset.

mnExtendedQuantityQTYMATH_NUMERICNONENONE

The number of units associated with an asset.

cDeleteAllNodesMODEcharNONENONE

The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed.

mnUnitsBatchQuantityBQTYMATH_NUMERICNONENONE

The quantity of finished units that you expect this bill of material or routing to produce. You can specify varying quantities of components 
based on the amount of finished goods produced. For example, 1 ounce of solvent is required per unit up to 100 units of finished product. 
However, if 200 units of finished product is produced, 2 ounces of solvent are required per finished unit. In this example, you would set up batch 
quantities for 100 and 200 units of finished product, specifying the proper amount of solvent per unit.

cFixedOrVariableQtyFORQcharNONENONE

A code that indicates if the quantity per assembly for an item on the bill of material varies according to the quantity of the parent item 
produced or is fixed regardless of the parent quantity. This value also determines if the component quantity is a percent of the parent quantity. Valid 
values are:    F Fixed Quantity    V Variable Quantity (default)    %   Quantities are expressed as a percentage and must total 100%For 
fixed-quantity components, the Work Order and Material Requirements Planning systems do not extend the component's quantity per assembly 
value by the order quantity.

nLevelINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

idPointerToLinkedListGENLNGIDNONENONE

General purpose ID variable.

nNodeCountINT02integerNONENONE

Number of Days in the Past to Query for Quote Requests Received. 

mnRequestedQuantityBQTYMATH_NUMERICNONENONE

The quantity of finished units that you expect this bill of material or routing to produce. You can specify varying quantities of components 
based on the amount of finished goods produced. For example, 1 ounce of solvent is required per unit up to 100 units of finished product. 
However, if 200 units of finished product is produced, 2 ounces of solvent are required per finished unit. In this example, you would set up batch 
quantities for 100 and 200 units of finished product, specifying the proper amount of solvent per unit.

Related Functions

None

Related Tables

None