Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetHasAllowedCostDriver ( 
 | 
  output Strings feedback_o, 
 | 
  output Strings sanitycheckfb 
 | 
) declarative remote as Boolean 
 | 
{ 
 | 
  Description: 
 | 
  [* 
 | 
    For product value and cost, returns true if the cost driver of this account cost is valid based on the KT. 
 | 
    Since we cannot do the check in AccountAssignment because ProductValueAndCost do not have account assignment, 
 | 
    The check is implemented here. 
 | 
  *] 
 | 
  TextBody: 
 | 
  [* 
 | 
    // soh yee Jan-2-2014 (created) 
 | 
     
 | 
    valid := this.HasAllowedCostDriver(); 
 | 
     
 | 
    if( not isnull( feedback_o ) and not valid ) 
 | 
    { 
 | 
      feedback_o.Add( SanityCheckMessage::GetFormattedMessage( this.GetInstanceText(), 
 | 
                                                               Translations::MP_AccountAssignment_ViolateHasValidCostDriver( this.CostDriver() ) ) ); 
 | 
      sanitycheckfb.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue() );                                                            
 | 
    } 
 | 
     
 | 
    return valid; 
 | 
  *] 
 | 
} 
 |