Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetHasConformLotSizingRequirement () declarative remote as Boolean 
 | 
{ 
 | 
  Description: 'Returns true if the PeriodTaskOperation quantity is an integer multiple of lot size.' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Adhi Aug-18-2015 (created) 
 | 
    isvalid := true; 
 | 
     
 | 
    if( this.Operation().HasLotSize()                                 // To prevent division by zero 
 | 
        and this.UnitPeriod().Period_MP().IsWithinLotSizeHorizon() )  // Only check within the lotsize horizon 
 | 
    { 
 | 
      gp := this.MacroPlan().GlobalParameters_MP(); 
 | 
      remainder := GlobalParameters_MP::GetRemainder( this.QuantityToProcess(), this.Operation().LotSize() ); 
 | 
     
 | 
      isvalid := gp.GetIsLotSizeWithinTolerance( this.Operation().LotSize(), remainder + this.Operation().LotSize() ) 
 | 
                 or gp.GetIsLotSizeWithinTolerance( this.Operation().LotSize(), remainder ) 
 | 
                 or gp.GetIsBalanceWithinTolerance( remainder, 0.0 ); 
 | 
     
 | 
     
 | 
    } 
 | 
     
 | 
    return isvalid 
 | 
  *] 
 | 
} 
 |