Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetHasValidSalesSegment ( 
 | 
  output Strings feedback_o, 
 | 
  output Strings sanitycheckfeedback_o 
 | 
) declarative remote as Boolean 
 | 
{ 
 | 
  Description: 'Checks if sales level is linked to valid sales segments' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // ju jinn Nov-7-2014 (created) 
 | 
     
 | 
    value := this.SalesSegment_MP( relsize ) > 0; 
 | 
     
 | 
    if( not isnull( feedback_o ) and not value ) 
 | 
    { 
 | 
      slname := MacroPlan::GetSubstituteName( this.Name() ); 
 | 
      feedback_o.Add( SanityCheckMessage::GetFormattedMessage( Translations::MP_SalesLevel_Instance( slname ), 
 | 
                                                               Translations::MP_SalesLevel_ViolateHasValidSalesSegment() ) ); 
 | 
      sanitycheckfeedback_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning() ); 
 | 
    } 
 | 
     
 | 
    return value; 
 | 
  *] 
 | 
} 
 |