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
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method SetDefaultDisplayIndexForStockingPoint 
 |  { 
 |    Description: 'Set default display index for stocking point' 
 |    TextBody: 
 |    [* 
 |      traverse( this, StockingPoint_MP, u ) 
 |      { 
 |        i := 0; 
 |        spset := construct( StockingPoint_MPs ); 
 |        sp := select( this, StockingPoint_MP, pp, pp <> u and pp.DisplayIndexForExcel() = u.DisplayIndexForExcel() ); 
 |       
 |        if( not isnull( sp ) ) 
 |        { 
 |          while( not isnull( sp ) ) 
 |          { 
 |            spset.Add( sp ); 
 |            i++; 
 |            sp := select( this, StockingPoint_MP, pp, spset.Find( pp ) < 0 and pp.DisplayIndexForExcel() = i ); 
 |          } 
 |          u.DisplayIndexForExcel( i ); 
 |        } 
 |      } 
 |    *] 
 |  } 
 |  
  |