From 9114e6d212617a2b12f19dc37d697b24d9efb1a0 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期一, 28 十月 2024 18:33:41 +0800
Subject: [PATCH] 包装计划优化

---
 _Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl b/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
index 4e84001..e45b9e4 100644
--- a/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
+++ b/_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 ); // 鍓嶄竴涓猵ispippl

--
Gitblit v1.9.3