| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateOrUpdate ( |
| | | GlobalOTDSOP parent, |
| | | MacroPlan macroPlan, |
| | | String orgCode, |
| | | String productId, |
| | |
| | | TextBody: |
| | | [* |
| | | // yypsybs Aug-25-2023 (created) |
| | | parent := select( macroPlan, ManufactureLTImputation, item, item.OrgCode() = orgCode and item.SkuID() = productId ); |
| | | if( isnull( parent ) ) { |
| | | parent := macroPlan.ManufactureLTImputation( relnew, OrgCode := orgCode, SkuID := productId, Describe := parentDesc ); |
| | | ltParent := select( parent, ManufactureLTImputation, item, item.OrgCode() = orgCode and item.SkuID() = productId ); |
| | | if( isnull( ltParent ) ) { |
| | | ltParent := parent.ManufactureLTImputation( relnew, OrgCode := orgCode, SkuID := productId, Describe := parentDesc ); |
| | | } else { |
| | | parent.Describe( parentDesc ); |
| | | ltParent.Describe( parentDesc ); |
| | | } |
| | | child := select( parent, ManufactureLTProcessSection, item, item.ProcessSection() = processSection and item.Sequence() = seq and item.Line() = line ); |
| | | child := select( ltParent, ManufactureLTProcessSection, item, item.ProcessSection() = processSection and item.Sequence() = seq and item.Line() = line ); |
| | | if( isnull( child ) ) { |
| | | child := parent.ManufactureLTProcessSection( relnew, |
| | | child := ltParent.ManufactureLTProcessSection( relnew, |
| | | ProcessSection := processSection, Sequence := seq, Line := line, SystemLT := systemLt, |
| | | Edited := edited, EditLT := editLt, Describe := childDesc ); |
| | | } else { |