UpdateSalesOrderPriceCost

Sales Order Batch Price / Cost Update

Major Business Rule

Object Name: B4200950

Parent DLL: CDIST

Location: Client/Server

Language: C




Functional Description


Purpose


This business function will verify the price and cost information for a given sales order detail 

line.  The sales order lines will be selected through the data selection option of the UBE that calls this 

business function.  If the price / cost for the sales order line has changed, this business function 

will calculate the new price / cost, update the sales order header file and update the sales history 

file.



Setup Notes and Prerequisites


None.


Special Logic


None.


Technical Specification


Related Tables


Table Table Description

F40205Line Type Constants File

F4101Item Master File

F4102Item Branch File

F4201Sales Order Header File

F4105Item Cost File

F4106Item Price File

F4074Pricing History File


Related Business Functions


Source NameFunction Name

B4000260.CGetLineTypeConstants

X4101.CGetItemMaster

B4200930.CGetBranchbyItem

B4200250.CUpdateOrderTotalInF4201

B4200710.CCalculateTransferCost

B4000870.CStandardPricingAdjustments

XF4105.CGetItemCost

B4200070.CGetSalesBasePrice

B4200260.CWriteSalesHistoryOrLedger

B4000520.CGetItemUoMConversionFactor


2.4Processing 


*** Retrieve general information needed from other files. ***


Retrieve line type constants for the current sales detail line.

GetLineTypeConstants / B400260
Input Parameters
Line Type - LNTY
Suppress Error Message - EV01


Retrieve the item master record.

GetItemMaster / X4101
Input Parameters
Short Item Number - ITM
Suppress Error Messages - EV01


Retrieve the item branch record. 

 CheckItemBranch / B4100210
Input Parameters
Branch Plant - MCU

Short Item Number - ITM
Index - CDL

Keys - CDL

Call Type - EV01

Return Record - EV02

Output Parameters

Error Code - ERRC
Item Branch Record - GENLNG


Retrieve the sales order header record.

VerifyandGetSalesHdr / B4200340
Input Parameters
Order Number - DOCO
Order Type - DCTO

Key Company - KCOO

Call Type - EV01

Error Message - DTA1

Suppress Error Message - EV02

Return Code - EV03


*** Foreign Currency preliminary processing. ***

No foreign currency processing if any of the following is true:

1. Foreign Currency Processing Option is off.
2. Current line is an invoicing adjustment (SO08 = '2').

3. Domestic code is the same as foreign.

4. Sales order line has been invoiced (SDIVD <> 0).

 
Retrieve domestic currency code from Company Constants.

Retrieve decimal value.

Move exchange rate into the sales order line's Currency Conversion Rate field (SDCRR).



***  Calculate new cost. ***

Do not calculate cost if any of the following is true:

1. Cost update mode is off (Processing Option).
2. Quantity on hand has been relieved from this item (SO02 = '1').

3.  The cost has been overriden (CSTO = '1')


Retrieve unit cost from cost file.  

GetItemCost / XF4105.C
Input Parameters
Short Item Number - ITM
Branch / Plant - MCU

Location - LOCN

Lot Number - LOTN

Cost Level - CLEV

Return F4105 Row Pointer - EV01

Call Type - EV01

Costing Selection - CSIN

Purchase Cost Selection - CSPO

Costing Method - LEDG


If item is an inter-branch item (SDSO01 = '1')

1. Verify that detail cost center is not the same as header cost center.
2. Verify that item is an inventory item ( LFIVI = 'N').

3. Calculate transfer cost.

CalculateTransferCost / B4200710
Input Parameters
Interbranch Sales - SO01
Stocking Type - STKT

Inventory Interface - IVI

From Branch - MMCU

To Branch - CMCU

Short Item Number - ITM

Category Code 1 - SRP1

Effective Date - DRQJ

Currency Control - CRYR

Exchange Rate Multiplier - CCR

Exchange Rate Divisor - CRRD

Unit Cost - UNCS


Calculate extended cost.

Calculate foreign costs.




*** Calculate new price. ***

Do not calculate new price if any of the following is true:

