1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method GetKPISalesDemandPriority () const declarative remote as Real 
 |  { 
 |    Description: 'Return the bonus of fulfilling sales demand according to priority.' 
 |    TextBody: 
 |    [* 
 |      value := sum( this,  
 |                    PeriodKPI,  
 |                    p,  
 |                    sum ( p, ProductInStockingPointInPeriod.astype( ProductInStockingPointInPeriodPlanningLeaf ).PlanningBaseSalesDemandInPeriod,  
 |                          sd, 
 |                          guard( sd.Priority().Weight(), 0 ) * sd.FulfilledQuantity() ) );  
 |       
 |      return value; 
 |    *] 
 |  } 
 |  
  |