From 9e75417aab6ab66f28a2e1bc93c7e4b412b40990 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期六, 19 十月 2024 19:42:02 +0800
Subject: [PATCH] 长春&大连料架报表优化

---
 _Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl b/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl
index 7504705..567b121 100644
--- a/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl
@@ -9,6 +9,17 @@
   [*
     this.TotalQuantityOfMaterialRacks( totalQuantityOfMaterialRacks );
     
-    this.NumberOfEmptyShelves( ( totalQuantityOfMaterialRacks - this.PlannedInventory() ) / this.PackagingCapacity() );
+    // 绌烘枡鏋舵暟閲忚仈鍔�
+    this.NumberOfEmptyShelves( [Number] ( ( totalQuantityOfMaterialRacks - this.PlannedInventory() ) / this.PackagingCapacity() ) );
+    
+    // SUM琛岃仈鍔�
+    cell := select( this, CC_EngineRackColumn.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() = "SUM" );
+    cell.TotalQuantityOfMaterialRacks( sum( this, CC_EngineRackColumn.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.TotalQuantityOfMaterialRacks() ) );
+    cell.NumberOfEmptyShelves( sum( this, CC_EngineRackColumn.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.NumberOfEmptyShelves() ) );
+    
+    // SUM鍒楄仈鍔�
+    cell := select( this, CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackColumn().DisplayName() = "SUM" );
+    cell.TotalQuantityOfMaterialRacks( sum( this,CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.TotalQuantityOfMaterialRacks() ) );
+    cell.NumberOfEmptyShelves( sum( this,CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.NumberOfEmptyShelves() ) );
   *]
 }

--
Gitblit v1.9.3