CalculateUnitPriceInPrimary

Standard Pricing Adjustments

Major Business Rule

Object Name: B4000870

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To calculate the unot price based on values retrieved from F4207.

Setup Notes and Prerequisites

Setup Notes and Prerequistes

• This Part should be done in ER before calling this function
• If Override List Price PMOVLP (From F4207) is not zero, use it as a price and don't need to call the 
 program:

Move PMOVLP  to UPRC;

Technical Specification




If  Basis for cost or price PMCBAS is greater or equal to '1' and less or equal '8':
Initialize the Cost Functional Server XF4105 with the following parameters:


Move IMCLEV to COCLEV;

Move PMCBAS to COLEDG;

Move ITM(3) to COITM;

Move MCU(19)to COMCU;

Move LOCN(28) to COLOCN;

Move LOTN(27) to COLOTN;


Call Cost Functional Server XF4105;

Move the Unit Cost to the Unit Price PRIC (2);


Otherwise PMCBAS is equal to 'P' based on Price 


Calculate prices  based on add on  percent:

If   Factor Value Type PMFVTY is '%',

Price UPRC (4) = PRIC (2)  times Value Factor PMFVN;

Return to calling program;


Calculate prices  based on add on amount:

If   Factor Value Type PMFVTY is '$',

Price UPRC (4) = PRIC (2)  multiplied by conversion 

factor CONV (9); 

Add Value Factor PMFVN to result;

Divide result by conversion factor CONV (9);

Return to calling program;


^

Data Structure

D4000870F - Calculate Unit Price In Primary

Parameter NameData ItemData TypeReq/OptI/O/Both
cBasisCodeCBAScharNONENONE

A costing method on which the system bases the net price of the order. For pricing and repricing, valid values are:    1   Last-In Cost    5   
Future Cost    P Unit Price    2   Average Cost    6   Lot Cost    3   Memo Cost 1    7   Standard Cost    4   Current Cost The system uses the method that 
you enter here to determine the order's net price. In sales order repricing, the system bases all reprice calculations on either the unit cost or 
price in the sales detail. Specify P if you want the system to use unit price in the sales order as the basis for reprice calculations. Otherwise, 
specify a value between 1 to 8 to use the unit cost in the sales detail as the base on value for all reprice calculations.

cFactorTypeFVTYcharNONENONE

A code that indicates whether the factor value is a multiplier (%) or an additional/deductible cash amount ($) when applied to an order's 
price.

mnFactorValueFVNMATH_NUMERICNONENONE

The discount that the system uses when it calculates the price of an item attached to this inventory pricing rule. Discounts can be expressed 
as multipliers, additional amounts, or deductible amounts. For example, a 10%discount would be expressed as .90. You can use the same 
factor for markups over cost. For example, a 10% markup would be expressed as 1.10.

idF4101PointerGENLNGIDNONENONE

General purpose ID variable.

szBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

szLotNumberLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

mnConvFctrToPricingUOMCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnPrimaryUMPricePRICMATH_NUMERICNONENONE

A base or default price that is used with multipliers from the pricing rules to develop discounted prices. If no formula applies to an item or no 
discounts apply to a customer, the system uses this price without adjustments.

mnPrimUMPriceOutputUPRCMATH_NUMERICNONENONE

The list or base price to be charged for one unit of this item. In sales order entry, all prices must be set up in the Item Base Price File table 
(F4106).

Related Functions

B4000520 Get Item UoM Conversion Factor
B4001020 Update F4101 Contract Code
XF4105 Item Cost I/O

Related Tables

F4101 Item Master
F4207 Price by Item
F4208 Price by Customer
GetCustomerPricingRules

GetCustomerPricingRules

Standard Pricing Adjustments

Major Business Rule

Object Name: B4000870

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To retrieve and compute unit price based on customer group or number and inventory rules.

Technical Specification



If contract item (IMCONT = 'Y') && PCTY != 'P',

*** GetF4208Contract Items;


If non contract item (IMCONT not = 'Y') || PCTY == 'P', 
*** GetF4208NonContractItems;

If not found (EV10 = '0')                              // added - 6/8/95
move PRIC (2) to UPRC (4)

DSPR (32) = 1;

skip ProcessInventoryPricingRules 



^

Data Structure

D4000870A - Standard Pricing Adjustments

Parameter NameData ItemData TypeReq/OptI/O/Both
mnTradeDiscountFactorTRDCMATH_NUMERICNONENONE

Percentage by which the system reduces the price of each item. This is the only discount that will be applied. You can override it if you 
enter a price. Enter the percentage as a whole number (that is, 5 for 5%).