1. Price update mode is off (Processing Option).
2. Price was overridden (PROV = '1'). 


Determine which date to use as Price Effective Date (Processing Option).

1. '  ' - Transaction / Order Date
2. '1' - Requested Ship Date

3. '2' - Promised Ship Date

4. '3' - Original Promised Date

5. '4' - Actual Ship Date

6. '5' - System Date

7. '6' - Invoice Date

8. '*' - Use System Constants Value


If specified to use original line quantity (Processing Option)

- read pricing history file for original pricing quantity. 
Retrieve base price from pricing file.

GetSalesBasePrice / B4200070

Input Parameters
Sold To Address Number - AN8
Ship To Address Number - SHAN

Price Effective Date - PEFJ

Base Currency Code - CRCD

Transaction Unit of Measure - UOM

Primary Unit of Measure - UOM1

Price Level - PLEV

Price By Grade Or Potency - PRPO

Currency Conversion - CRYR

Conversion Factor - CRR

From Potency - FRMP

Through Potency - THRP

From Grade - FRGD

Through Grade - THGD

Item Pricing Group - PRGR

Customer Pricing Group - CPGP

F4102 Row Pointer - GENLNG

Computer ID - CTID

Job Number - JOBS

Line Number F40UI74 - XLIN

Adjustment Revision Level - AREV

Advance Revision Level - EV02


Retrieve conversion factors.
GetItemUoMConversionFactor

Input Parameters
Branch Plant - MCU
Unit of Measure to Primary - UOM

Quantity to Convert - SOQS

Inventory Interface - IVI

Short Item Number - ITM

Potency Mode - COMM

Potency Control - OT1Y

Standard Potency - STDP

Suppress Error Message - EV01

From Unit of Measure - UOM

To Unit of Measure - UOM


Calculate new price using pricing server. 
StandardPricingAdjustments / B4000870.C
Input Parameters
Trade Discount Factor - TRDC
Primary Unit of Measure Price - PRIC

Short Item Number - ITM

Extended Amount - AEXP

Total Weight (LBS) - ITWT

Conversion Factor to Pricing Unit of Measure - CONV

Inventory Pricing Rule - PRGR

Branch / Plant - MCU

Conversion Factor to Primary - CONV

Quantity Shipped to Date - QTYT

Pricing Type 'O' for Purchasing - PCTY

Header Cost Center - EMCU

Commitment Code - COMM

Order Date - TRDJ


Input / Output Parameters

Primary Unit of Measure Price Output - UPRC
Shipped Quantity (Primary) - SOQS

Primary Ordered Quantity - PQOR

Item Master Record - GENLNG

Customer Pricing Group - PRGP

Quantity Backordered - SOBK

Quantity Canceled - SOCN

Lot Number - LOTN

Location Number - LOCN

Contract Split Line Code - CONT


Calculate extended price.

Calculate foreign prices.




*** Update files. ***

If price or  cost changed:

1. Change the price/cost fields on the sales order detail line.
2. Update sales order header.

UpdateOrderTotalInF4201 / B4200250
Input Parameters

Order Number - DOCO
Order Type - DCTO

Company Key - KCOO

Current Domestic Extended Amount - MATH06

Current Foreign Extended Amount - MATH07

Previous Domestic Extended Amount - MATH08

Previous Foreign Extended amount - MATH09

Currency On - CRYR

Program - PID

User - USER

Job Number - JOBN

Date Updated - UPMJ

Time of Day- TDAY 

3. Retrieve pointer to F4211 record.
4. Write to Sales Ledger file (F42199).

WriteSalesHistoryOrLedger / B4200260
Input Parameters

Pointer To F4211 DS - GENLNG
Calling Application - PROG

User ID - USER

Workstation ID - JOBN

Current Date - DATE01

Current Time - TDAY

Processing Mode - EV01



^

Data Structure

D4200950 - Sales Order Batch Price / Cost Update





Special Input Expected


Parameters:


Data Item Data Structure DescriptionI/ORequiredNotes

DOCO      Order Number             I   Y      Key to sales order

                                                            header.

DCTO      Order Type                   I   Y      Key to sales order

                                                            header.

