| | |
| | | actproductiontree := NamedValueTree::Create(); |
| | | for( i := 0; i< actproductiondatas.Size(); i++ ){ |
| | | actproduction := actproductiondatas.Element( i ); |
| | | actproductionKey := actproduction.ProductNo() + actproduction.ProductionDate().AsQUILL(); |
| | | actproductionhandle := actproductiontree.GetHandle( actproductionKey ); |
| | | actproductiontree.Root().AddChild( actproductionhandle,i ); |
| | | linename := actproduction.Fac().Concat( ' ' ); |
| | | if( actproduction.LineName().FindString( '/', 0 ) > -1 ){ |
| | | linenames := actproduction.LineName().Tokenize( '/' ); |
| | | traverse( linenames, Elements, e ){ |
| | | actproductionKey := actproduction.ProductNo() + linename + e + actproduction.ProductionDate().AsQUILL(); |
| | | actproductionhandle := actproductiontree.GetHandle( actproductionKey ); |
| | | actproductiontree.Root().AddChild( actproductionhandle,i ); |
| | | } |
| | | }else{ |
| | | actproductionKey := actproduction.ProductNo() + linename + actproduction.LineName() + actproduction.ProductionDate().AsQUILL(); |
| | | actproductionhandle := actproductiontree.GetHandle( actproductionKey ); |
| | | actproductiontree.Root().AddChild( actproductionhandle,i ); |
| | | } |
| | | } |
| | | |
| | | traverse( noptable, NewOfflinePlanRow, noprow, noprow.Type() = '1' ){ |
| | |
| | | traverse( noprow, NewOfflinePlanCell, nopcell ){ |
| | | column := selectobject( table, Column, column, column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );//column.TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | actproductionKey := noprow.ProductID() + column.StartDate().AsQUILL(); |
| | | actproductionKey := noprow.ProductID() + noprow.ProductionLine() + column.StartDate().AsQUILL(); |
| | | actproductionhandle:= actproductiontree.GetHandle( actproductionKey ); |
| | | actproductionindex := guard( actproductiontree.Root().Child( actproductionhandle ),null( NamedValue )); |
| | | |
| | | actproductionqty := 0.0; |
| | | if( not isnull( actproductionindex )){ |
| | | actproduction := actproductiondatas.Element( actproductionindex.GetValueAsNumber() ); |
| | | actproductionqty := actproduction.ActualOut(); |
| | | } |
| | | if( isnull( cell ) ){ |
| | | cell := row.Cell( relnew, InventoryWeight := 0, ProductionSerialNumber := 0, Quantity := 0, Shift := '', Value := '' ); |
| | | column.Cell( relinsert, cell ); |
| | | } |
| | | cell.ActualProductionQty( actproductionqty ); |
| | | cell.InventoryWeight( nopcell.InventoryWeight() ); |
| | | cell.Order( nopcell.Order() ); |