mnPrimaryUMPricePRICMATH_NUMERICNONENONE

A base or default price that is used with multipliers from the pricing rules to develop discounted prices. If no formula applies to an item or no 
discounts apply to a customer, the system uses this price without adjustments.

mnPrimaryUMPriceOutputUPRCMATH_NUMERICNONENONE

The list or base price to be charged for one unit of this item. In sales order entry, all prices must be set up in the Item Base Price File table 
(F4106).

mnShippedQuantitySOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnPrimaryOrderedQtyPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

mnExtendedAmountAEXPMATH_NUMERICNONENONE

The number of units multiplied by the unit price.

mnConvFctrToPricingUOMCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

mnTotalWeightLBSITWTMATH_NUMERICNONENONE

The weight of one unit of an item, expressed in the primary unit of measure.

idFreeGoodsItemNumberGENLNGIDNONENONE

General purpose ID variable.

idFreeGoodsLineTypeGENLNGIDNONENONE

General purpose ID variable.

idFreeGoodsPriceGENLNGIDNONENONE

General purpose ID variable.

idItemMasterRecordGENLNGIDNONENONE

General purpose ID variable.

mnAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szCustomerPricingGroupPRGPcharNONENONE

A user defined code (system 40/type PC) identifying the pricing group associated with this customer or supplier:     o For sales orders, you 
assign a pricing group to a customer through the Customer Billing Instructions. Groups typically contain customers with common pricing 
characteristics, such as retailers, wholesalers, and so forth.     o For purchase orders, you assign a pricing group to a supplier through the Supplier 
Billing Instructions.

szInventoryPricingRulePRGRcharNONENONE

A user defined code (system 40/type PI) that identifies an inventory price group for an item. Inventory price groups have unique pricing 
structures that direct the system to incorporate discounts or markups on items on sales and purchase orders. The discounts or markups are 
based on the quantity, dollar amount, or weight of the item ordered. When you assign a price group to an item, the item takes on the same pricing 
structure defined for the inventory price group. You must assign an inventory price group to the supplier or customer, as well as to the item, for 
the system to interactively calculate discounts and markups on sales orders and purchase orders.

szBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

mnConvFctrToPrimaryCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnQuantityBackorderedSOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnQuantityCanceledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

mnQuantityShippedToDateQTYTMATH_NUMERICNONENONE

The number of units which have passed through the Sales Update process. In Workorder Processing, this field identifies the total quantity 
completed or consumed on a workorder to date basis.

cPricingTypePCTYcharNONENONE

A user defined code (42/CT) that indicates the basis for the price rule. Valid values are:    P Purchase order discounts    O Order repricing    R 
Line repricing (basket repricing)

cCommitmentCodeCOMMcharNONENONE

A value that indicates whether you specified from which Location and Lot a particular item was to come. If you specified a storage area, the 
program assigns a Hard (H) commit, and subsequent programs will not determine which Location and Lot to use to satisfy the order line. If 
you did not specify a storage area, the program assigns a Soft (S) commit and attempts to determine which Location and Lot records can best 
satisfy the order line quantity. Valid codes are:    S Soft Committed,    H Hard Committed    C Hard Committed by Commitment Program    K Kit 
Master Line (No Commitment)    N Work Order (No Commitment)

szLotNumberLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

szLocationNumberLOCNcharNONENONE

The storage location from which goods will be moved.

jdOrderDateTRDJJDEDATENONENONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

mnDiscountFactorDSPRMATH_NUMERICNONENONE

The factor that the system applies to the unit price of an inventory item to determine the net price. The system retrieves this value from the 
inventory pricing rules if you have assigned a rule to this item. The pricing rule setup determines if the system multiplies the unit price by this 
value or adds to or deducts from the unit price.

cDiscountApplicationTypeFAPPcharNONENONE

The sales order processing system uses this field to indicate the type of discount given to the sales order. Valid values are:     blank         
Regular pricing (including repricing)     1         Contract Pricing

cContractSplitLineCodeCONTcharNONENONE

  
Special Input Expected

' ' - Split SO Line if exceeding contract limit. 

'0' - Do NOT Split SO Line if exceeding contract limit.


Special Output Returned

' '  or  '0' - SO Line has not been split.
 '1' - SO Line has been successfully split.


^

szPricingRuleLevelCLVcharNONENONE

An alphanumeric code that determines the sequence in which the system displays the rules within the pricing group. You define levels when 
you set up the pricing groups.

szInventoryCategoryMCATcharNONENONE

