Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method RoundToNextMultipleForOperation ( 
 | 
  Real quantity 
 | 
) remote as Real 
 | 
{ 
 | 
  Description: "Round the entered quantity in new supply to next valid multiple of the operation's lot size." 
 | 
  TextBody: 
 | 
  [* 
 | 
    // soh yee Jun-17-2013 (created) 
 | 
     
 | 
    periodtaskoperation := this.GetPeriodTaskOperation(); 
 | 
    minquantity := 0.0; 
 | 
     
 | 
    if( not isnull( periodtaskoperation ) ) 
 | 
    { 
 | 
      minquantity := this.GetPeriodTaskOperationQuantity( quantity ); // Given desired quantity for new supply, calculate how much period task quantity is needed 
 | 
      minquantity := periodtaskoperation.RoundToNextMultiple( minquantity );     // Return suggested period task quantity out 
 | 
      minquantity := PeriodTaskOperation::GetNewSupplyQuantity( minquantity, this.ProcessOutput(), this.RelativeDuration() );    // Convert to how many new supply can be produced, given the quantity out of period task 
 | 
    } 
 | 
     
 | 
    return minquantity; 
 | 
  *] 
 | 
} 
 |