Quintiq file version 2.0
#parent: #root
Method SetDefaultValue (
  PostponementSpecification postponementspecification
) id:Method_DialogCreateEditPostponementSpecification_SetDefaultValue
{
  #keys: '[130036.1.332577503]'
  Body:
  [*
    // Sets a default value for PS (Default = 1 Month)
    data := Dialog.Data();
    data.HorizonTimeUnit( guard ( postponementspecification.HorizonTimeUnit(), Translations::MP_GlobalParameters_Month() ) );
    data.HorizonNrOfTimeUnit( guard( postponementspecification.HorizonNrOfTimeUnit(), 1 ) );
    data.MaxTimeUnit( guard( postponementspecification.MaxTimeUnit(), Translations::MP_GlobalParameters_Month() ) );
    data.MaxNrOfTimeUnit( guard( postponementspecification.MaxNrOfTimeUnit(), 1 ) );
  *]
}
