| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod IsQuantityMultipleOf ( | 
|   output String feedback_o, | 
|   PeriodTaskOperation periodtaskoperation, | 
|   Real quantity | 
| ) remote as Boolean | 
| { | 
|   Description: 'Return true if quantity is a valid multiple of lot size' | 
|   TextBody: | 
|   [* | 
|     // soh yee Jun-18-2013 (created) | 
|     gp := periodtaskoperation.MacroPlan().GlobalParameters_MP(); | 
|     process := periodtaskoperation.Operation(); | 
|     lotsize := process.LotSize(); | 
|      | 
|     if( not gp.GetIsLotSizeWithinTolerance( periodtaskoperation.RoundToNextMultiple( quantity ), quantity )) // mod is not supporting modulus of real numbers | 
|     { | 
|       minimumquantity := process.MinimumQuantity(); | 
|       PeriodTask_MP::DisplayQuantityToProcessValue( feedback_o, periodtaskoperation, quantity * process.QuantityToProcessFactor() ); | 
|      | 
|       if( process.HasMaximumQuantity() ) | 
|       { | 
|         feedback_o := feedback_o + Translations::MP_PeriodTask_MP_IsQuantityMultipleOfWithMaxLimit( lotsize, minimumquantity, process.MaximumQuantity() ); | 
|       } | 
|       else | 
|       { | 
|         feedback_o := feedback_o + Translations::MP_PeriodTask_MP_IsQuantityMultipleOfWithoutMaxLimit( lotsize, minimumquantity ); | 
|       } | 
|     } | 
|      | 
|     return feedback_o = ''; | 
|   *] | 
| } |