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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method DataMockupGeneratePISPs ( 
 |    Number nrofproducts, 
 |    Number nrofstockingpoints, 
 |    String uomname, 
 |    String currencyname 
 |  ) 
 |  { 
 |    TextBody: 
 |    [* 
 |      macroplan := this.MacroPlan(); 
 |       
 |      // Create top most level ProductLevel_MP 
 |      ProductLevel_MP::Create( 'All Products', false, macroplan, false ); 
 |       
 |      // Create Product_MP for the number of passed in nrofproducts 
 |      for( i := 0; i < nrofproducts; i++ ) 
 |      { 
 |        // Product ID 
 |        id := 'Product_' + [String] i; 
 |       
 |        // Create Product_MP 
 |        Product_MP::Create( macroplan, 
 |                            id, 
 |                            '', 
 |                            id, 
 |                            uomname, 
 |                            false, 
 |                            '', 
 |                            '', 
 |                            false, 
 |                            0.0, 
 |                            false, 
 |                            0.0, 
 |                            false, 
 |                            false, 
 |                            false, 
 |                            true ); 
 |      } 
 |       
 |      // Create StockingPoint_MP for the number of passed in nrofstockingpoints 
 |      for( i := 0; i < nrofstockingpoints; i++ ) 
 |      { 
 |        // Stocking point ID 
 |        id := 'StockingPoint_' + [String] i; 
 |         
 |        // Create StockingPoint_MP 
 |        stockingpoint := StockingPoint_MP::Create( this.MacroPlan(), 
 |                                                   id, 
 |                                                   '', 
 |                                                   id, 
 |                                                   uomname, 
 |                                                   currencyname, 
 |                                                   true, 
 |                                                   Date::MinDate(), 
 |                                                   Date::MaxDate(), 
 |                                                   '', 
 |                                                   '', 
 |                                                   false ); 
 |         
 |        // Generate all products in stocking point                           
 |        traverse( macroplan, Product_MP, product ) 
 |        { 
 |          ProductInStockingPoint_MP::Create( product, stockingpoint ); 
 |        } 
 |      } 
 |    *] 
 |  } 
 |  
  |