yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
  *]
}