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 GetKPICampaign () const declarative remote as Real 
 |  { 
 |    Description: 'Return the penalty for campagin minimum and maximum quantity.' 
 |    TextBody: 
 |    [* 
 |      // desmondt Nov-18-2015 (created) 
 |       
 |      value := sum( this, Unit.CampaignType_MP.Campaign_MP, campaign, 
 |                    (  maxvalue( campaign.MinQuantity() - campaign.FulfilledQuantity(), 0.0 ) 
 |                    +  ifexpr( campaign.HasInputMaxQuantity(), maxvalue( campaign.FulfilledQuantity() - campaign.MaxQuantity(), 0.0 ), 0.0) ) 
 |                    * campaign.CampaignType_MP().Unit().DefaultUOMConversionFactor() ) 
 |       
 |      return value; 
 |    *] 
 |  } 
 |  
  |