lazhen
2024-10-09 f9c8e9e3438d19dc7a3ee087b631dbe593663112
_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
@@ -50,7 +50,7 @@
            periodname        := periodtime.Format( "M2/D2/Y" );
            
            //天,选择日颗粒度时,期末库存,最小库存,最大库存和平均库存的数值保持一致
            daycolumn         := selectobject( table, InventorySummaryColumn, column, column.Name() = periodname, column.Period() = periodtime, column.TimeUnit() = Translations::MP_GlobalParameters_Day() );
            daycolumn         := selectobject( table, InventorySummaryColumn, column, column.Name() = periodname, column.StartDate() = periodtime, column.TimeUnit() = Translations::MP_GlobalParameters_Day() );
            quantity          := ifexpr( pispip.Period_MP().IsHistorical(), [Number]pispip.ActualInventoryLevelEnd(), [Number]pispip.PlannedInventoryLevelEnd() );
            factoryrow.SetCellValue( daycolumn, quantity );
            allrow.SetCellValue( daycolumn, quantity );
@@ -77,9 +77,9 @@
    selections                := selectset( interface, InventoryPointSelection, selection, allsps.Find( selection.StockpoingPoint() ) >= 0 and selection.IsIncluded() );
    productids                := selectuniquevalues( selections, Elements, selection, selection.ProductID() );
    //最后将这些库位中零件号的数量进行加总
    traverse( table, InventorySummaryColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.Period() < startofplanning.Date() ){
    traverse( table, InventorySummaryColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() < startofplanning.Date() ){
      traverse( productids, Elements, productid ){
        column.GenerateCell( selections, ccsps, dlsps, table, column.Period(), column.Period(), productid, allunit, ccunit, dlunit );
        column.GenerateCell( selections, ccsps, dlsps, table, column.StartDate(), column.EndaDate(), productid, allunit, ccunit, dlunit );
      }
    }