A user defined code (40/PI) used to classify inventory by pricing rules. Typically, these categories correspond to the major sections in the 
inventory price book. You can set up as many detail categories as you need. A single code can be used for sales, purchasing, order/basket, 
and contract pricing. If you set up a contract rule, it must equal the short number for the item under contract.

mnSplitQtyShippedSOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnSplitQtyBackorderedSOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnSplitQtyCanceledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

mnSplitPrimOrderedQtyPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

Related Functions

B4000520 Get Item UoM Conversion Factor
B4001020 Update F4101 Contract Code
XF4105 Item Cost I/O

Related Tables

F4101 Item Master
F4207 Price by Item
F4208 Price by Customer
GetF4208ContractItems

GetF4208ContractItems

Standard Pricing Adjustments

Major Business Rule

Object Name: B4000870

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To fetch customer pricing rule record if the item is a contract item.

Technical Specification




6/8/95 (Remove this logic)
 Get Customer price Group F4208 by Group equals to zeros and Category 
equals item number ITM(3);

Get F4208 by Group equals to Bill To AN8(14) and Category equals item number ITM(3);
If not found, get F4208 by Group PRGP(17) and Item Number ITM(3);

If not found, update EV10 to '0'

If EV09 = '1',

Reset IMCONT to 'N' (in the F4101);

Update F4101 by ITM(3) - Item Master Table

At any point if a record is found, update EV10 to '1'.




^

Data Structure

D4000870G - Get F4208 Contract Items

Parameter NameData ItemData TypeReq/OptI/O/Both
mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

mnAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szCustomerPricingGroupPRGPcharNONENONE

A user defined code (system 40/type PC) identifying the pricing group associated with this customer or supplier:     o For sales orders, you 
assign a pricing group to a customer through the Customer Billing Instructions. Groups typically contain customers with common pricing 
characteristics, such as retailers, wholesalers, and so forth.     o For purchase orders, you assign a pricing group to a supplier through the Supplier 
Billing Instructions.

idItemMasterRecordGENLNGIDNONENONE

General purpose ID variable.

szInventoryCategoryMCATcharNONENONE

A user defined code (40/PI) used to classify inventory by pricing rules. Typically, these categories correspond to the major sections in the 
inventory price book. You can set up as many detail categories as you need. A single code can be used for sales, purchasing, order/basket, 
and contract pricing. If you set up a contract rule, it must equal the short number for the item under contract.

szPricingRuleLevelCLVcharNONENONE

An alphanumeric code that determines the sequence in which the system displays the rules within the pricing group. You define levels when 
you set up the pricing groups.

cUpdateF4101FlagEV09charNONENONE

An option that specifies the type of processing for an event.

cRecordFound1_0EV10charNONENONE

An option that specifies the type of processing for an event.

Related Functions

B4000520 Get Item UoM Conversion Factor
B4001020 Update F4101 Contract Code
XF4105 Item Cost I/O

Related Tables

F4101 Item Master
F4207 Price by Item
F4208 Price by Customer
GetF4208NonContractItems

GetF4208NonContractItems

Standard Pricing Adjustments

Major Business Rule

Object Name: B4000870

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To fetch customer pricing rule record if the item is not a contract item.



Technical Specification



Get F4208 by Group equals to Bill To AN8(14) and Category equals to Price Group PRGR(18);

If not found, get F4208 by Group PRGP(17)  and Category equals Price Group PRGR(18);

If not found, 

Update EV10 to '0'.


(remove - 6/8/95)move PRIC (2) to UPRC (4); 

At any point if a record is found, update EV10 to '1'.

Return to calling program;





Data Structure

D4000870C - Get F4208 Non Contract Items

Parameter NameData ItemData TypeReq/OptI/O/Both
szInventoryPricingRulePRGRcharNONENONE

A user defined code (system 40/type PI) that identifies an inventory price group for an item. Inventory price groups have unique pricing 
structures that direct the system to incorporate discounts or markups on items on sales and purchase orders. The discounts or markups are 
based on the quantity, dollar amount, or weight of the item ordered. When you assign a price group to an item, the item takes on the same pricing 
structure defined for the inventory price group. You must assign an inventory price group to the supplier or customer, as well as to the item, for 
the system to interactively calculate discounts and markups on sales orders and purchase orders.

szCustomerPricingGroupPRGPcharNONENONE

A user defined code (system 40/type PC) identifying the pricing group associated with this customer or supplier:     o For sales orders, you 
assign a pricing group to a customer through the Customer Billing Instructions. Groups typically contain customers with common pricing 
characteristics, such as retailers, wholesalers, and so forth.     o For purchase orders, you assign a pricing group to a supplier through the Supplier 
Billing Instructions.

szInventoryCategoryMCATcharNONENONE

