1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| Quintiq file version 2.0
| #parent: #root
| Method NewTransportCapacity (
| internal[GUIComponent] parent
| ) as TransportCapacity id:Method_DialogCreateEditTransportCapacity_NewTransportCapacity_113
| {
| #keys: '[113694.0.1522316852]'
| Body:
| [*
| // New transport capacity
|
| Dialog.ShowHideComponentForBatchEdit( false, true, false );
|
| unit := select( MacroPlan, Unit, unit, unit.HasCapacityTypeTransportQuantity() );
|
| data := unit.TransportCapacity( relshadow, UnitID := unit.ID(), Start := MacroPlan.StartOfPlanning() );
|
| Dialog.Data( data );
| Dialog.SetDefaultValue( null( UnitPeriodTransportQuantity ) );
|
| result := Dialog.DoModal( parent );
| newobj := null( TransportCapacity );
|
| if( result > 0 )
| {
| newobj := TransportCapacity::Create( data.Unit(),
| data.Start(),
| data.TimeUnit(),
| data.MinimumCapacity(),
| data.MaximumCapacity(),
| data.LotSize(),
| data.HasSecondaryCapacity(),
| data.SecondaryLotSize(),
| data.SecondaryMaximumCapacity(),
| data.SecondaryMinimumCapacity(),
| data.SecondaryUnitOfMeasureName(),
| false );
| }
|
| return newobj;
| *]
| }
|
|