renhao
2023-10-13 462215553c754d26acde8edab81b4a73f774e21e
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 Apply (
  ManufactureLTProcessSection toApply,
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    // yypsybs Aug-28-2023 (created)
    parent := toApply.ManufactureLTImputation();
    toUpdate := select( macroPlan, Routing.RoutingStep.Operation, op,
                        op.RoutingID() = parent.OrgCode() + "_" + parent.SkuID() 
                        and op.RoutingStepName() = toApply.ProcessSection() + "_" + toApply.Sequence()
                        and op.Name() = ifexpr( toApply.Line() <> "", 
                                                parent.OrgCode() + "_" + toApply.ProcessSection() + "_" + toApply.Line(),
                                                parent.OrgCode() + "_" + toApply.ProcessSection() ) );
    if( not isnull( toUpdate ) ) {
      toUpdate.UserLeadTime( Duration::Days( toApply.EditLT() ) );
      toApply.SystemLT( toApply.EditLT() );
    } else {
      debuginfo(  "operation to update not found" );  
    }
  *]
}