Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetInventoryValue ( 
 | 
  ProductInStockingPointInPeriod pispip 
 | 
) declarative remote as BaseProductCost 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Adhi May-27-2016 (created) 
 | 
     
 | 
    /* The parameter accountassigmment accepts all sub-types of account assignment, however it is only used in 
 | 
       inventory calculation level in PISPIP level; it is almost always used when the account 
 | 
       assignment has either INVENTORY HOLDING or INVENTORY VALUE as the cost driver. 
 | 
     
 | 
       It is possible for this method to return null inventory value and cost */ 
 | 
     
 | 
    accountcost := maxselect( this, 
 | 
                              InventoryValueAndCost, 
 | 
                              ivc, 
 | 
                              ivc.IsInventoryValue() 
 | 
                              and ivc.Start() <= pispip.Start().Date(), 
 | 
                              ivc.Start() ); 
 | 
     
 | 
    return accountcost; 
 | 
  *] 
 | 
} 
 |