Quintiq file version 2.0
#parent: MatrixEditorUnitCapacities
Response OnClick (
  structured[UnitPeriodQuantity] selection
) id:Response_MatrixEditorUnitCapacities_MenuResetToDefaultValue_OnClick
{
  #keys: '[139394.1.338487685]'
  CanBindMultiple: false
  DefinitionID => /MatrixEditorUnitCapacities/Responsedef_MatrixEditorLaneLegs_WebMenu_OnClick
  Initiator: 'MenuResetToDefaultValue'
  Precondition:
  [*
    return UnitPeriod::CanEdit( selection, feedback );
  *]
  QuillAction
  {
    Body:
    [*
      // Reset value to default
      gp := MacroPlan.GlobalParameters_MP();
      firstEle := selection.Element( 0 );
      UnitCapacity::CreateOrUpdateForUnitPeriodQuantitys( selection,
                                                          true /*isbatcheditcapacities*/,
                                                          Translations::MP_GlobalParameters_Day(),
                                                          gp.DefaultMinCapacityPerDayForUnit(),
                                                          gp.DefaultMaxCapacityPerDayForUnit(),
                                                          true /*isbatcheditmaxloadpercentage*/,
                                                          gp.DefaultMaxLoadPercentage(),
                                                          true /*isbatcheditnrofunitsopen*/,
                                                          gp.DefaultNumberOfUnits(),
                                                          false /*this period onwards*/
                                                        );
    *]
    GroupServerCalls: false
  }
}
