| Quintiq file version 2.0 | 
| #parent: MatrixEditorUnitCapacities | 
| Response OnUpdateValue ( | 
|   UnitPeriodQuantity cell, | 
|   String value, | 
|   String oldvalue | 
| ) id:Response_MatrixEditorUnitCapacities_OnUpdateValue_549 | 
| { | 
|   #keys: '[139394.1.91803048]' | 
|   CanBindMultiple: false | 
|   DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue' | 
|   QuillAction | 
|   { | 
|     Body: | 
|     [* | 
|       // Create or update time unit | 
|       cond := PeriodSpecification_MP::GetHasValidTimeUnit( value ); | 
|       if( cond ) | 
|       { | 
|         unitperiodquantities := construct( UnitPeriodQuantitys ); | 
|         unitperiodquantities.Add( cell ); | 
|         UnitCapacity::CreateOrUpdateForUnitPeriodQuantitys( unitperiodquantities, | 
|                                                             true /*isbatcheditcapacities*/, | 
|                                                             value, | 
|                                                             cell.MinCapacityPerTimeUnit(), | 
|                                                             cell.MaxCapacityPerTimeUnit(), | 
|                                                             false /*isbatcheditmaxloadpercentage*/, | 
|                                                             cell.MaximumLoadPercentage(), | 
|                                                             false /*isbatcheditnrofunitsopen*/, | 
|                                                             cell.NrOfOpen(), | 
|                                                             false /*this period onwards*/ | 
|                                                           ); | 
|       } | 
|       else | 
|       { | 
|         cell.TimeUnitForCapacitiesCalculation( oldvalue ); | 
|       } | 
|     *] | 
|     GroupServerCalls: false | 
|   } | 
| } |