admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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 );
  *]
}