A user defined code (40/PI) used to classify inventory by pricing rules. Typically, these categories correspond to the major sections in the 
inventory price book. You can set up as many detail categories as you need. A single code can be used for sales, purchasing, order/basket, 
and contract pricing. If you set up a contract rule, it must equal the short number for the item under contract.

szPricingRuleLevelCLVcharNONENONE

An alphanumeric code that determines the sequence in which the system displays the rules within the pricing group. You define levels when 
you set up the pricing groups.

mnAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

cRecordFound1_0EV10charNONENONE

An option that specifies the type of processing for an event.

Related Functions

B4000520 Get Item UoM Conversion Factor
B4001020 Update F4101 Contract Code
XF4105 Item Cost I/O

Related Tables

F4101 Item Master
F4207 Price by Item
F4208 Price by Customer
ProcessInventoryPricingRules

ProcessInventoryPricingRules

Standard Pricing Adjustments

Major Business Rule

Object Name: B4000870

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To read and apply inventory pricing levels to the customer pricing groups.

Technical Specification




Position F4207 to Pricing Method PMPCTY equals to Pricing Type PCTY (24), Pricing Category PMMCAT 

equals to PGMCAT, Pricing Level PMCLV equals to PGCLV, and Expiration Date PMCXPJ should be greater or 

equal to  Order Date TRDJ(29);


Reset a found record flag  $FOUND to '0';


Read and check Inventory Rules F4207 records while reading match records to Customer Rules F4208:


Get Inventory Pricing Rules by  Pricing Method equal to PCTY(24) and Pricing Category from F4208 

PGMCAT;


Check the following conditions to find out if the Inventory Pricing Record F4207 can be used to 

compute the special price:


If Order Date TRDJ(29) is less than Inventory Rule Effective Date PMCEFJ or TRDJ(29) 

is greater than Inventory Rule Expiration Date PMCXPJ, continue to the next 

iteration of the while(read next F4207 record and perform all lines);


This section is a comment in the business function:

If pricing rules allow Free Goods (Related Item Number PMITMR is not zeros) and PCTY (24) 

is not 'P', add a new element to the following arrays in order to add these lines to the order:

ITM(10) - Free Good Item Number,

LNTY(11) - Free Goods Line Type,

PRIC(12) - Free Good Price;

These arrays are passed to X4211FG for Free Goods processing.


Convert the Over Quantity PMOVQT of Inventory Pricing Levels to primary UOM:

If Based on UOM code PMUMC is in the range of 2 through 5:

If Based on UOM code PMUMC is 2 move IMUOM2 to #UOM and 

#UOM1;

If Based on UOM code PMUMC is 3 move IMUOM3 to #UOM and 

#UOM1;

If Based on UOM code PMUMC is 4 move IMUOM4 to #UOM and 

#UOM1;

If Based on UOM code PMUMC is 5 move IMUOM6 to #UOM and 

#UOM1;


Initialize parameters for unit of measure conversion 

program:

Move 'Y'              to  #IVI;

Move MCU(19)        to #MCU;

Move zero             to #QTY;


Call UOM Conversion Program X41002;


Convert level break quantity to primary by multiplying PMOVQT by 

#CNVQ;



If Order Quantity PQOR (6) is greater than Over Quantity, continue to the next 

iteration of the while (read next F4207 record and perform all lines);


If Based on UOM code is '$', and  the extended amount AEXP (7) is greater than Over 

Quantity, continue to the next iteration of the while (read next F4207 record and 

perform all lines);


If Based on UOM code is '#', and  the total weight ITWT (8) is greater than Over 

Quantity, continue to the next iteration of the while (read next F4207 record and 

perform all lines);


If it is a contract item (IMCONT = 'Y'),

If Contract Pricing Code PMPRTY is not 'C', continue to the next 

iteration of the while

(read next F4207 record and perform all lines);

Subtract Quantity Shipped to Date QTYT (23) from Contract Shipped to 

Date PMQTYT;


If Contract Quantity Limit PMLIM is less or equal to Contract Shipped to 

Date PMQTYT, and PMLIM is not zero, and Order Quantity PQOR (6) is 

greater than zero:

Reset IMCONT to 'N';

Update F4101 by ITM(3) - Item Master File;

Restart *** GetCustomerPricingRules;

Return to calling program;


If Contract Quantity Limit PMLIM is not zero, and Contract Shipped to 

Date PMQTYT is less or equal to zero, and  Order Quantity PQOR (6) is 

less than zero (credit order):

Reset IMCONT to 'N';

Update F4101 by ITM(3) - Item Master File;

