func X3.EN_STOCK_GET_COST(Char ITEM_IN, Char FACILITY_IN, Date DATE_IN, Decimal QUANTITY_IN, Char LOT_IN, Char SUBLOT_IN, Char MAJ_VERSION_IN, Char MIN_VERSION_IN, Integer METHOD_IN) : Decimal

Get the cost of an item for a given method

  • ITEM_IN Char Article reference
  • FACILITY_IN Char Facility code
  • DATE_IN Char Calculation date
  • QUANTITY_IN Decimal Quantity
  • LOT_IN Char Lot number
  • SUBLOT_IN Char Sublot number
  • MAJ_VERSION_IN Char Major version
  • MIN_VERSION_IN Char Minor version
  • METHOD_IN Integer Calculation method:
    • 1 : Standard Cost
    • 2 : Updated Standard Cost
    • 3 : Last price
    • 4 : PMP
    • 5 : FIFO
    • 6 : PM Lot
    • 7 : Order price
    • 8 : LIFO
    • 9 : Last purchase price
    • 10: Cost Standard budget
    • 11: Simulated Standard Cost
Return Decimal Item cost
Example

Infbox num$(func X3.EN_STOCK_GET_COST("BMS001", "DISTR", date$, 1, "", "", "", "", 3))
Displays the cost of item BMS001 on the DISTR facility on today's date with the Last Price method