Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod Apply ( 
 | 
  ManufactureLTProcessSection toApply 
 | 
) 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // yypsybs Aug-28-2023 (created) 
 | 
    parent := toApply.ManufactureLTImputation(); 
 | 
    toUpdate := select( toApply, ManufactureLTImputation.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 { 
 | 
      info( "operation to update not found" );   
 | 
    } 
 | 
  *] 
 | 
} 
 |