Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetHasValidTimeUnit ( 
 | 
  output Strings feedback_o, 
 | 
  output Strings sanitycheckfb 
 | 
) declarative remote as Boolean 
 | 
{ 
 | 
  Description: 'Returns true if time unit matches one of the time units supported in MP' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // vmpm Feb-23-2017 (created)                         
 | 
    isvalid := PeriodSpecification_MP::GetHasValidTimeUnit( this.TimeUnit() ); 
 | 
     
 | 
    if( not isnull( feedback_o ) and not isvalid ) 
 | 
    { 
 | 
      unitname := MacroPlan::GetSubstituteName( this.Unit().Name() ); 
 | 
      feedback_o.Add( SanityCheckMessage::GetFormattedMessage( Translations::MP_TransportCapacity_Instance( unitname, this.Start() ), 
 | 
                                                               Translations::MP_PeriodSpecification_MP_ValidateInput_InvalidTimeUnit() ) ); 
 | 
      sanitycheckfb.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue() );                                                            
 | 
    } 
 | 
     
 | 
    return isvalid; 
 | 
  *] 
 | 
} 
 |