Quintiq file version 2.0
#parent: MatrixEditorUnitCapacities
Response OnUpdateValue (
  UnitPeriodQuantity cell,
  Real value
) id:Response_MatrixEditorUnitCapacities_OnUpdateValue
{
  #keys: '[139394.1.91812684]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
  QuillAction
  {
    Body:
    [*
      // Create or update min max capacity
      unitperiodquantities := construct( UnitPeriodQuantitys );
      unitperiodquantities.Add( cell );
      UnitCapacity::CreateOrUpdateForUnitPeriodQuantitys( unitperiodquantities,
                                                          true /*isbatcheditcapacities*/,
                                                          cell.TimeUnitForCapacitiesCalculation(),
                                                          ifexpr( focusedattribute = attribute( UnitPeriodQuantity, MinCapacityPerTimeUnit ).Name(), 
                                                                  value, cell.MinCapacityPerTimeUnit() ),
                                                          ifexpr( focusedattribute = attribute( UnitPeriodQuantity, MaxCapacityPerTimeUnit ).Name(), 
                                                                  value, cell.MaxCapacityPerTimeUnit() ),
                                                          false /*isbatcheditmaxloadpercentage*/,
                                                          cell.MaximumLoadPercentage(),
                                                          false /*isbatcheditnrofunitsopen*/,
                                                          cell.NrOfOpen(),
                                                          false /*this period onwards*/
                                                        );
    *]
    GroupServerCalls: false
  }
}
