Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetHasValidQuantityToProcess ( 
 | 
  output Strings feedback_o, 
 | 
  output Strings sanitycheckfeedback_o 
 | 
) declarative remote as Boolean 
 | 
{ 
 | 
  Description: 'check if have valid qty to process' 
 | 
  TextBody: 
 | 
  [* 
 | 
    feedback := ''; 
 | 
    sanitycheckfeedback := ''; 
 | 
     
 | 
    if( this.QuantityToProcess() = 0 ) 
 | 
    { 
 | 
      io := Translations::MP_GlobalParameters_InputString(); 
 | 
     
 | 
      if( this.Unit().QuantityToProcess() = GlobalParameters_MP::GetQTProcessOut() ) 
 | 
      { 
 | 
        io := Translations::MP_GlobalParameters_OutputString(); 
 | 
      } 
 | 
      feedback := Translations::MP_Operation_ViolateHasValidQuantityToProcess_ZeroQuantity( io, this.QuantityToProcess() ); 
 | 
      sanitycheckfeedback := SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue(); 
 | 
    } 
 | 
     
 | 
    if( not isnull( feedback_o ) and feedback <> '' ) 
 | 
    { 
 | 
      // Just incase if the name is empty or too long 
 | 
      name := MacroPlan::GetSubstituteName( this.Name() ); 
 | 
      instance := Translations::MP_Process_Instance( this.DefinitionName(), name ); 
 | 
     
 | 
      feedback_o.Add( SanityCheckMessage::GetFormattedMessage( instance, feedback ) ); 
 | 
      sanitycheckfeedback_o.Add( sanitycheckfeedback ); 
 | 
    } 
 | 
     
 | 
    return feedback = ''; 
 | 
  *] 
 | 
} 
 |