| Quintiq file version 2.0 | 
| #parent: #root | 
| Method GetHasValidFromAndTo ( | 
|   output Strings feedback_o, | 
|   output Strings sanitycheckfeedback_o | 
| ) declarative remote as Boolean | 
| { | 
|   Description: 'Check if this routing has valid ValidFrom and ValidTill' | 
|   TextBody: | 
|   [* | 
|     // desmondt Oct-7-2014 (created) | 
|     isvalid := true; | 
|      | 
|     if( not isnull( this.RoutingStep() ) ) | 
|     { | 
|       isvalid := this.ValidFrom() <= this.ValidTill() | 
|      | 
|       if( not isnull( feedback_o ) and not isvalid ) | 
|       { | 
|         name := MacroPlan::GetSubstituteName( this.Name() ); // To avoid empty name/name too long | 
|         feedback_o.Add( SanityCheckMessage::GetFormattedMessage( Translations::MP_Process_Instance( this.DefinitionName(), name ), | 
|                                                                  Translations::MP_Operation_ViolateHasValidPeriod( this.Unit().StartDate(), | 
|                                                                                                                    this.Unit().EndDate(),                                                                                                        this.RoutingStep().Routing().Start(), | 
|                                                                                                                    this.RoutingStep().Routing().End() ) )); | 
|         sanitycheckfeedback_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning() );                                                                                                                | 
|       } | 
|     } | 
|      | 
|     return isvalid; | 
|   *] | 
| } |