From 712d2f68e0d1e9e111aa5d870283f4edf2da3739 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期二, 22 十月 2024 14:10:28 +0800
Subject: [PATCH] 财务产量/销量报表刷新导出报错

---
 _Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
index 73339a8..a0bf9ca 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
@@ -38,12 +38,21 @@
           row                     := c.FinancialSalesRow();
           //Factory
           InventorySummarySource::CreateCellElement( xmlDOM, searchunitcolumn, row.Factory() );
-          //Generation
-          InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() );
-          //Power
-          InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() );
-          //MLBMQBS
-          InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() );
+          if( not isnull( row.Product_MP() ) ){
+            //Generation
+            InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() );
+            //Power
+            InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() );
+            //MLBMQBS
+            InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() );
+          }else{
+            //Generation
+            InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, '' );
+            //Power
+            InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, '' );
+            //MLBMQBS
+            InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, '' );
+          }
           //Product
           InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
           //Unit

--
Gitblit v1.9.3