| | |
| | | // 创建单元格 |
| | | 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() ); |
| | | } |
| | | |
| | | // 设置调出 |
| | |
| | | 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() ); |
| | | } |
| | | } |
| | | |