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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method Update ( 
 |    Unit owner, 
 |    Real defaultminqty, 
 |    Real defaultmaxqty, 
 |    Duration defaultminduration, 
 |    Duration defaultmaxduration, 
 |    CampaignType_MP fromcampaigntype, 
 |    CampaignType_MP tocampaigntype, 
 |    String inputType, 
 |    Boolean hasinputmaxquantity, 
 |    Boolean hasinputmaxduration, 
 |    Boolean isfromdb 
 |  ) 
 |  { 
 |    Description: 'Update TransitionType' 
 |    TextBody: 
 |    [* 
 |      // Update transition type 
 |      isDuration := inputType = GlobalParameters_MP::GetCampaignTransitionsTypeDuration(); 
 |       
 |      defaultminqty := ifexpr( not isDuration, defaultminqty, 0 ); 
 |      defaultmaxqty := ifexpr( not isDuration and hasinputmaxquantity, defaultmaxqty, 0 ); 
 |      defaultminduration := ifexpr( isDuration, defaultminduration, Duration::Zero() ); 
 |      defaultmaxduration := ifexpr( isDuration and hasinputmaxduration, defaultmaxduration, Duration::Zero() ); 
 |       
 |      this.Update( owner, 
 |                   TransitionType_MP::GetTransitionTypeName( fromcampaigntype, tocampaigntype ), 
 |                   defaultminqty, 
 |                   defaultmaxqty, 
 |                   defaultminduration, 
 |                   defaultmaxduration, 
 |                   fromcampaigntype, 
 |                   tocampaigntype, 
 |                   not isDuration and hasinputmaxquantity, 
 |                   isDuration and hasinputmaxduration, 
 |                   isfromdb ); 
 |    *] 
 |  } 
 |  
  |