Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetIsQuantityPeriodTaskMatch ( 
 | 
  output Strings feedback_o, 
 | 
  output Strings sanitycheckfeedbacks_o 
 | 
) declarative remote as Boolean 
 | 
{ 
 | 
  Description: "Returns true when sum of quantities of related PeriodTaskInCompaignType is equal to PeriodTasks's QuantityOut" 
 | 
  TextBody: 
 | 
  [* 
 | 
    // oceaned Mar-11-2016 (updated) 
 | 
     
 | 
    isvalid := true; 
 | 
     
 | 
    if( this.PeriodTaskInCampaign( relsize ) > 0 ) 
 | 
    { 
 | 
      isvalid := this.IsValidPeriodTaskInCampaignQuantity(); 
 | 
      sumperiodtaskincampaign := sum ( this, PeriodTaskInCampaign, ptc, true, ptc.Quantity() ); 
 | 
     
 | 
      if( not isnull( feedback_o ) and not isvalid ) 
 | 
      { 
 | 
        instance := PeriodTaskOperation::GetInstanceText( this ); 
 | 
        message := Translations::MP_PeriodTaskOperation_ViolateIsMatchPeriodTaskCampaignQuantity( this, sumperiodtaskincampaign ); 
 | 
        feedback_o.Add( SanityCheckMessage::GetFormattedMessage( instance, message ) ); 
 | 
        sanitycheckfeedbacks_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningIssue() ); 
 | 
      } 
 | 
    } 
 | 
     
 | 
    return isvalid; 
 | 
  *] 
 | 
} 
 |