Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetHasValidOperationInputOutputQuantity ( 
 | 
  output Strings feedback_o, 
 | 
  output Strings sanitycheckfeedback_o 
 | 
) declarative remote as Boolean 
 | 
{ 
 | 
  Description: 'check if operation input and output quantity diff factor is okay.' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // desmondt Nov-12-2014 (created) 
 | 
    valid := this.GetHasValidOperationInputOutputQuantity(); 
 | 
    factorlimit := this.MacroPlan().GlobalParameters_MP().DifferenceFactor1e3(); 
 | 
     
 | 
    if( not isnull( feedback_o ) and not valid ) 
 | 
    { 
 | 
      // format because translations do not support representations yet 
 | 
      formatfactorlimit := factorlimit.Format( "N(Dec(0), Thousands)" ); 
 | 
      formatinputqty := this.InputQuantity().Format( "N(Dec(0), Thousands)" ); 
 | 
      formatoutputqty := this.OutputQuantity().Format( "N(Dec(0), Thousands)" ); 
 | 
      name := MacroPlan::GetSubstituteName( this.Name() ); 
 | 
      feedback_o.Add( SanityCheckMessage::GetFormattedMessage( Translations::MP_Process_Instance( this.DefinitionName(), name ), 
 | 
                                                               Translations::MP_Operation_ViolateHasValidOperationInputOutputQuantityRange( formatfactorlimit, 
 | 
                                                                                                                                            formatinputqty, 
 | 
                                                                                                                                            formatoutputqty ) 
 | 
                                                                                                                                           ) 
 | 
                                                             ); 
 | 
      sanitycheckfeedback_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue() );                                                          
 | 
    } 
 | 
     
 | 
    return valid; 
 | 
  *] 
 | 
} 
 |