From 3bb308481a906e3c2c9c1670905249fb73f36100 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期四, 26 九月 2024 17:59:39 +0800
Subject: [PATCH] 报表导入导出图标修改

---
 _Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl |   36 +++++++++++++++++++-----------------
 1 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
index d2b2932..8677d00 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
@@ -83,27 +83,29 @@
       //鏄惁灞炰簬闀挎槬瑁呴厤绾�
     //  iscc                  := unit.ID() = ccspline or exists( parentunits, Elements, punit, punit.ID() = ccspline );
     //  if( table.IsInUnit( stockingpoint, ccspline ) ){
-        traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and pisp.Product_MP().MQBMLB() = 'MQB' 
+        traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf()
                   and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear 
                               and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ) ){//浜у搧涓篗QB
           product           := pisp.Product_MP();
           allrow            := table.GetRow( allunit, product );
-          ccrow             := table.GetRow( ccunit, product );
-          products.Add( product );
-          traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() 
-                    and pispip.Period_MP().StartDate() < startofnextyear 
-                    and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ){
-            dayperiodtime   := pispip.Start().Date();
-            dayperiodname   := dayperiodtime.Format( "M2/D2/Y" );
-            periodtime      := pispip.Start().StartOfMonth().Date();
-            periodname      := periodtime.Format( "M2/D2/Y" );
-            daycolumn       := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
-            column          := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
-            quantity        := ifexpr( isdl, [Number]pispip.NewSupplyQuantity(), [Number]pispip.DependentDemandAndSalesDemandQuantity() );//鍥涜垗浜斿叆
-            
-            ccrow.Initialize( column, quantity );//鍙朤otal Demand瀛楁鎸夋湀姹囨�婚渶姹傛暟閲�
-            ccrow.Initialize( daycolumn, quantity );
-            allrow.Initialize( column, quantity );
+          if( isdl or pisp.Product_MP().MQBMLB() = 'MQB' ){
+            factoryrow      := table.GetRow( ifexpr( isdl, dlunit, ccunit ), product );
+            products.Add( product );
+            traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() 
+                      and pispip.Period_MP().StartDate() < startofnextyear 
+                      and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ){
+              dayperiodtime := pispip.Start().Date();
+              dayperiodname := dayperiodtime.Format( "M2/D2/Y" );
+              periodtime    := pispip.Start().StartOfMonth().Date();
+              periodname    := periodtime.Format( "M2/D2/Y" );
+              daycolumn     := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
+              column        := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
+              quantity      := ifexpr( isdl, [Number]pispip.NewSupplyQuantity(), [Number]pispip.DependentDemandAndSalesDemandQuantity() );//鍥涜垗浜斿叆
+              
+              factoryrow.Initialize( column, quantity );//鍙朤otal Demand瀛楁鎸夋湀姹囨�婚渶姹傛暟閲�
+              factoryrow.Initialize( daycolumn, quantity );
+              allrow.Initialize( column, quantity );
+            }
           }
         }
     //  }

--
Gitblit v1.9.3