From 14f01dcdb7ab31794c418c3b16600eb70a061f01 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期一, 30 九月 2024 17:27:26 +0800
Subject: [PATCH] 发动机物流成本报表查询费用失败

---
 _Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
index 6c07839..90133e3 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
@@ -13,6 +13,8 @@
     allunit                   := DLEngineLogisticsCostReport::GetDefaultAllUnit();
     ccunit                    := DLEngineLogisticsCostReport::GetDefaultCCUnit();
     dlunit                    := DLEngineLogisticsCostReport::GetDefaultDLUnit();
+    ccfactory                 := DLEngineLogisticsCostReport::GetCCFactory();
+    dlfactory                 := DLEngineLogisticsCostReport::GetDLFactory();
     //dlline                    := DLEngineLogisticsCostReport::GetStockingPointDLLine();
     //ccrent                    := DLEngineLogisticsCostReport::GetStockingPointCCRent();
     //dlrent                    := DLEngineLogisticsCostReport::GetStockingPointCCRent();
@@ -59,7 +61,7 @@
                 if( isccrent or isdltoccrent){
                   //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
                   enginecost  := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date()
-                                                     and engine.Factory() = ccunit );
+                                                     and engine.Factory() = ccfactory );
                    if( not isnull( enginecost ) ){
                      quantity :=   [Number]pispip.NewSupplyQuantity();
                      if( isccrent ){
@@ -78,7 +80,7 @@
                 } else {
                   //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
                   enginecost     := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date()
-                                                     and engine.Factory() = dlunit  );
+                                                     and engine.Factory() = dlfactory  );
                    if( not isnull( enginecost ) ){
                      cost        := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
                      cell.DLRentStorCost( cell.DLRentStorCost() + cost );
@@ -114,7 +116,7 @@
               //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
               enginecost     := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                    and engine.MLB_MQB() = product.MQBMLB()
-                                                   and engine.Factory() = dlunit  );
+                                                   and engine.Factory() = dlfactory  );
               //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
               transcost      := selectobject( transcosts, Elements, trans, trans.Origin() = laneleg.OriginStockingPointID() 
                                                   and trans.Destination() = laneleg.DestinationStockingPointID() 
@@ -141,7 +143,7 @@
             //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
             enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = dlunit );
+                                                 and engine.Factory() = dlfactory );
             if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
               products.Add( product );
               ccrow          := table.GetRow( row.Name() );
@@ -169,7 +171,7 @@
             //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
             enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = dlunit );
+                                                 and engine.Factory() = dlfactory );
             if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
               products.Add( product );
               ccrow          := table.GetRow( row.Name() );
@@ -200,7 +202,7 @@
           //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
           enginecosts          := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit );
+                                                 and engine.Factory() = ccfactory );
           //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
           transcosts           := selectset( owner, LogisticsCostTransport, trans, trans.Origin() = tprow.SourceStockpoingPointID() 
                                                   and trans.Destination() = tprow.TargetStockpoingPointID() 
@@ -239,7 +241,7 @@
           //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
           enginecosts         := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit );
+                                                 and engine.Factory() = ccfactory );
           if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
             products.Add( forecast.Product_MP() );
             row               := table.GetRow( forecast.ProductID() );

--
Gitblit v1.9.3