limj
2023-10-24 93652435728de839582440eefd5122c281181d35
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
Quintiq file version 2.0
#parent: #root
Method IsChanged (
  String strategy,
  Boolean overwritelocked,
  Boolean onlyplanonestep,
  String smartplandirection,
  Boolean limitunit,
  Units units,
  output String feedback_o
) declarative remote as Boolean
{
  Description: 'Check whether data is changed in UI'
  TextBody:
  [*
    existingunits := this.UnitForSmartPlan( relget );
    notinnewset := existingunits.Difference( units );
    notinexisting := units.Difference( existingunits );
    
    ischanged := strategy <> this.Strategy() 
                 or overwritelocked <> this.OverwriteLockedPlanning()
                 or onlyplanonestep <> this.OnlyPlanOneStep()
                 or limitunit <> this.LimitUnitBySmartPlan()
                 or smartplandirection <> this.SmartPlanDirection()
                 or  notinnewset.Size() > 0 or notinexisting.Size() >0;
    
    if ( not ischanged )
    {
      feedback_o := Translations::MP_Designer_NoChangesMade();
    }
    
    return ischanged;
  *]
}