lazhen
2024-08-21 a5d4d31310d9792243db3ca06080a5f8b83b542c
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
@@ -3,20 +3,14 @@
StaticMethod CreateFullTable (
  const MacroPlans owners,
  RecycleBin recycleBin,
  const Archive archive
  const Archive archive,
  const MacroPlan owner
) as LocalTable
{
  TextBody:
  [*
    // rislai Aug-7-2024 (created)
    tables := construct( MP_Tables );
    traverse( owners,Elements,owner ){
      table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
      if( isnull( table )){
        table :=  MP_Cell_ScheduleSummary::Create( owner );
      }
      tables.Add( table );
    }
    tables := MP_Table::GetMP_Tables_ScheduleSummary( owners );
    
    scheduleSummaryOutputDataIndexTree := NamedValueTree::Create();
    scheduleSummaryOutputDatas := selectset( archive,ScheduleSummaryOutputLine.ScheduleSummaryOutputData,data,
@@ -42,7 +36,7 @@
       localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 );
    }
    traverse( tables,Elements.MP_Row,row ){
       localRow := localTable.LocalRow( relnew,CustomName := row.Name(),Index := localTable.GetRowIndexCache() );
    
       traverse( localColumns,Elements,localColumn ){
@@ -88,6 +82,18 @@
       }
    }
    
    //startDate := owner.StartOfPlanning().Date() + 7;
    //endDate := maxselect( owner,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.EndDate(),period.TimeUnit() = "Month" ).EndDate();
    //columns := construct( MP_Columns );
    //columnIndexTree := NamedValueTree::Create();
    //for( i := startDate;i < endDate; i := i + 1){
    //  column := table.MP_Column( relnew,CustomDate := i );
    //  columnHandle := columnIndexTree.GetHandle( i.AsQUILL() );
    //  columns.Add( column );
    //  columnIndexTree.Root().AddChild( columnHandle,columns.Size() - 1 );
    //}
    return localTable;
  *]
}