Target Cost Calculation

This section describes how the system automatically calculates the “Target Cost” (the PO price) for each purchase order and requisition line that is entered on the system.

At various points the system is required to calculate the price that should be paid to a vendor for a specific product under specific conditions. This process is called calculating the “target cost”. Among other places this calculation is done during purchase order entry and requisition creation.  This calculation is done programmatically using the cost_module object defined in the fvcost package.

In general, the target cost calculation is the same for all purchase order and requisition lines, regardless of whether they are manually entered, or they are automatically created from Inventory quantity, EDI or other information. Any differences in the logic used by manual order entry and the Requisition and EDI routines are noted where appropriate.

The Target cost logic is contained in an include file called FVCOST This include file contains the procedures for calculating the available prices for the vendor, item and quantity being processed, and for selecting the best or target price for the purchase order or requisition line..

The Purchasing system supports several different price calculation methods.  These calculation methods are executed sequentially and they are described in the same sequence that they are used during PO and requisition creation.  Price calculation methods that are unique to specific programs or that require special information are noted in the appropriate sections of this document.  Please note that the default prices calculated by the purchasing system can be manually overridden by the operator in the Purchase Order Entry and the Requisition Management program and this document describes only the methodology used by the system when determining the default purchase price to be used for each vendor, item and quantity combination.

As each purchase order or requisition line is created by the operator or by the system itself, the purchasing system goes through the following steps to calculate the “target cost” (price) for the item, vendor, currency and quantity being processed.  These steps are executed after the item number, quantity, and optional contract number for the purchase order or requisition line have been entered or automatically provided by the system.  The system is designed to return the lowest available (“target”) cost or price for each PO or requisition line being created based on the item, quantity, vendor and other information available at the time the requisition or purchase order line is entered.  The sequence used by the system when calculating the target cost is as follows.

1.  The System loads the properties used by the FVCOST object.  These properties include.

      The Vendor.  This is the vendor from the purchase order being entered if the PO is being entered manually, or the default vendor for the item being ordered, if the requisition is being created automatically by Order Entry or by the PO Recommendations report.  Note:  An advanced option also allows the vendor to be used for a Special Order or Vendor Ship PO Requisition to be specified in the sales order lines that the requisitions are created for.  This option makes use of an AIC or Additional Information Comment.  This optional comment can be added to the sales order during order entry and if present, the vendor from the AIC comment will be used by the system instead of the default vendor for the item.

      The Currency.  The currency specified in the Purchase Order Header is used by the Target cost calculation if the PO is being entered manually.  The currency that is assigned to the default vendor for the item is used when a PO requisition is being automatically created by the Order Entry or the PO Recommendations report.

      The Item.  The inventory item that is being purchased.

      The Product Line.  The Product Line that the Inventory Item is assigned to in the Inventory Master file.

      The Item Class.  The FVCOST object will use the Class from the QVL file if a QVL record is present for the Vendor and item being processed, or it will use the Class from the Item if no QVL record exists for the Vendor/Item combination.

      Contract Number.  If a Contract Number is specified during PO Entry, the system will pass this contract number to the FVCOST object and the system will only return a price if a qualifying contract cost record is found for the specified contract number.  If no valid contract cost is found in the special pricing file, the system will return a price of 0 and a price source of CC.

      The Quantity being ordered.  This is the quantity entered by the operator if the operator is manually creating a purchase order, or the recommended or needed quantity calculated by the system if a PO requisition is being created by the Sales Order Entry or the PO Recommendations programs.

