| Quintiq file version 2.0 | 
| #parent: #root | 
| Function CalcHasTransitionNext | 
| { | 
|   Description: 'Has transition' | 
|   TextBody: | 
|   [* | 
|     value := false; | 
|      | 
|     nextCampaign := this.Next(); | 
|      | 
|     if( not isnull( nextCampaign ) ) | 
|     { | 
|       nextCampaignType := nextCampaign.CampaignType_MP(); | 
|        | 
|       nextTransitionType := select( this, CampaignType_MP.AsFromOfTransitionType, tt,  | 
|                                     tt.ToCampaignType() = nextCampaignType ); | 
|        | 
|       value := not isnull( nextTransitionType ) | 
|                and nextTransitionType.ToCampaignType() = this.Next().CampaignType_MP() | 
|                and this.Next().DurationGapWithPrevious() <= nextTransitionType.DefaultMaxDuration();  | 
|     } | 
|      | 
|     this.HasTransitionNext( value ); | 
|   *] | 
| } |