Restart *** GetCustomerPricingRules;

Return to calling program;


Reset Remaining Quantity $#RMN to zero;


If Contract Limit is not zero:


Find Contract Available Quantity by subtracting Contract Shipped 

to Date PMQTYT from Contract Limit PMLIM;


Convert Contract Available to primary uom by multiplying Quantity 

Available by conversion factor  #CNVQ ;


Contract Remaining Quantity $#RMN (primary uom) = Ordered Quantity 

PQOR (6) less Contract Available; 

 


If PCTY (24) not equal to 'P', update Discount Application Type to contract 

by moving a '1' to FAPP(34); 

else If remaining quantity $#RMN is greater than zero, return to calling 

program.

elseupdate F4207 with new Shipped to Date Quantity PMQTYT by 

adding PQOR (6) to existing PMQTYT after dividing PQOR (6) by #CNVQ;



This F4207 Inventory Pricing Rule passed all the selection criteria and qualified for 

price calculations:


Move PMCLV to CLV(33);


If Override List Price PMOVLP is not zero, use it as a price and return to calling 

program:

Move PMOVLP  to UPRC (4) after converting to Primary UOM (divide by CONV(9));

If a contract item (IMCONT = 'Y') and  Contract Split Line Code CONT(35) is 

blank, and Pricing Type PCTY (24) is not 'P', and quantity ordered is over the 

