lazhen
2024-06-05 c425d960e4eefbe0565de33aabbdc83552580e88
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
StaticMethod ValidateInput (
  MacroPlan owner,
  ChangeLossSetting old,
  Unit unit,
  Product_MP product1,
  Product_MP product2,
  Number number
) as Boolean
{
  TextBody:
  [*
    // 甄兰鸽 Jun-5-2024 (created)
    feedback := '';
    if( isnull( unit ) or isnull( product1 ) or isnull( product2 ) or number < 1 ){
      feedback := Translations::MP_ChangeLossSetting_CheckNull();
    }
    if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit and cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) ){
      feedback := Translations::MP_ChangeLossSetting_Exist()
    }
        
    return feedback = '';
  *]
}