1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod Generate ( 
 |    InterfaceDataset interfaceDataset, 
 |    Date date, 
 |    String partno, 
 |    String inventory, 
 |    String fac, 
 |    Number quantitiy 
 |  ) 
 |  { 
 |    TextBody: 
 |    [* 
 |      // 甄兰鸽 Jul-26-2024 (created) 
 |      iid := selectobject( interfaceDataset, InventoryInterfaceData, iid, iid.Date() = date and iid.PartNumber() = partno ); 
 |      if( isnull( iid ) ){ 
 |        iid := interfaceDataset.InventoryInterfaceData( relnew, Date := date, PartNumber := partno ); 
 |      } 
 |      iidl := selectobject( iid, InventoryInterfaceDataDetail, detail, detail.InventoryPoint() = inventory and detail.Fac() = fac ); 
 |      if( isnull( iidl ) ){ 
 |        iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy ); 
 |      } 
 |    *] 
 |  } 
 |  
  |