Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetSuggestedQuantityString () declarative remote as String 
 | 
{ 
 | 
  Description: 
 | 
  [* 
 | 
    Returns a suggested quantity based on input factor and current period task quantity 
 | 
    For dependent demand of period task only 
 | 
  *] 
 | 
  TextBody: 
 | 
  [* 
 | 
    // tyg2 Aug-28-2018 (created) 
 | 
    str := ''; 
 | 
    ptqty := this.PeriodTask_MP().Quantity(); 
 | 
    gp := this.PeriodTask_MP().MacroPlan().GlobalParameters_MP(); 
 | 
     
 | 
    if( not isnull( this.ProcessInput() ) and this.ProcessInput().istype( OperationInput ) ) 
 | 
    { 
 | 
      operationinput := this.ProcessInput().astype( OperationInput ); 
 | 
      qty := operationinput .Factor() * ptqty; 
 | 
      str := Translations::MP_DependentDemand_GetSuggestedQuantity( qty ); 
 | 
       
 | 
      if( operationinput.IsElementOfInputGroup() ) 
 | 
      { 
 | 
        minqty := operationinput.MinQuantityFactor() * ptqty; 
 | 
        maxqty := operationinput.MaxQuantityFactor() * ptqty; 
 | 
        str := Translations::MP_DependentDemand_GetSuggestedQuantityRange( minqty.Round( gp.NumberOfDecimals() ) , maxqty.Round( gp.NumberOfDecimals() ) ); 
 | 
      } 
 | 
    } 
 | 
     
 | 
     
 | 
    return str; 
 | 
  *] 
 | 
} 
 |