KCOO      Key Company                   I   Y      Key to sales order

                                                            header.

LNID      Line Number                   I   Y

LNTY      Line Type                   I   Y      Key to line type

                                                            constants file.

UORG      Transaction Quantity       I    Y

SOQS      Shipped Quantity             I    Y

UPRC      Unit Price                  I/O   Y

AEXP      Extended Price            I/O   Y

UNCS      Unit Cost                  I/O   Y

ECST      Extended Cost            I/O   Y

ITM      Short Item Number             I   Y

MCU      Cost Center                   I   Y

SO02      On Hand Updated             I   Y

CSTO      Cost Override Code       I   Y

LOCN      Location                   I   Y

LOTN      Lot Number                   I   Y

CLEV      Cost Level                   I   Y

PROV      Price Override Code       I   Y

SRP1      Sales Catalog             I     Y

EV01      Cost Update Mode             I   Y

EV01      Price Update Mode             I   Y

EV01      Foreign Currency Processing I   Y

TRDJ      Transaction Date             I   Y

RQDJ      Requested Ship Date       I   Y

      Promised Ship Date       I   Y

      Original Promise Date       I   Y

      Actual Ship Date             I   Y

      Invoice Date             I   Y

PEFJ      Price Effective Date       I   Y

AN8      Address Number             I   Y

SHAN      Ship to Address Number       I   Y

      Currency Code From       I   Y

UOM      Pricing Unit of Measure       I   Y

CCR      Currency Conversion Rate I   Y

      From Potency             I   Y

      Through Potency             I   Y

      From Grade                    I   Y

      Through Grade             I   Y

      Item Pricing Group       I   Y

CTID      Computer ID                   I   N

JOBN      Job Number                   I    N

GENLNGLine Number F40UI74       I   N      Do not use.

      Interbranch Sales             I   Y

TRDC      Trade Discount Factor       I   Y

UTWT      Unit Weight                   I   Y

      Quantity Shipped to Date I   Y

      Price Category Type       I   Y

COMM      Commitment Code             I   Y

      Primary Ordered Quantity I   Y

SOBK      Quantity Backordered       I   Y

SOCN      Quantity Canceled             I   Y

UOM4      Pricing Unit of Measure       I   Y



Special Output Returned


Parameters:


Data Item Data Structure DescriptionI/ORequiredNotes

EV01      Error Code                   O




^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnOrderNumberDOCOMATH_NUMERICNONENONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

szOrderTypeDCTOcharNONENONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

szKeyCompanyKCOOcharNONENONE

A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a 
sales order, and so on). If you use the Next Numbers by Company/Fiscal Year facility, the Automatic Next Numbers program (X0010) uses the 
order company to retrieve the correct next number for that company. If two or more order documents have the same order number and order 
type, the order company lets you locate the desired document. If you use the regular Next Numbers facility, the order company is not used to 
assign a next number. In this case, you probably would not use the order company to locate the document.

mnLineNumberLNIDMATH_NUMERICNONENONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

szLineTypeLNTYcharNONENONE

A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as 
General Ledger, Job Cost, Accounts Payable, Accounts Receivable, and Inventory Management. It also specifies the conditions under 
which a line prints on reports, and it is included in calculations. Codes include the following: S Stock item   J Job cost   N Nonstock item   F Freight  
T Text information   M Miscellaneous charges and credits   W Work order

mnTransactionQuantityUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

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.

mnUnitPriceUPRCMATH_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).

mnExtendedPriceAEXPMATH_NUMERICNONENONE

The number of units multiplied by the unit price.

mnUnitCostUNCSMATH_NUMERICNONENONE

The amount per unit, derived by dividing the total cost by the unit quantity.

mnExtendedCostECSTMATH_NUMERICNONENONE

For accounts receivable and accounts payable, the invoice (gross) amount. For sales orders and purchase orders, the unit cost times the 
number of units.

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

szCostCenterMCUcharNONENONE

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.

cOnHandUpdatedSO02charNONENONE

