| 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
 | | Quintiq file version 2.0 |  | #parent: #root |  | Method WriteQuantity ( |  |   TransitionPeriod_MP transperiod |  | ) |  | { |  |   Description: 'write out quantity planned on combi period task to period task in transition' |  |   TextBody: |  |   [* |  |     ptc := select( transperiod,  |  |                    PeriodTaskInTransition,  |  |                    p,  |  |                    p.OperationInTransition().OperationInTransitionType().Operation() = this.Operation() );  |  |      |  |     if ( isnull( ptc ) )  |  |     { |  |       opintrans := select( transperiod, Transition_MP.OperationInTransition, o, true, o.OperationInTransitionType().Operation() = this.Operation() );  |  |       unitperiod := transperiod.UnitPeriod();  |  |       pto := select( unitperiod, PeriodTaskOperation, p, true, p.Operation() = this.Operation() );  |  |       if ( isnull( pto ) )  |  |       { |  |         pto := PeriodTaskOperation::Create( this.Operation(), unitperiod, 0.0, false );  |  |       } |  |       ptc := pto.PeriodTaskInTransition( relnew, OperationInTransition := opintrans ); // note we cannot call create because we need to explicitly create new object  |  |     } |  |      |  |     ptc.Quantity( ptc.Quantity() + this.Quantity() ); // we need to add |  |   *] |  |   InterfaceProperties { Accessibility: 'Module' } |  | } | 
 |