Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Function CalcDisplayMaxDuration 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Set transition derived max duration if there is operation linked 
 | 
    value := ''; 
 | 
    if( not this.IsDuration() and this.HasInputMaxQuantity() and this.DefaultMaxQuantity() > 0 and this.OperationInTransitionType( relsize ) > 0 ) 
 | 
    { 
 | 
      quantity := this.DefaultMaxQuantity(); 
 | 
      value := [String]TransitionType_MP::GetDurationBasedOnQuantity( this.MinOperationInTransitionType(), 
 | 
                                                                      quantity, 
 | 
                                                                      quantity, 
 | 
                                                                      true, 
 | 
                                                                      true ); 
 | 
    } 
 | 
    else if( this.IsDuration() and this.HasInputMaxDuration() and this.DefaultMaxDuration() > Duration::Zero()) 
 | 
    { 
 | 
      value := [String]this.DefaultMaxDuration(); 
 | 
    } 
 | 
    this.DisplayMaxDuration( value ); 
 | 
  *] 
 | 
  InterfaceProperties { Accessibility: 'Module' } 
 | 
} 
 |