A code that indicates if the committed inventory for this sales detail line has been relieved from the On Hand Quantity. A value of 1 reflects 
that the shipment confirmation program (P4205) or the Sales Update program (R42800) has relieved inventory and written a cardex record to 
the Item Ledger File (F4111). To activate on hand update at shipment comfirmation time, the order type of the sales order will need to be added 
to the User Defined Code Table (40/IU). If on hand is not updated with the Shipment Confirmation program (P4205), it will be updated by the 
Sales Update program (R42800).

cCostOverrideCodeCSTOcharNONENONE

A code that specifies whether the change order is a terms only change. For those organizations that elect to view subcontracts on a 
detailed line item basis, terms only changes are in most cases those that have a non-dollar effect, such as a schedule change. For those 
organizations that elect to view their contracts on a summary job cost coding basis, all changes are automatically classified for processing purposes 
as terms only changes. In this case the base contract is automatically incremented for each change order and the individual change order 
amount is carried for informational purposes only. All change orders created in processing mode 3 (account method -incremental), are terms 
only changes. Most inquiry screens and reports exclude terms only items.

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

szLotLOTNcharNONENONE

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

cCostLevelCLEVcharNONENONE

A code that indicates whether the system maintains one overall inventory cost for the item, a different cost for each branch/plant, or a 
different cost for each location and lot within a branch/plant. The system maintains inventory costs in the Inventory Cost table (F4105). Valid codes 
are:    1   Item level    2   Item/Branch level    3   Item/Branch/Location level

cPriceOverrideCodePROVcharNONENONE

A value established by the sales order entry program whenever a unit or extended price is entered into an order line item, overriding the 
price calculated by the program.

szSalesCatalogSRP1charNONENONE

One of ten category codes for sales coding purposes. These codes can represent such classifications as color, material content, or use.

cCostUpdateModeEV01charNONENONE

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

cPriceUpdateModeEV01charNONENONE

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

cForeignCurrencyModeEV01charNONENONE

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

jdTransactionDateDATE01JDEDATENONENONE

Event point for JDE Date.

jdRequestedShipDateDATE01JDEDATENONENONE

Event point for JDE Date.

jdPromisedShipDateDATE01JDEDATENONENONE

Event point for JDE Date.

jdOriginalPromiseDateDATE01JDEDATENONENONE

Event point for JDE Date.

jdActualShipDateDATE01JDEDATENONENONE

Event point for JDE Date.

jdInvoiceDateDATE01JDEDATENONENONE

Event point for JDE Date.

cPriceEffectiveDateEV01charNONENONE

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

mnAddressNumberAN8MATH_NUMERICNONENONE

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

mnShipToAddressSHANMATH_NUMERICNONENONE

The address number of the location to which you want to ship this order. The address book provides default values for customer address, 
including street, city, state, zip code, and country.

szCurrencyCodeFromCRCDcharNONENONE

A code that identifies the currency of a transaction. 

szUnitOfMeasureUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

szPrimaryUnitOfMeasureUOM1charNONENONE

A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA 
(each) or KG (kilogram).

mnCurrencyConversionRateCRRMATH_NUMERICNONENONE

A number (exchange rate) that a foreign currency amount is multiplied by to calculate a domestic currency amount.  The number in this field 
can have a maximum of seven decimal positions. If more are entered, the system adjusts to the nearest seven decimal positions. 

mnFromPotencyFRMPMATH_NUMERICNONENONE

A number that indicates the minimum potency or percentage of active ingredients acceptable for an item. The system displays a warning 
message if you try to purchase or issue items that do not meet the minimum acceptable potency. The system does not allow you to sell items 
that do not meet the minimum acceptable potency.

mnThroughPotencyTHRPMATH_NUMERICNONENONE

A number that indicates the maximum potency or percentage of active ingredients that is acceptable for an item. The system displays a 
warning message if you try to purchase or issue items that have a potency that exceeds the maximum potency acceptable. The system does 
not allow you to sell items that have a potency that exceeds the maximum potency acceptable.

szFromGradeFRGDcharNONENONE

A user defined code (40/LG) that indicates the minimum grade that is acceptable for an item. The system displays a warning message if 
you try to purchase or issue items with grades that do not meet the minimum grade acceptable. The system does not allow you to sell items 
with grades that do not meet the minimum acceptable level.

