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
31
32
33
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod Create ( 
 |    String id, 
 |    Product_MP owner, 
 |    StockingPoint_MP stockingpoint, 
 |    Date date, 
 |    Date manufactureddate, 
 |    Real inventoryquantity, 
 |    String description, 
 |    Boolean isfromdb 
 |  ) as InventorySupply 
 |  { 
 |    Description: 'Create new inventory supply for a PISPIP' 
 |    TextBody: 
 |    [* 
 |      // Wayne Apr-15-2013 (created) 
 |       
 |      pisp := owner.AddToStockingPoint( stockingpoint ); 
 |       
 |      inventorysupply := owner.InventorySupply( relnew, 
 |                                                //Set the PISP so that this relation can be used in the same transaction without propagation 
 |                                                ProductInStockingPoint_MP := pisp, 
 |                                                ID := id, 
 |                                                ProductID := owner.ID(), 
 |                                                StockingPointID := stockingpoint.ID() 
 |                                               ); 
 |       
 |      inventorysupply.Update( owner, stockingpoint, date, manufactureddate, inventoryquantity, description, isfromdb ); 
 |       
 |      return inventorysupply; 
 |    *] 
 |  } 
 |  
  |