Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetViolationMessageForInvalidPostponement () const declarative remote as String 
 | 
{ 
 | 
  Description: 'Return the violation message for invalid postponement' 
 | 
  TextBody: 
 | 
  [* 
 | 
    postponementspec := this.MasterSalesDemand().SalesSegment_MP().EffectivePostponementSpecification(); 
 | 
    value := ''; 
 | 
     
 | 
    if( not isnull( postponementspec ) ) 
 | 
    { 
 | 
      displayEnd := postponementspec.HorizonNrOfTimeUnit().AsQUILL()  
 | 
                    + " "  
 | 
                    + postponementspec.HorizonTimeUnit() 
 | 
                    + ifexpr( postponementspec.HorizonNrOfTimeUnit() > 1, 's', '' );   
 | 
                
 | 
      value := Translations::MP_BaseSalesDemandInPeriod_GetHasValidDemandManagement_OverPostponementHorizon( displayEnd )            
 | 
    } 
 | 
     
 | 
    return value; 
 | 
  *] 
 | 
} 
 |