contract available quantity  ($#RMN > 0).

Call function  *** Split Contract Line;

Return to calling program;

If  List Price SDLPRC is zero, move PRIC (2) to SDLPRC;- DO in GBR 

before calling this function.


If FVN != 1 || FVTY != '%'

Call CalculateUnitPriceInPrimary

Move Discount Factor PMFVN to DSPR(32);

If a contract item (IMCONT = 'Y') and  Contract Split Line Code CONT(35) is blank, 

and Pricing Type PCTY (24) is not 'P', and quantity ordered is over the contract 

available quantity  ($#RMN > 0).

Call function  *** Split Contract Line;

Return to calling program;

If  a contract item (IMCONT = 'Y') and no F4207 records found for contract pricing 

(PMPRTY not = 'C'), 

Reset IMCONT to 'N';

Update F4101 by ITM(3) - Item Master File

Restart *** GetCustomerPricingRules;

Return to calling program;





Data Structure

D4000870A - Standard Pricing Adjustments

Parameter NameData ItemData TypeReq/OptI/O/Both
mnTradeDiscountFactorTRDCMATH_NUMERICNONENONE

Percentage by which the system reduces the price of each item. This is the only discount that will be applied. You can override it if you 
enter a price. Enter the percentage as a whole number (that is, 5 for 5%).

mnPrimaryUMPricePRICMATH_NUMERICNONENONE

A base or default price that is used with multipliers from the pricing rules to develop discounted prices. If no formula applies to an item or no 
discounts apply to a customer, the system uses this price without adjustments.

mnPrimaryUMPriceOutputUPRCMATH_NUMERICNONENONE

The list or base price to be charged for one unit of this item. In sales order entry, all prices must be set up in the Item Base Price File table 
(F4106).

mnShippedQuantitySOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnPrimaryOrderedQtyPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

mnExtendedAmountAEXPMATH_NUMERICNONENONE

The number of units multiplied by the unit price.

mnConvFctrToPricingUOMCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

mnTotalWeightLBSITWTMATH_NUMERICNONENONE

The weight of one unit of an item, expressed in the primary unit of measure.

idFreeGoodsItemNumberGENLNGIDNONENONE

General purpose ID variable.

idFreeGoodsLineTypeGENLNGIDNONENONE

General purpose ID variable.

idFreeGoodsPriceGENLNGIDNONENONE

General purpose ID variable.

idItemMasterRecordGENLNGIDNONENONE

General purpose ID variable.

mnAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szCustomerPricingGroupPRGPcharNONENONE

A user defined code (system 40/type PC) identifying the pricing group associated with this customer or supplier:     o For sales orders, you 
assign a pricing group to a customer through the Customer Billing Instructions. Groups typically contain customers with common pricing 
characteristics, such as retailers, wholesalers, and so forth.     o For purchase orders, you assign a pricing group to a supplier through the Supplier 
Billing Instructions.

szInventoryPricingRulePRGRcharNONENONE

A user defined code (system 40/type PI) that identifies an inventory price group for an item. Inventory price groups have unique pricing 
structures that direct the system to incorporate discounts or markups on items on sales and purchase orders. The discounts or markups are 
based on the quantity, dollar amount, or weight of the item ordered. When you assign a price group to an item, the item takes on the same pricing 
structure defined for the inventory price group. You must assign an inventory price group to the supplier or customer, as well as to the item, for 
the system to interactively calculate discounts and markups on sales orders and purchase orders.

szBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

mnConvFctrToPrimaryCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnQuantityBackorderedSOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnQuantityCanceledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

mnQuantityShippedToDateQTYTMATH_NUMERICNONENONE

The number of units which have passed through the Sales Update process. In Workorder Processing, this field identifies the total quantity 
completed or consumed on a workorder to date basis.

cPricingTypePCTYcharNONENONE

A user defined code (42/CT) that indicates the basis for the price rule. Valid values are:    P Purchase order discounts    O Order repricing    R 
Line repricing (basket repricing)

cCommitmentCodeCOMMcharNONENONE

A value that indicates whether you specified from which Location and Lot a particular item was to come. If you specified a storage area, the 
program assigns a Hard (H) commit, and subsequent programs will not determine which Location and Lot to use to satisfy the order line. If 
you did not specify a storage area, the program assigns a Soft (S) commit and attempts to determine which Location and Lot records can best 
satisfy the order line quantity. Valid codes are:    S Soft Committed,    H Hard Committed    C Hard Committed by Commitment Program    K Kit 
Master Line (No Commitment)    N Work Order (No Commitment)

szLotNumberLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

szLocationNumberLOCNcharNONENONE

The storage location from which goods will be moved.

jdOrderDateTRDJJDEDATENONENONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

mnDiscountFactorDSPRMATH_NUMERICNONENONE

The factor that the system applies to the unit price of an inventory item to determine the net price. The system retrieves this value from the 
inventory pricing rules if you have assigned a rule to this item. The pricing rule setup determines if the system multiplies the unit price by this 
value or adds to or deducts from the unit price.

cDiscountApplicationTypeFAPPcharNONENONE

The sales order processing system uses this field to indicate the type of discount given to the sales order. Valid values are:     blank         
Regular pricing (including repricing)     1         Contract Pricing

cContractSplitLineCodeCONTcharNONENONE

  
Special Input Expected

' ' - Split SO Line if exceeding contract limit. 

'0' - Do NOT Split SO Line if exceeding contract limit.


Special Output Returned

' '  or  '0' - SO Line has not been split.
 '1' - SO Line has been successfully split.


^

szPricingRuleLevelCLVcharNONENONE

An alphanumeric code that determines the sequence in which the system displays the rules within the pricing group. You define levels when 
you set up the pricing groups.

szInventoryCategoryMCATcharNONENONE

A user defined code (40/PI) used to classify inventory by pricing rules. Typically, these categories correspond to the major sections in the 
inventory price book. You can set up as many detail categories as you need. A single code can be used for sales, purchasing, order/basket, 
and contract pricing. If you set up a contract rule, it must equal the short number for the item under contract.

mnSplitQtyShippedSOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnSplitQtyBackorderedSOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnSplitQtyCanceledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

mnSplitPrimOrderedQtyPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

Related Functions

B4000520 Get Item UoM Conversion Factor
B4001020 Update F4101 Contract Code
XF4105 Item Cost I/O

Related Tables

F4101 Item Master
F4207 Price by Item
F4208 Price by Customer
SplitContractLine

SplitContractLine

Standard Pricing Adjustments

Major Business Rule

Object Name: B4000870

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To split a sales order detail line if the ordered quantity exceeds the contract quantity.

Setup Notes and Prerequisites


Special Logic




Technical Specification



 /* Remaining Quantity $#RMN is Contract Quantity Limit PMLIM less Quantity Shipped PMQTYT;*/


If  Quantity Ordered PQOR(6) is negative, reverse the sign of  SOQS(5), SOBK(21) and SOCN(22);


If Quantity Backordered SOBK(21) is greater than the contract remaining quantity  $#RMN:

Move Remaining Quantity $#RMN to new split Quantity Backordered  $$SOBK;

Subtract Remaining Quantity $#RMN from current Quantity Backordered SOBK(21);

Zero out Remaining Quantity $#RMN;

else

Zero out new Split Backorder Quantity $$SOBK;

Subtract Backorder Quantity SOBK(21) from Remaining Contract Quantity $#RMN;


If  Remaining Quantity $#RMN is not zero:

If  Shipped Quantity SOQS(5) is greater than the contract remaining quantity $#RMN:

Move Remaining Quantity $#RMN to new split Quantity Shipped  $$SOQS;

Subtract Remaining Quantity $#RMN from current Quantity Shipped SOQS(5);

Zero out Remaining Quantity $#RMN;

else

Zero out new Split Shipped Quantity $$SOQS;

Subtract Shipped Quantity SOQS(5) from Remaining Contract Quantity $#RMN;


If  Canceled Quantity SOCN(22) is greater than the contract remaining quantity $#RMN:

Move Remaining Quantity $#RMN to new split Quantity Canceled  $$SOCN;

Subtract Remaining Quantity $#RMN from current Quantity Canceled SOCN(22);

Zero out Remaining Quantity $#RMN;

else

Zero out new Split Canceled Quantity $$SOCN and the Remaining Quantity $#RMN;


If  Quantity Ordered PQOR (6) is negative, reverse the sign of   SOQS(5),   SOBK(21) and  

SOCN(22);

$$SOQS, $$SOBK and $$SOCN;



If any of the quantity fields $$SOQS,  $$SOBK  and  $$SOCN  is not equal to zero

Add all quantities to compute a new Primary Ordered Quantity PQOR (6);

PQOR (6) =  SOQS(5) + SOBK(21) + SOCN(22);



Update existing Sales Order Detail Grid Line from F4211 - GBR


Move new split quantity shipped $$SOQS  to  SOQS(37);

Move new split quantity backordered $$SOBK to SOBK(38);

Move new split quantity canceled $$SOCN  to  SOCN(39);


Add all quantities to compute Primary Ordered Quantity PQOR (40);

PQOR (40) =  ($$SOQS + $$SOBK + $$SOCN);



If order line is soft committed COMM(26) is 'S', reset the Location LOCN(28) and Lot 

Number LOTN(27) to blanks;


Write a new Sales Order Detail Grid Line from F4211 - GBR


Move '1' to Contract Split Line Code CONT (35);





^

Data Structure

D4000870E - Split Contract Line

Parameter NameData ItemData TypeReq/OptI/O/Both
mnQtyOverContractLimitSOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

cContractSplitLineCodeCONTcharNONENONE

An indication, updated internally, that there are one or more formal contracts in place which specify a quantity and price at which this item is 
to be sold to specific customers.

mnQuantityBackorderedSOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnQuantityCanceledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

mnPrimaryOrderedQtyPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

cCommitmentCodeCOMMcharNONENONE

A value that indicates whether you specified from which Location and Lot a particular item was to come. If you specified a storage area, the 
program assigns a Hard (H) commit, and subsequent programs will not determine which Location and Lot to use to satisfy the order line. If 
you did not specify a storage area, the program assigns a Soft (S) commit and attempts to determine which Location and Lot records can best 
satisfy the order line quantity. Valid codes are:    S Soft Committed,    H Hard Committed    C Hard Committed by Commitment Program    K Kit 
Master Line (No Commitment)    N Work Order (No Commitment)

szLocationNumberLOCNcharNONENONE

The storage location from which goods will be moved.

szLotNumberLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

mnShippedQuantitySOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnSplitQtyShippedSOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnSplitQtyBackorderedSOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnSplitQtyCanceledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

mnSplitPrimOrderedQtyPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

Related Functions

B4000520 Get Item UoM Conversion Factor
B4001020 Update F4101 Contract Code
XF4105 Item Cost I/O

Related Tables

F4101 Item Master
F4207 Price by Item
F4208 Price by Customer
StandardPricingAdjustments

StandardPricingAdjustments

Standard Pricing Adjustments

Major Business Rule

Object Name: B4000870

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To compute pricing adjustments based on inventory rules and customer groups or numbers.


Technical Specification



If trade discount factor TRDC(1) is not zero:

Subtract trade discount factor TRDC(1)/100 from

 1.0; 

Multiply result by primary price PRIC (2);

Place result in computed primary price UPRC (4);

Return to calling program;



^

Data Structure

D4000870A - Standard Pricing Adjustments

Parameter NameData ItemData TypeReq/OptI/O/Both
mnTradeDiscountFactorTRDCMATH_NUMERICNONENONE

Percentage by which the system reduces the price of each item. This is the only discount that will be applied. You can override it if you 
enter a price. Enter the percentage as a whole number (that is, 5 for 5%).

mnPrimaryUMPricePRICMATH_NUMERICNONENONE

A base or default price that is used with multipliers from the pricing rules to develop discounted prices. If no formula applies to an item or no 
discounts apply to a customer, the system uses this price without adjustments.

mnPrimaryUMPriceOutputUPRCMATH_NUMERICNONENONE

The list or base price to be charged for one unit of this item. In sales order entry, all prices must be set up in the Item Base Price File table 
(F4106).

mnShippedQuantitySOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnPrimaryOrderedQtyPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

mnExtendedAmountAEXPMATH_NUMERICNONENONE

The number of units multiplied by the unit price.

mnConvFctrToPricingUOMCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

mnTotalWeightLBSITWTMATH_NUMERICNONENONE

The weight of one unit of an item, expressed in the primary unit of measure.

idFreeGoodsItemNumberGENLNGIDNONENONE

General purpose ID variable.

idFreeGoodsLineTypeGENLNGIDNONENONE

General purpose ID variable.

idFreeGoodsPriceGENLNGIDNONENONE

General purpose ID variable.

idItemMasterRecordGENLNGIDNONENONE

General purpose ID variable.

mnAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szCustomerPricingGroupPRGPcharNONENONE

A user defined code (system 40/type PC) identifying the pricing group associated with this customer or supplier:     o For sales orders, you 
assign a pricing group to a customer through the Customer Billing Instructions. Groups typically contain customers with common pricing 
characteristics, such as retailers, wholesalers, and so forth.     o For purchase orders, you assign a pricing group to a supplier through the Supplier 
Billing Instructions.

szInventoryPricingRulePRGRcharNONENONE

A user defined code (system 40/type PI) that identifies an inventory price group for an item. Inventory price groups have unique pricing 
structures that direct the system to incorporate discounts or markups on items on sales and purchase orders. The discounts or markups are 
based on the quantity, dollar amount, or weight of the item ordered. When you assign a price group to an item, the item takes on the same pricing 
structure defined for the inventory price group. You must assign an inventory price group to the supplier or customer, as well as to the item, for 
the system to interactively calculate discounts and markups on sales orders and purchase orders.

szBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

mnConvFctrToPrimaryCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnQuantityBackorderedSOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnQuantityCanceledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

mnQuantityShippedToDateQTYTMATH_NUMERICNONENONE

The number of units which have passed through the Sales Update process. In Workorder Processing, this field identifies the total quantity 
completed or consumed on a workorder to date basis.

cPricingTypePCTYcharNONENONE

A user defined code (42/CT) that indicates the basis for the price rule. Valid values are:    P Purchase order discounts    O Order repricing    R 
Line repricing (basket repricing)

cCommitmentCodeCOMMcharNONENONE

A value that indicates whether you specified from which Location and Lot a particular item was to come. If you specified a storage area, the 
program assigns a Hard (H) commit, and subsequent programs will not determine which Location and Lot to use to satisfy the order line. If 
you did not specify a storage area, the program assigns a Soft (S) commit and attempts to determine which Location and Lot records can best 
satisfy the order line quantity. Valid codes are:    S Soft Committed,    H Hard Committed    C Hard Committed by Commitment Program    K Kit 
Master Line (No Commitment)    N Work Order (No Commitment)

szLotNumberLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

szLocationNumberLOCNcharNONENONE

The storage location from which goods will be moved.

jdOrderDateTRDJJDEDATENONENONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

mnDiscountFactorDSPRMATH_NUMERICNONENONE

The factor that the system applies to the unit price of an inventory item to determine the net price. The system retrieves this value from the 
inventory pricing rules if you have assigned a rule to this item. The pricing rule setup determines if the system multiplies the unit price by this 
value or adds to or deducts from the unit price.

cDiscountApplicationTypeFAPPcharNONENONE

The sales order processing system uses this field to indicate the type of discount given to the sales order. Valid values are:     blank         
Regular pricing (including repricing)     1         Contract Pricing

cContractSplitLineCodeCONTcharNONENONE

  
Special Input Expected

' ' - Split SO Line if exceeding contract limit. 

'0' - Do NOT Split SO Line if exceeding contract limit.


Special Output Returned

' '  or  '0' - SO Line has not been split.
 '1' - SO Line has been successfully split.


^

szPricingRuleLevelCLVcharNONENONE

An alphanumeric code that determines the sequence in which the system displays the rules within the pricing group. You define levels when 
you set up the pricing groups.

szInventoryCategoryMCATcharNONENONE

A user defined code (40/PI) used to classify inventory by pricing rules. Typically, these categories correspond to the major sections in the 
inventory price book. You can set up as many detail categories as you need. A single code can be used for sales, purchasing, order/basket, 
and contract pricing. If you set up a contract rule, it must equal the short number for the item under contract.

mnSplitQtyShippedSOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnSplitQtyBackorderedSOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnSplitQtyCanceledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

mnSplitPrimOrderedQtyPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

Related Functions

B4000520 Get Item UoM Conversion Factor
B4001020 Update F4101 Contract Code
XF4105 Item Cost I/O

Related Tables

F4101 Item Master
F4207 Price by Item
F4208 Price by Customer