| | |
| | | localRowHandle := localRowIndexTree.GetHandle( row.ProductID() + row.ProductionLine() ); |
| | | localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue )); |
| | | if( isnull( localRowIndex )){ |
| | | localRow := localTable.LocalRow( relnew,CustomName := row.Name(),ProductID := row.ProductID(),ProductionLine := row.ProductionLine(),Index := localTable.GetRowIndexCache() ); |
| | | localRow := localTable.LocalRow( relnew,CustomName := row.ProductID() + " in " + row.ProductionLine(),ProductID := row.ProductID(),ProductionLine := row.ProductionLine(),Index := localTable.GetRowIndexCache() ); |
| | | localRows.Add( localRow ); |
| | | localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 ); |
| | | }else{ |
| | |
| | | localRowHandle := localRowIndexTree.GetHandle( pisp_mp.ProductID() + pisp_mp.StockingPoint_MP().Unit().Name() ); |
| | | localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue )); |
| | | if( isnull( localRowIndex )){ |
| | | localRow := localTable.LocalRow( relnew,CustomName := pisp_mp.Name(),ProductID := pisp_mp.ProductID(),ProductionLine := pisp_mp.StockingPoint_MP().Unit().Name(),Index := localTable.GetRowIndexCache() ); |
| | | localRow := localTable.LocalRow( relnew,CustomName := pisp_mp.ProductID() + " in " + pisp_mp.StockingPoint_MP().Unit().Name(),ProductID := pisp_mp.ProductID(),ProductionLine := pisp_mp.StockingPoint_MP().Unit().Name(),Index := localTable.GetRowIndexCache() ); |
| | | localRows.Add( localRow ); |
| | | localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 ); |
| | | }else{ |
| | |
| | | row.Delete(); |
| | | } |
| | | |
| | | traverse( localTable,LocalRow,row ){ |
| | | cells := selectset( row,LocalCell,cell,true ); |
| | | cellIndexTree := NamedValueTree::Create(); |
| | | for( i := 0;i < cells.Size(); i++){ |
| | | cell := cells.Element( i ); |
| | | cellHandle := cellIndexTree.GetHandle( row.CustomName() + cell.LocalColumn().CustomDate().AsQUILL() + cell.LocalColumn().TimeUnit() ); |
| | | cellIndexTree.Root().AddChild( cellHandle,i ); |
| | | } |
| | | traverse( localTable,LocalColumn,column ){ |
| | | cellHandle := cellIndexTree.GetHandle( row.CustomName() + column.CustomDate().AsQUILL() + column.TimeUnit() ); |
| | | cellIndex := guard( cellIndexTree.Root().Child( cellHandle ),null( NamedValue )); |
| | | if( isnull( cellIndex )){ |
| | | cell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := 0 ); |
| | | cells.Add( cell ); |
| | | cellIndexTree.Root().AddChild( cellHandle,cells.Size() - 1 ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | return localTable; |
| | | *] |
| | | } |