hongji.li
2023-11-03 aefafd2142478d4fb07d6b8b45c3047e247389e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Quintiq file version 2.0
#parent: #root
Function CalcFactor
{
  TextBody:
  [*
    // The default Factor is 1
    value := 1.0;
    // If the output quantity is not zero, then the factor is equal to the ratio of the quantity in process and the output quantity
    if( not isnull( this.Operation() ) and this.Operation().OutputQuantity() <> 0.0 )
    {
      value := this.QuantityInProcessUOM() / this.Operation().OutputQuantity() ;
    }
    
    this.Factor( value );
  *]
}