xiaoding721
2024-10-29 69296cb82cbac409959d82417ad0eddf07f51bbb
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
@@ -65,14 +65,12 @@
          // 净需求&剩余库存&供应量
          cell.NetDemand( cell.NetDemand() + pispipl.DependentDemandAndSalesDemandQuantity() );
          cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() );
          cell.NewSupply( cell.NewSupply() + pispipl.NewSupplyQuantity() );
        }
        
        // 长春工厂设置值
        if ( factory = "长春工厂" ) {
          // 剩余库存&供应量
          cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() );
          cell.NewSupply( cell.NewSupply() + pispipl.NewSupplyQuantity() );
          
          // 净需求【只取线边库】&包装库存&非包装库存
          if ( pisp.StockingPointID().Regex( "外租库" ) ) {
@@ -83,6 +81,11 @@
          }
        }
        
        // 设置New Supply,纯生产值
        traverse ( pispipl, NewSupply, ns, ns.PeriodTask_MP().istype( PeriodTaskOperation ) ) {
          cell.NewSupply( cell.NewSupply() + ns.Quantity() );
        }
        // 设置前一天库存
        if ( pispipl.Start().Date() = macroPlan.StartOfPlanning().Date() ) {
          prePISPIPL  := pispipl.PreviousPlanningPISPIP().astype( ProductInStockingPointInPeriodPlanningLeaf ); // 前一个pispippl