szThroughGradeTHGDcharNONENONE

A user defined code (40/LG) that indicates the maximum grade that is acceptable for an item. The system displays a warning message if 
you try to purchase or issue items with grades that exceed the maximum grade acceptable. The system does not allow you to sell items with 
grades that exceed the maximum grade acceptable.

szItemPricingGroupPRGRcharNONENONE

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.

szComputerIDCTIDcharNONENONE

mnJobNumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

mnLineNumberF40UI74XLINMATH_NUMERICNONENONE

Line number.

cInterbranchSalesSO01charNONENONE

A value of 1 indicates that this sales detail line contains an inter branch item. Interbranch sales orders allow the user to record the 
transactions of transferring inventory from one branch/plant to another and the subsequent sale of the transferred inventory all in one sales order.  In 
the sales order,the user will enter the ship-from location in the order detail line and the ship-to location is the branch/plant in the sales order 
header. During sales update, the system creates journal entries that record the transfers and stores the entries in an interbranch batch, indicated 
by batch type ST. The sales update program will also create the normal A/R and G/L transactions in the I batch. To activate interbranch 
processing in sales order entry and sales update, the user will have to specify the order type of an interbranch sales order in the processing 
options.

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%).

mnUnitWeightITWTMATH_NUMERICNONENONE

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

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.

cPriceCategoryTypePCTYcharNONENONE

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)

mnPrimaryOrderedQuantityPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking 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.

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szPricingUnitOfMeasureUOM4charNONENONE

A user defined code (00/UM) that indicates the unit of measure in which you usually price the item.

szUserIDUSERcharNONENONE

The code that identifies a user profile.

szWorkstationIDJOBNcharNONENONE

The code that identifies the work station ID that executed a particular job.

mnTimeOfDayTDAYMATH_NUMERICNONENONE

The computer clock in hours:minutes:seconds.

mnListPriceLPRCMATH_NUMERICNONENONE

The list price in the unit of measure of the base price retrieved from the Base Price File (F4106).  This is the price the customer would pay if 
there were no price adjustments applied during Sales Order Entry.  This price is stated in domestic currency.

szProgramIDPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cPriceWasUpdatedEV01charNONENONE

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

cCostWasUpdatedEV01charNONENONE

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

szDataItemDTAIcharNONENONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cSuppressErrorMessageEV01charNONENONE

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

cErrorFlagEV01charNONENONE

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

Related Functions

None

Related Tables

None
font-size:10pt">
CalculateTransferCost / B4200710
Input Parameters
Interbranch Sales - SO01
Stocking Type - STKT

Inventory Interface - IVI

From Branch - MMCU

To Branch - CMCU

Short Item Number - ITM

Category Code 1 - SRP1

Effective Date - DRQJ

Currency Control - CRYR

Exchange Rate Multiplier - CCR

Exchange Rate Divisor - CRRD

Unit Cost - UNCS


Calculate extended cost.

Calculate foreign costs.




*** Calculate new price. ***

Do not calculate new price if any of the following is true:

1. Price update mode is off (Processing Option).
2. Price was overridden (PROV = '1'). 


Determine which date to use as Price Effective Date (Processing Option).

1. '  ' - Transaction / Order Date
2. '1' - Requested Ship Date

3. '2' - Promised Ship Date

4. '3' - Original Promised Date

5. '4' - Actual Ship Date

6. '5' - System Date

7. '6' - Invoice Date

8. '*' - Use System Constants Value


If specified to use original line quantity (Processing Option)

- read pricing history file for original pricing quantity. 
Retrieve base price from pricing file.

GetSalesBasePrice / B4200070

Input Parameters
Sold To Address Number - AN8
Ship To Address Number - SHAN

Price Effective Date - PEFJ

Base Currency Code - CRCD

Transaction Unit of Measure - UOM

Primary Unit of Measure - UOM1

Price Level - PLEV

Price By Grade Or Potency - PRPO

Currency Conversion - CRYR

Conversion Factor - CRR

From Potency - FRMP

Through Potency - THRP