hongji.li
2023-10-07 9771a9de0e5f7b291ee89ff6a063eec0b8981d64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Quintiq file version 2.0
#parent: #root
StaticMethod CreateIfNotExist (
  MatAttrSettingAndPlanStrategy parent,
  String productCode,
  Real standardLT,
  String productDesc
) as MatAttrSettingAndPlanStrategyDetail
{
  TextBody:
  [*
    // yypsybs Sep-8-2023 (created)
    value := select( parent, MatAttrSettingAndPlanStrategyDetail, item, item.ProductCode() = productCode );
    if( isnull( value ) ) {
      value := parent.MatAttrSettingAndPlanStrategyDetail( relnew,
                                                           ProductCode := productCode, 
                                                           StandardLT := standardLT, 
                                                           ProductDesc := productDesc );
    }
    return value;
  *]
}