lihongji
2024-11-11 a67dc2f0b8dd2803982cfa9c6ea42b77c191d22c
_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
@@ -35,24 +35,26 @@
    }
    traverse( noptable, NewOfflinePlanRow, noprow ){
      row                  := table.GetRow( noprow );
      traverse( noprow, NewOfflinePlanCell, nopcell ){
        column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );
        cell               := selectobject( row, Cell, cell, cell.Column() = column );
        actproductionKey   := noprow.ProductID() + 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( not isnull( row ) ){
        traverse( noprow, NewOfflinePlanCell, nopcell ){
          column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );
          cell               := selectobject( row, Cell, cell, cell.Column() = column );
          actproductionKey   := noprow.ProductID() + 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();
          }
          cell.ActualProductionQty( actproductionqty );
          cell.InventoryWeight( nopcell.InventoryWeight() );
      //      cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() );
          cell.Quantity( nopcell.Quantity() );
      //      cell.Shift( nopcell.Shift() );
      //      cell.Value( nopcell.Value() );
        }
        cell.ActualProductionQty( actproductionqty );
        cell.InventoryWeight( nopcell.InventoryWeight() );
    //      cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() );
        cell.Quantity( nopcell.Quantity() );
    //      cell.Shift( nopcell.Shift() );
    //      cell.Value( nopcell.Value() );
      }
    }
    showtable.Generate( search );