chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
Quintiq file version 2.0
#parent: #root
Function CalcDisplayMaxDuration
{
  TextBody:
  [*
    // Set transition derived max duration if there is operation linked
    value := '';
    if( not this.IsDuration() and this.HasInputMaxQuantity() and this.DefaultMaxQuantity() > 0 and this.OperationInTransitionType( relsize ) > 0 )
    {
      quantity := this.DefaultMaxQuantity();
      value := [String]TransitionType_MP::GetDurationBasedOnQuantity( this.MinOperationInTransitionType(),
                                                                      quantity,
                                                                      quantity,
                                                                      true,
                                                                      true );
    }
    else if( this.IsDuration() and this.HasInputMaxDuration() and this.DefaultMaxDuration() > Duration::Zero())
    {
      value := [String]this.DefaultMaxDuration();
    }
    this.DisplayMaxDuration( value );
  *]
  InterfaceProperties { Accessibility: 'Module' }
}