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
26
27
28
29
30
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod ArchivedData ( 
 |    InterfaceDataset interfaceDataset, 
 |    MacroPlan macroPlan 
 |  ) 
 |  { 
 |    TextBody: 
 |    [* 
 |      traverse ( macroPlan, SalesDemand.astype( Forecast ), f, f.Origin() = "CC-TRC" or f.Origin() = "DL-TRC" ) { 
 |        factory := f.Origin().Tokenize( "-" ).Element( 0 ); 
 |         
 |        itrcf := select( interfaceDataset, InterfaceTRCForecast, tempITRCF, tempITRCF.PartNumber() = f.ProductID() and tempITRCF.Date() = f.StartDate() ); 
 |         
 |        if ( not isnull( itrcf ) ) { 
 |          itrcf.Delete(); 
 |        } 
 |         
 |        interfaceDataset.InterfaceTRCForecast( relnew,  
 |                                               Date       := f.StartDate(), 
 |                                               Factory    := factory, 
 |                                               PartNumber := f.ProductID(), 
 |                                               Quantity   := f.Quantity(), 
 |                                               Generation := f.Product_MP().Generation(), 
 |                                               MLBMQB     := f.Product_MP().MQBMLB(), 
 |                                               Power      := f.Product_MP().Power() 
 |                                              ); 
 |      } 
 |    *] 
 |  } 
 |  
  |