From ed070d695972cadcf9b6bbfe9e779aa5a0850125 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期三, 09 十月 2024 09:15:28 +0800
Subject: [PATCH] 库存汇总报表数据逻辑bug

---
 _Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl
index a024d30..1dad475 100644
--- a/_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_EnginePipelineSource/StaticMethod_Initialize.qbl
@@ -8,14 +8,7 @@
   [*
     // 鐢勫叞楦� Jun-24-2024 (created)
     owner.EnginePipelineSource( relflush );
-    //ccunit                    := EnginePipelineReport::GetDefaultCCUnit();
-    //dlunit                    := EnginePipelineReport::GetDefaultDLUnit();
     productparent             := EnginePipelineReport::GetDefaultProductParent();
-    //ccalineunit               := EnginePipelineReport::GetDefaultCCALineUnit();
-    //dlalienunit               := EnginePipelineReport::GetDefaultDLALineUnit()
-    //ccmplineunit              := EnginePipelineReport::GetDefaultCCMPLineUnit()
-    //dlmplineunit              := EnginePipelineReport::GetDefaultDLMPLineUnit();
-    //allunit                   := EnginePipelineReport::GetDefaultAllUnit();
     source                    := owner.EnginePipelineSource( relnew, Name := EnginePipelineReport::GetDefaultName() );
     table                     := source.Report( relnew, ID := source.Name(), Name := source.Name() );
     showtable                 := source.Report( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsShow := true );
@@ -28,16 +21,11 @@
     endperiod                 := maxobject( owner, Period_MP, period, not period.IsHistorical() and period.TimeUnit() = Translations::MP_GlobalParameters_Day(), period.StartDate() );
     
     //鐢熸垚鐢熶骇鍜屽簱瀛樻暟鎹�
-    //traverse( owner, StockingPoint_MP, stockingpoint ){
-    traverse( owner, StockingPoint_MP, stockingpoint, stockingpoint.ID().EndsWith( '鍘傚唴搴�' ) ){
-    //  unit                    := stockingpoint.Unit();
-    //  parentunits             := unit.GetAllParent();
+    traverse( owner, StockingPoint_MP, stockingpoint ){
       //鏄惁灞炰簬闀挎槬宸ュ巶
-    //  iscc                    := unit.ID() = ccalineunit or unit.ID() = ccmplineunit or exists( parentunits, Elements, punit, punit.ID() = ccalineunit or punit.ID() = ccmplineunit );
-      iscc                    := stockingpoint.ID().StartsWith( 'CC' );
+      iscc                    := ( stockingpoint.ID().StartsWith( 'CC' ) or stockingpoint.ID().StartsWith( '闀挎槬' ) ) and stockingpoint.ID().EndsWith( '鍘傚唴搴�' );
       //鏄惁灞炰簬澶ц繛宸ュ巶
-    //  isdl                    := unit.ID() = dlalienunit or unit.ID() = dlmplineunit  or exists( parentunits, Elements, punit, punit.ID() = dlalienunit or punit.ID() = dlmplineunit );
-      isdl                    := stockingpoint.ID().StartsWith( '澶ц繛' );
+      isdl                    := ( ( stockingpoint.ID().StartsWith( 'DL' ) or stockingpoint.ID().StartsWith( '澶ц繛' ) ) and stockingpoint.ID().EndsWith( '鍘傚唴搴�' ) ) or  stockingpoint.ID() = '澶ц繛澶栫搴�';
       
       traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() and not pisp.IsSystem() 
                 and exists( pisp.Product_MP().GetAllParent(), Elements, e, e.ID() = productparent ) 

--
Gitblit v1.9.3