admin
2024-10-18 763e8b714dcf5f25db6e805929dbd2d6f365f167
包装计划优化
已修改1个文件
21 ■■■■■ 文件已修改
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
@@ -36,13 +36,8 @@
        // 创建单元格
        cell := select( ppr, PackagingPlanCell, tempPPCell, tempPPCell.PackagingPlanColumn() = ppc );
        if ( isnull( cell ) ) {
          cell := ppr.PackagingPlanCell( relnew );
          cell.NetDemand( pispipl.InventoryLevelEnd() + pispipl.NewSupplyQuantity() - pispipl.DependentDemandAndSalesDemandQuantity() );
          cell.EndingInventory( pispipl.InventoryLevelEnd() );
          cell := ppr.PackagingPlanCell( relnew );
          cell.PackagingPlanColumn( relset, ppc );
        } else {
          cell.NetDemand( cell.NetDemand() + ( pispipl.InventoryLevelEnd() + pispipl.NewSupplyQuantity() - pispipl.DependentDemandAndSalesDemandQuantity() ) );
          cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() );
        }
        
        // 设置调出
@@ -65,12 +60,24 @@
          cell.TransferIn( cell.TransferIn() + pit.Quantity() );
        }
        
        // 长春工厂特殊情况设置包装库存和非包装库存
        // 大连工厂设置值
        if ( factory = "大连工厂" ) {
          // 净需求&剩余库存
          cell.NetDemand( cell.NetDemand() + pispipl.DependentDemandAndSalesDemandQuantity() );
          cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() );
        }
        // 长春工厂设置值
        if ( factory = "长春工厂" ) {
          // 剩余库存
          cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() );
          // 净需求【只取线边库】&包装库存&非包装库存
          if ( pisp.StockingPointID().Regex( "外租库" ) ) {
            cell.CC_PackagingInventory( pispipl.InventoryLevelEnd() );
          } else if ( pisp.StockingPointID().Regex( "线边库" ) ) {
            cell.CC_UnpackagedInventory( pispipl.InventoryLevelEnd() );
            cell.NetDemand( cell.NetDemand() + pispipl.DependentDemandAndSalesDemandQuantity() );
          }
        }