lazhen
2024-10-09 f9c8e9e3438d19dc7a3ee087b631dbe593663112
_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl
@@ -30,7 +30,6 @@
      traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() and not pisp.IsSystem() 
                and exists( pisp.Product_MP().GetAllParent(), Elements, e, e.ID() = productparent ) 
                and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day() and ( pispip.NewSupplyQuantity() <> 0 or pispip.PlannedInventoryLevelEnd() <> 0 ) ) ){
        weekstart           := owner.StartOfPlanning().Date();
        pispips             := selectsortedset( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() 
                                                    and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day(), pispip.Start() );
        row := table.GetRow( pisp.ProductID() );
@@ -50,8 +49,7 @@
          //库存需要取最后一天
          row.SetCellInventoryValue( daycolumn, [Real]inventoryquantity );
      
          if( pispip.Start() = weekstart + Duration::Days( 6 ) or pispip.Period_MP() = endperiod ){
            weekstart       := ( weekstart + Duration::Days( 7 ) ).Date();
          if( pispip.Start().Date() = weekcolumn.EndDate() or pispip.Period_MP() = endperiod ){
              
            row.SetCellInventoryValue( weekcolumn, [Real]inventoryquantity );
          }