陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Quintiq file version 2.0
#parent: #root
StaticMethod Update (
  Strategys strategies,
  Boolean isbatcheditmassscalingfactor,
  Real massscalingfactor,
  Boolean isbatcheditmonetaryscalingfactor,
  Real monetaryscalingfactor,
  Boolean isbatchedittimescalingfactor,
  Real timescalingfactor,
  Boolean isbatchedittimeaccountscalingfactor,
  Real timeaccountscalingfactor,
  Boolean isbatcheditinventoryholdingscalingfactor,
  Real inventoryholdingscalingfactor,
  Boolean isbatcheditlastautoscalingrun,
  DateTime lastautoscalingrun
)
{
  Description: "Batch edit strategies' scaling factor method"
  TextBody:
  [*
    // Batch edit strategies' scaling factor method
    // Traverse the selected set of strategies
    traverse( strategies, Elements, strategy )
    {
      // Get back the strategy level's value if the batch edit check boxes are not checked, instead of from UI.
      if ( not isbatcheditmassscalingfactor )
      {
        massscalingfactor := strategy.MassScalingFactor();
      }
      if ( not isbatcheditmonetaryscalingfactor )
      {
        monetaryscalingfactor := strategy.MonetaryScalingFactor();
      }
      if ( not isbatchedittimescalingfactor )
      {
        timescalingfactor := strategy.TimeScalingFactor();
      }
      if ( not isbatchedittimeaccountscalingfactor )
      {
        timeaccountscalingfactor := strategy.TimeAccountScalingFactor();
      }
      if ( not isbatcheditinventoryholdingscalingfactor )
      {
        inventoryholdingscalingfactor := strategy.InventoryHoldingScalingFactor();
      }
      if ( not isbatcheditlastautoscalingrun )
      {
        lastautoscalingrun := strategy.LastAutoScalingRun();
      }
      
      // Update strategy
      strategy.Update( massscalingfactor,
                       monetaryscalingfactor,
                       timescalingfactor,
                       timeaccountscalingfactor,
                       inventoryholdingscalingfactor,
                       lastautoscalingrun );
    }
  *]
}