lazhen
2024-07-12 1e51fbda78f4782a252c5ad187064e96934a1eca
_Main/BL/Type_MachiningPipelineReport/Method_Generate.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
Method Generate (
  EnginePipelineSearch search,
  MachiningPipelineSearch search,
  Product_MPs products
)
{
@@ -23,22 +23,15 @@
        if( not isnull( column ) ){
          sumcell  := selectobject( column, Cell, c, c.Row() = sumrow );
          if( isnull( sumcell ) ){
            sumcell := column.Cell( relnew, InventoryQuantity := 0 );
            sumcell := MachiningPipelineCell::Initialize( column );
            sumrow.Cell( relinsert, sumcell );
          }
          
          showcell := cell.Copy( column );
          showrow.Cell( relinsert, showcell );
      
          sumcell.InventoryQuantity( cell.InventoryQuantity() + sumcell.InventoryQuantity() );
          traverse( cell, Demand, demand ){
            sumcell.Demand( relnew, EngineType := demand.EngineType(), Model := demand.Model(), Period := demand.Period(), Quantity := demand.Quantity() );
          }
          traverse( cell, Production, production ){
            sumcell.Production( relnew, EngineType := production.EngineType(), Period := production.Period(), DLProduction := production.DLProduction(), CCProduction := production.CCProduction() );
          }
          sumcell.Add( cell );
        }
      }
    }