2.  The system calls the FVCOST object, and passes the properties to the object.  Once the FVCOST object activates, it sets some other properties which are listed below.

      The object determines which Default Inventory Cost should be used by the Target Cost Calculation.  The default cost is specified in the PODEFCST parameter in the System Parameter file.

      The object checks to see if the QVL should be used by the Target Cost calculation.  This option is controlled by the System Parameter POQVLCHK (if the parameter is set to Y, the QVL information is used, if the parameter is not set to Y, the QVL information is not used.

      The Object checks the POCSTRND parameter – which determines the number of decimal points that should be used when rounding the PO Prices that are calculated by the object.

      The Object checks the BCAG0001 parameter to determine the number of characters from the Product Line code that should be used by the Target Cost Calculation.  This parameter is used for advanced purposes by a specific customer and should normally be set to 8 (the full length of the field).

      The Object checks the SODQVL01 parameter to determine if QVL pricing should be forced during the Target Cost Calculation.  If the parameter is set to Y, the system will use only a QVL or a Contract Cost during PO Entry.  If the price calculated by the system is based on an Inventory cost and no QVL record exists for the vendor/item/currency being ordered, the system will 0 out the price in the PO.  If the Target Cost calculated by the system is based on an Inventory default cost and a valid QVL record exists for the vendor, item and currency being ordered, the QVL price will be used even if it is higher than the Inventory price.

      The system initializes the cost field. – 999999 is moved into the price field of the purchase order or requisition line (since the goal is to find the lowest cost or price from the vendor, the system starts off by using a price that is higher than any valid price for the item).

3.  The FVCOST object checks for Class Exception records.  Class Exception records are an advanced option that can be used to assign specific items to different classes than the class defined for the item in the Inventory or the QVL records for the item.  A class exception can be set up for a specific vendor and item combination, and if present, that Class is used by the FVCOST object instead of the Class in the QVL or the Inventory record for the item.

4.  The FVCOST Object checks to see if a specific Contract# has been specified for the PO or requisition line being processed.  If a Contract# is passed to the FVCOST object, the object will return target cost only if the object finds an Active qualifying special cost record for the vendor, item and currency being processed, that also has the specified Contract# loaded into the Special Cost record.  If a valid Special Cost record is found, the system adjusts the cost specified in the record based on the PQDS flag in the record and the information that has been entered into the PQS system.  If a valid special cost record is not found, the PO price is set to 0 and the source is set to CC to indicate a valid contract cost was not found.  Note: The FVCOST object will only check for Contract Costs when Contract # is specified during PO or requisition creation, it will not perform the remaining steps listed in this section.  The Target Cost calculation will return the Contract cost (even if it is 0) when a contract is passed to the object.

5.  The FVCOST Object calculates the Inventory Default cost for the Vendor/Item combination being processed if the PO or requisition line being processed is in house or local currency.  The system does NOT try to calculate a target cost for a foreign currency PO based on the local currency amounts in your inventory records as these amounts adjusted by the currency exchange rate do not necessarily match the vendors price for an item.  A QVL or a Special Cost record must be present for the item, vendor and currency being used in order for the system to calculate a Target Cost in a Foreign Currency.  The Inventory Default cost is then adjusted based on the information that has been entered into the PQDS system.  This can result in a price that is higher or lower than the default cost in the Inventory record.

6.  The FVCOST Object calculates the QVL Cost for the Item.  It checks the QVL file for a record with the Vendor, Item and Currency being processed.  If a valid QVL record is found, the price from the QVL record (the value from the FC_COST field) is adjusted based on the information that has been entered into the PQDS system.  This can result in a price that is higher or lower than the QVL cost specified for the item.

7.  The FVCOST Object calculates the Special Cost for the Item, Vendor and Quantity being processed.  It searches through the Special Pricing file, looking for the record with the highest quantity (lowest price), in relation to the quantity being ordered.  If an Active Special Cost record is found for the Vendor, Item, Currency and quantity being processed, and the order is being placed within the date range specified in the record, the system checks the PQDS flag in the record.  If the PQDS flag is set to N, the object returns the cost from the Special Cost record.  If the PQDS flag is set to Y, the system adjusts the Cost from the Special Cost record based on the information that has been entered into the PQDS system.

8.  The FVCOST object selects the lowest available cost for the PO line or requisition and it sets the Price Source in the PO or Requisition line based on where the price was obtained.  The actual steps used by the object are.

      If a Contract Number was passed to the FVCOST object, the system checks for a valid contract cost for the specified contract number.  If the system finds a valid contract cost, it checks the PQDS flag in the record to determine if the cost should be adjusted by the PQDS system.  If the flag is set to Y, the system adjusts the contract cost and returns it, if the PQDS flag is set to N, the system returns the contract cost.  If no valid contract cost is found for the vendor, item, currency, and contract being processed, the system returns a price of zero and it sets the Target Source in the line to CC – to indicate that a valid contract cost was not found.  The system does not attempt to calculate any other target cost when a contract number is specified.

      If no Contract# was passed to the FVCOST object, the system then calculates the inventory default cost for the item and it loads the Poline target source with INV.  The Inventory default cost is automatically adjusted by the system based on the information that has been entered into the PQDS system.  The system will only calculate the inventory default cost for an item when the currency being used for the PO is your local or house currency.

      If the Inventory default cost calculated by the system is zero (due to a foreign currency PO or the item cost being 0) the system sets the target cost to 999999 to indicate is an invalid cost.

      The system then calculates the QVL cost for the item and it adjusts it based on any information that has been entered into the PQDS system.  If the QVL Cost is not zero and it is less than the target cost, the system then sets the target cost to the QVL cost and the Target Source to QVL.

      The system then checks for any special costs for the item, vendor and currency being ordered.  If a valid Special Cost record is found, the system checks the PQDS flag in the record to determine whether or not to adjust the special cost based on the information in the PQDS system.  If the special cost is not 0 and it is less than the target cost, the FVCOST object sets the target cost to the Special Cost and the target source to CP.

9.  The Object rounds the Target cost based on the value in the POCSTRND parameter.

10. The Object checks the SODQVL01 parameter to determine if the system has been configured to force the use of QVL costs.  If the parameter is set to Y and the target cost is an inventory default cost, the system checks for a valid QVL record.  If found, the QVL cost is used for the PO price even if higher than the Inventory cost, and the source in the PO or requisition line is set to QVL.   If no valid QVL record is found, the target cost is set to 0 and the source is set to QVL to indicate that no valid QVL cost was found.

More:

Foreign Currency Purchasing Overview