xiaoding721
2024-10-17 ffb76f7a9a094cd200367d23b6822f4c1f7c873c
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_CreateFullTable.qbl
@@ -80,10 +80,16 @@
            unitIndex := guard( unitIndexTree.Root().Child( unitHandle ),null( NamedValue ));
            if( not isnull( unitIndex )){
              unit := units.Element( unitIndex.GetValueAsNumber() );
              output := sum( unit,UnitPeriod.PeriodTask_MP.NewSupply,np,
              output := sum( unit,UnitPeriod.astype( UnitPeriodTime ).PeriodTask_MP.NewSupply,np,
                             np.PeriodTask_MP().UnitPeriod().StartDate() >= localColumn.CustomDate() and 
                             np.PeriodTask_MP().UnitPeriod().StartDate() < localColumn.CustomDate().StartOfNextMonth(),
                             np.PeriodTask_MP().UnitPeriod().StartDate() < localColumn.CustomDate().StartOfNextMonth() and
                             np.PeriodTask_MP().UnitPeriod().Period_MP().TimeUnit() = "Day",
                             np.Quantity() );
              output := sum( unit,StockingPoint_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod,pispip,
                             pispip.Period_MP().StartDate() >= localColumn.CustomDate() and
                             pispip.Period_MP().StartDate() < localColumn.CustomDate().StartOfNextMonth() and
                             pispip.Period_MP().TimeUnit() = "Day",
                             pispip.NewSupplyProductionQuantity());
            }
          }else{
            scheduleSummaryOutputDataKey := row.Name() + localColumn.CustomDate().AsQUILL();
@@ -138,6 +144,11 @@
       }
    }
    
    traverse( localTable,LocalRow.LocalCell.astype( LocalCell_ScheduleSummary ),cell ){
      cell.Capacity( cell.Capacity() / tables.Size() );
      cell.Output( cell.Output() / tables.Size() );
    }
    //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 );