From e2494303609cb24dd805b65c2654b82538be8c36 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期五, 18 十月 2024 11:22:24 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
---
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl b/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
index 78add67..4e84001 100644
--- a/_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
+++ b/_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,26 @@
cell.TransferIn( cell.TransferIn() + pit.Quantity() );
}
- // 闀挎槬宸ュ巶鐗规畩鎯呭喌璁剧疆鍖呰搴撳瓨鍜岄潪鍖呰搴撳瓨
+ // 澶ц繛宸ュ巶璁剧疆鍊�
+ if ( factory = "澶ц繛宸ュ巶" ) {
+ // 鍑�闇�姹�&鍓╀綑搴撳瓨&渚涘簲閲�
+ 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( "澶栫搴�" ) ) {
cell.CC_PackagingInventory( pispipl.InventoryLevelEnd() );
} else if ( pisp.StockingPointID().Regex( "绾胯竟搴�" ) ) {
cell.CC_UnpackagedInventory( pispipl.InventoryLevelEnd() );
+ cell.NetDemand( cell.NetDemand() + pispipl.DependentDemandAndSalesDemandQuantity() );
}
}
--
Gitblit v1.9.3