From 4668a16a939a1d4d4fdfe11416158f8cd53a536d Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期一, 21 十月 2024 10:24:58 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev

---
 _Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement#817.qbl                                 |   23 
 _Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl                                                          |    2 
 _Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement0.qbl                                      |   19 
 _Main/BL/Type_InventorySummarySource/StaticMethod_GetSearchRows.qbl                                           |   22 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl                                          |    8 
 _Main/Sys/Repr/Global/CC_EngineRackCell.qrp                                                                   |  115 +++
 _Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl                                                       |    8 
 _Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl                                                          |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def      |   19 
 _Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl                                                       |  144 ++++
 _Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl                                                |   25 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl                                  |    8 
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl                     |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def |   19 
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl                                    |    8 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl                            |    8 
 _Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl                                               |   26 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl                         |    8 
 _Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw                                                       |  157 ++++
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl                              |    8 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl                                                     |    8 
 _Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl                                                   |   49 +
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl                                            |    8 
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl                                             |    8 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl                              |    8 
 _Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl                                                       |   78 ++
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl                         |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def                   |    2 
 _Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling4.qbl                                                  |   32 
 _Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def                           |   22 
 _Main/Sys/Repr/Global/DL_EngineRackCell.qrp                                                                   |  170 +++++
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl                                               |    8 
 _Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl                                                       |  111 +++
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl                          |    8 
 _Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl                                                |   11 
 _Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp                                                      |    8 
 _Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl                                                   |   60 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl                                  |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def |   19 
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl                                      |    8 
 _Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement#822.qbl                                 |   24 
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl                            |    8 
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl                              |    8 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl                                                |    8 
 _Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl                                                   |    8 
 _Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl              |    8 
 _Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement0.qbl                                    |   21 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl                                  |    8 
 _Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl                                                |   25 
 _Main/BL/Type_Unit/Method_WholeShiftFiltering.qbl                                                             |    2 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl                                                  |    8 
 _Main/BL/Type_InventorySummarySource/StaticMethod_Download0.qbl                                               |  104 +++
 _Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl                                                            |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def      |   19 
 _Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick#593.def        |   45 +
 _Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl                                                   |    8 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl                  |    8 
 _Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement.qbl                                       |   16 
 /dev/null                                                                                                     |   13 
 _Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement.qbl                                     |   26 
 _Main/UI/MacroPlannerWebApp/Views/CCEngineRackReport.vw                                                       |    2 
 _Main/BL/Type_InventorySummarySource/StaticMethod_Download.qbl                                                |  235 ++-----
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl                                            |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def                   |    2 
 _Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl                                                   |    8 
 _Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl                                                |   11 
 _Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick#844.def        |   22 
 67 files changed, 1,678 insertions(+), 256 deletions(-)

diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl
new file mode 100644
index 0000000..fb7651e
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateCleaningCost
+{
+  #keys: '3[415754.0.459255955][415754.0.459255954][415754.0.459255956]'
+  Description: '娓呮礂璐圭敤鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl
new file mode 100644
index 0000000..5dd4ab0
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateCoefficient
+{
+  #keys: '3[415754.0.459231854][415754.0.459231853][415754.0.459231855]'
+  Description: '绯绘暟鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl
new file mode 100644
index 0000000..00d21a4
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateEstimatedTotalCost
+{
+  #keys: '3[415754.0.459255992][415754.0.459255991][415754.0.459255993]'
+  Description: '棰勮鎬昏垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl
new file mode 100644
index 0000000..8c5bf88
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateExternalRentalWarehouseTransportationCosts
+{
+  #keys: '3[415754.0.459255918][415754.0.459255917][415754.0.459255919]'
+  Description: '澶栫搴撹繍杈撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl
new file mode 100644
index 0000000..770e680
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateNumberOfEmptyShelves
+{
+  #keys: '3[415754.0.459255802][415754.0.459255801][415754.0.459255803]'
+  Description: '绌烘枡鏋舵暟閲忚窡鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl
new file mode 100644
index 0000000..4ce6fc1
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateOutboundExpensesForRentedWarehouses
+{
+  #keys: '3[415754.0.459255881][415754.0.459255880][415754.0.459255882]'
+  Description: '澶栫搴撳嚭搴撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl
new file mode 100644
index 0000000..8381b8f
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateRentalWarehouseStorageFees
+{
+  #keys: '3[415754.0.459215185][415754.0.459215184][415754.0.459215186]'
+  Description: '澶栫搴撲粨鍌ㄨ垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl
new file mode 100644
index 0000000..de2556d
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateStorageFeesForRentedWarehouses
+{
+  #keys: '3[415754.0.459255844][415754.0.459255843][415754.0.459255845]'
+  Description: '澶栫搴撳叆搴撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl
new file mode 100644
index 0000000..294f7ff
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateTotalCost
+{
+  #keys: '3[415754.0.459256029][415754.0.459256028][415754.0.459256030]'
+  Description: '鎬昏垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl
new file mode 100644
index 0000000..0e9c3b8
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateTotalQuantityOfMaterialRacks
+{
+  #keys: '3[415754.0.459231812][415754.0.459231811][415754.0.459231813]'
+  Description: '鏂欐灦鎬绘暟閲忔洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl b/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl
new file mode 100644
index 0000000..567b121
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetTheTotalQuantity (
+  Real totalQuantityOfMaterialRacks
+)
+{
+  Description: '璁剧疆鏂欐灦鎬绘暟閲�'
+  TextBody:
+  [*
+    this.TotalQuantityOfMaterialRacks( totalQuantityOfMaterialRacks );
+    
+    // 绌烘枡鏋舵暟閲忚仈鍔�
+    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() ) );
+  *]
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
index 180d987..fcff038 100644
--- a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
@@ -9,15 +9,6 @@
     macroPlan.CC_EngineRackRow( relflush );
     macroPlan.CC_EngineRackColumn( relflush );
     
-    sumNumberOfEmptyShelves                       := 0.0;
-    sumStorageFeesForRentedWarehouses             := 0.0;
-    sumOutboundExpensesForRentedWarehouses        := 0.0;
-    sumExternalRentalWarehouseTransportationCosts := 0.0;
-    sumRentalWarehouseStorageFees                 := 0.0;
-    sumCleaningCost                               := 0.0;
-    sumEstimatedTotalCost                         := 0.0;
-    sumTotalCost                                  := 0.0;
-    
     // 鍒涘缓琛�
     genrations := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.Generation().TrimBoth() <> "", tempPMP.Generation() );
     mqbmlbs    := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.MQBMLB().TrimBoth() <> "", tempPMP.MQBMLB() );
@@ -67,7 +58,6 @@
         cell.PackagingCapacity( guard( lce.PackagingCapacity(), 1 ) );
         cell.PlannedInventory( plannedInventory );
         cell.NumberOfEmptyShelves( guard( [Number] ( cell.TotalQuantityOfMaterialRacks() - ( plannedInventory / lce.PackagingCapacity() ) ), 0 ) );
-        sumNumberOfEmptyShelves := sumNumberOfEmptyShelves + cell.NumberOfEmptyShelves();
         
         // 澶栫搴撳叆搴撹垂鐢紙鍙戝姩鏈洪攢閲� / 鍖呰瀹归噺[鍚戜笂鍙栨暣] * 鏂欐灦鍏ュ簱鍗曚环锛�
         engineSales := sum( macroPlan, FSImportData, tempFSID, 
@@ -78,7 +68,6 @@
                             tempFSID.StartDate().Month() = ccerc.StartDate().Month(),
                             tempFSID.Quantity() );
         cell.StorageFeesForRentedWarehouses( [Number] ( engineSales / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.WarehousingPrice(), 1 ) ) );
-        sumStorageFeesForRentedWarehouses := sumStorageFeesForRentedWarehouses + cell.StorageFeesForRentedWarehouses();
              
         // 澶栫搴撳嚭搴撹垂鐢紙鍙戝姩鏈轰骇閲� / 鍖呰瀹归噺[鍚戜笂鍙栨暣] * 鏂欐灦鍑哄簱鍗曚环锛�
         engineProductions := sum( macroPlan, FPImportData, tempFPID, 
@@ -88,8 +77,7 @@
                                   tempFPID.StartDate().Year()  = ccerc.StartDate().Year()                      and
                                   tempFPID.StartDate().Month() = ccerc.StartDate().Month(),
                                   tempFPID.Quantity() );
-        cell.OutboundExpensesForRentedWarehouses( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) ) * guard( lcmr.OutboundPrice(), 1 ) );
-        sumOutboundExpensesForRentedWarehouses := sumOutboundExpensesForRentedWarehouses + cell.OutboundExpensesForRentedWarehouses();
+        cell.OutboundExpensesForRentedWarehouses( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.OutboundPrice(), 1 ) ) );
         
         // 澶栫搴撹繍杈撹垂鐢細鍙戝姩鏈鸿繍杈撻噺 / 鍖呰瀹归噺 / 瑁呰浇瀹归噺锛堝悜涓婂彇鏁达級 * 鏂欐灦杩愯緭鍗曚环
         transportationQuantity := sum( macroPlan, Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT, 
@@ -103,16 +91,13 @@
                                       );
     //    info( "鏃堕棿锛�", ccerc.StartDate().Format( "Y-M2-D2" ), "    杩愯緭鏁版嵁锛�", transportationQuantity, "     杩愯緭鍗曚环锛�", lct.TransportPrice() );
         cell.ExternalRentalWarehouseTransportationCosts( [Number] ( transportationQuantity / guard( lce.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) ) );
-        sumExternalRentalWarehouseTransportationCosts := sumExternalRentalWarehouseTransportationCosts + cell.ExternalRentalWarehouseTransportationCosts();
              
         // 澶栫搴撲粨鍌ㄨ垂鐢細鏂欐灦鎬绘暟閲� - 鍙戝姩鏈哄簱瀛� / 鍖呰瀹归噺锛堝悜涓婂彇鏁达級锛屽啀涔樹互绌烘枡鏋朵粨鍌ㄥ崟浠峰緱鍒扮┖鏂欐灦浠撳偍璐圭敤銆傚彂鍔ㄦ満搴撳瓨鍙朅ctual inventories閲屽彇鍒伴暱鏄ュ绉熷簱璇ュ彂鍔ㄦ満鐨勪粨鍌ㄩ噺锛屾枡鏋舵�绘暟閲忛渶瑕佹墜鍔ㄧ淮鎶ゃ��
         cell.UnitPriceOfEmptyShelfStorage( lcmr.StoragePrice() );
         cell.RentalWarehouseStorageFees( [Number] ( guard( ( cell.TotalQuantityOfMaterialRacks() - [Number]( plannedInventory / lce.PackagingCapacity() ) ) * lcmr.StoragePrice(), 0 ) ) );
-        sumRentalWarehouseStorageFees := sumRentalWarehouseStorageFees + cell.RentalWarehouseStorageFees();
         
         // 娓呮礂璐圭敤锛氬彂鍔ㄦ満鍏ュ簱閲� / 鍖呰瀹归噺 * 鏂欐灦娓呮礂鍗曚环銆傚彂鍔ㄦ満鍏ュ簱閲忓彇鍙戝姩鏈洪攢閲忥紝鍖呰瀹归噺鍙栬嚜鍙戝姩鏈烘垚鏈〃銆傛枡鏋舵竻娲楀崟浠峰彇鏂欐灦鎴愭湰琛ㄣ��
         cell.CleaningCost( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) * lcmr.CleanPrice() ) );
-        sumCleaningCost := sumCleaningCost + cell.CleaningCost();
         
         // 棰勮鎬昏垂鐢�
         cell.EstimatedTotalCost( cell.StorageFeesForRentedWarehouses()             + 
@@ -121,34 +106,49 @@
                                  cell.RentalWarehouseStorageFees()                 +
                                  cell.CleaningCost()
                                 );
-        sumEstimatedTotalCost := sumEstimatedTotalCost + cell.EstimatedTotalCost();
                                 
         // 绯绘暟
         cell.Coefficient( 1.05 );
         
         // 鎬昏垂鐢�
-        cell.TotalCost( cell.EstimatedTotalCost() * cell.Coefficient() );
-        sumTotalCost := sumTotalCost + cell.TotalCost();
+        cell.TotalCost( [Number] ( cell.EstimatedTotalCost() * cell.Coefficient() ) );
         
         cell.CC_EngineRackColumn( relset, ccerc );
       }
     }
     
     // 鍒涘缓SUM琛�
-    sumR := macroPlan.CC_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 );
+    sumR   := macroPlan.CC_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 );
     traverse ( macroPlan, CC_EngineRackColumn, ccerc ) {
       cell := sumR.CC_EngineRackCell( relnew );
-      
-      cell.NumberOfEmptyShelves( sumNumberOfEmptyShelves );
-      cell.StorageFeesForRentedWarehouses( sumStorageFeesForRentedWarehouses );
-      cell.OutboundExpensesForRentedWarehouses( sumOutboundExpensesForRentedWarehouses );
-      cell.ExternalRentalWarehouseTransportationCosts( sumExternalRentalWarehouseTransportationCosts );
-      cell.RentalWarehouseStorageFees( sumRentalWarehouseStorageFees );
-      cell.CleaningCost( sumCleaningCost );
-      cell.EstimatedTotalCost( sumEstimatedTotalCost );
-      cell.TotalCost( sumTotalCost );
-      
       cell.CC_EngineRackColumn( relset, ccerc );
+      
+      cell.NumberOfEmptyShelves( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.NumberOfEmptyShelves() ) );
+      cell.StorageFeesForRentedWarehouses( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.StorageFeesForRentedWarehouses() ) );
+      cell.OutboundExpensesForRentedWarehouses( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.OutboundExpensesForRentedWarehouses() ) );
+      cell.ExternalRentalWarehouseTransportationCosts( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.ExternalRentalWarehouseTransportationCosts() ) );
+      cell.RentalWarehouseStorageFees( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.RentalWarehouseStorageFees() ) );
+      cell.CleaningCost( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.CleaningCost() ) );
+      cell.EstimatedTotalCost( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.EstimatedTotalCost() ) );
+      cell.Coefficient( 1.05 );
+      cell.TotalCost( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.TotalCost() ) );
+    }
+    
+    // 鍒涘缓SUM鍒�
+    sumC   := macroPlan.CC_EngineRackColumn( relnew, StartDate := Date::MaxDate() );
+    traverse ( macroPlan, CC_EngineRackRow, ccerr ) {
+      cell := ccerr.CC_EngineRackCell( relnew );
+      cell.CC_EngineRackColumn( relset, sumC );
+      
+      cell.NumberOfEmptyShelves( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.NumberOfEmptyShelves() ) );
+      cell.StorageFeesForRentedWarehouses( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.StorageFeesForRentedWarehouses() ) );
+      cell.OutboundExpensesForRentedWarehouses( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.OutboundExpensesForRentedWarehouses() ) );
+      cell.ExternalRentalWarehouseTransportationCosts( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.ExternalRentalWarehouseTransportationCosts() ) );
+      cell.RentalWarehouseStorageFees( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.RentalWarehouseStorageFees() ) );
+      cell.CleaningCost( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.CleaningCost() ) );
+      cell.EstimatedTotalCost( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.EstimatedTotalCost() ) );
+      cell.Coefficient( 1.05 );
+      cell.TotalCost( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.TotalCost() ) );             
     }
   *]
 }
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
index 1d83bd4..895569d 100644
--- a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
@@ -35,7 +35,7 @@
     
     
     // 绗簩鍒�
-    attrs        := construct( Strings ); attrs.Add( "鏂欐灦绌烘暟閲�" ); attrs.Add( "绌烘枡鏋舵暟閲�" ); attrs.Add( "澶栫搴撳叆搴撹垂鐢�" ); attrs.Add( "澶栫搴撳嚭搴撹垂鐢�" ); attrs.Add( "澶栫搴撹繍杈撹垂鐢�" );
+    attrs        := construct( Strings ); attrs.Add( "鏂欐灦鎬绘暟閲�" ); attrs.Add( "绌烘枡鏋舵暟閲�" ); attrs.Add( "澶栫搴撳叆搴撹垂鐢�" ); attrs.Add( "澶栫搴撳嚭搴撹垂鐢�" ); attrs.Add( "澶栫搴撹繍杈撹垂鐢�" );
                                           attrs.Add( "澶栫搴撲粨鍌ㄨ垂鐢�" ); attrs.Add( "娓呮礂璐圭敤" ); attrs.Add( "棰勮鎬昏垂鐢�" ); attrs.Add( "绯绘暟" ); attrs.Add( "鎬昏垂鐢�" );
     secondColumn := xmlDOM.CreateElement( "column" );
     secondName   := xmlDOM.CreateElement( "name" );
@@ -59,8 +59,8 @@
       cellColumn := xmlDOM.CreateElement( "column" );
       cellName   := xmlDOM.CreateElement( "name" );
       cellType   := xmlDOM.CreateElement( "type" );
-      cellName.TextContent( cerc.StartDate().Format( "M2/D2/Y" ) );
-      cellType.TextContent( "Number" );
+      cellName.TextContent( cerc.DisplayName() );
+      cellType.TextContent( "Real" );
       cellColumn.AppendChild( cellName );
       cellColumn.AppendChild( cellType );
       cells := selectsortedset( cerc, CC_EngineRackCell, tempCELL, true, tempCELL.CC_EngineRackRow().Index(), tempCELL.CC_EngineRackRow().Name() );
@@ -98,7 +98,7 @@
         cellColumn.AppendChild( cell );
         
         cell := xmlDOM.CreateElement( "cell" );
-        cell.SetAttribute( "value", [String]c.Coefficient().Round( 0 ) ); // 绯绘暟
+        cell.SetAttribute( "value", [String]c.Coefficient().Round( 2 ) ); // 绯绘暟
         cellColumn.AppendChild( cell );
         
         cell := xmlDOM.CreateElement( "cell" );
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
index ab510db..4fca189 100644
--- a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
@@ -5,5 +5,81 @@
   GeneralExcelImportAndExportDataTable table
 )
 {
-  TextBody: '//traverse ('
+  TextBody:
+  [*
+    isUpdateFlag        := "";
+    attributeUpdateFlag := "";
+    
+    traverse ( table, GeneralExcelImportAndExportDataRow, row ) {
+      traverse ( table, GeneralExcelImportAndExportDataColumn, column ) {
+        // 鍗曞厓鏍煎��
+        cellValue := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDCell, tempGEIAEDCell.GeneralExcelImportAndExportDataColumn() = column ).Value();
+        // 闀挎槬鏂欐灦鎶ヨ〃鍒�
+        ccerc     := select( macroPlan, CC_EngineRackColumn, tempCCERC, tempCCERC.DisplayName() = column.Name() );
+        cell      := select( macroPlan, CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() = "SUM" and tempCCERCell.CC_EngineRackColumn() = ccerc );
+        
+        if ( column.ColumnIndex() = 0 and cellValue <> "" ) {
+          isUpdateFlag := cellValue;
+        }
+        
+        if ( column.ColumnIndex() = 1 and cellValue <> "" ) {
+          attributeUpdateFlag := cellValue;
+        }
+        
+        if ( isUpdateFlag = "SUM" ) {
+          if ( attributeUpdateFlag = "鏂欐灦鎬绘暟閲�"            and not isnull( cell ) ) {
+            if ( not cell.IsUpdateTotalQuantityOfMaterialRacks() and cell.TotalQuantityOfMaterialRacks() <> [Real]cellValue ) {
+              cell.IsUpdateTotalQuantityOfMaterialRacks( true );
+            }
+            cell.TotalQuantityOfMaterialRacks( [Real]cellValue );    
+          } else if ( attributeUpdateFlag = "绌烘枡鏋舵暟閲�"     and not isnull( cell ) ) {
+            if ( not cell.IsUpdateNumberOfEmptyShelves() and cell.NumberOfEmptyShelves() <> [Real]cellValue ) {
+              cell.IsUpdateNumberOfEmptyShelves( true );
+            }
+            cell.NumberOfEmptyShelves( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "澶栫搴撳叆搴撹垂鐢�" and not isnull( cell ) ) {
+            if ( not cell.IsUpdateStorageFeesForRentedWarehouses() and cell.StorageFeesForRentedWarehouses() <> [Real]cellValue ) {
+              cell.IsUpdateStorageFeesForRentedWarehouses( true );
+            }
+            cell.StorageFeesForRentedWarehouses( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "澶栫搴撳嚭搴撹垂鐢�" and not isnull( cell ) ) {
+            if ( not cell.IsUpdateOutboundExpensesForRentedWarehouses() and cell.OutboundExpensesForRentedWarehouses() <> [Real]cellValue ) {
+              cell.IsUpdateOutboundExpensesForRentedWarehouses( true );
+            }
+            cell.OutboundExpensesForRentedWarehouses( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "澶栫搴撹繍杈撹垂鐢�" and not isnull( cell ) ) {
+            if ( not cell.IsUpdateExternalRentalWarehouseTransportationCosts() and cell.ExternalRentalWarehouseTransportationCosts() <> [Real]cellValue ) {
+              cell.IsUpdateExternalRentalWarehouseTransportationCosts( true );
+            }
+            cell.ExternalRentalWarehouseTransportationCosts( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "澶栫搴撲粨鍌ㄨ垂鐢�" and not isnull( cell ) ) {
+            if ( not cell.IsUpdateRentalWarehouseStorageFees() and cell.RentalWarehouseStorageFees() <> [Real]cellValue ) {
+              cell.IsUpdateRentalWarehouseStorageFees( true );
+            }
+            cell.RentalWarehouseStorageFees( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "娓呮礂璐圭敤"       and not isnull( cell ) ) {
+            if ( not cell.IsUpdateCleaningCost() and cell.CleaningCost() <> [Real]cellValue ) {
+              cell.IsUpdateCleaningCost( true );
+            }
+            cell.CleaningCost( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "棰勮鎬昏垂鐢�"     and not isnull( cell ) ) {
+            if ( not cell.IsUpdateEstimatedTotalCost() and cell.EstimatedTotalCost() <> [Real]cellValue ) {
+              cell.IsUpdateEstimatedTotalCost( true );
+            }
+            cell.EstimatedTotalCost( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "绯绘暟"           and not isnull( cell ) ) {
+            if ( not cell.IsUpdateCoefficient() and cell.Coefficient() <> [Real]cellValue ) {
+              cell.IsUpdateCoefficient( true );
+            }
+            cell.Coefficient( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "鎬昏垂鐢�"         and not isnull( cell ) ) {
+            if ( not cell.IsUpdateTotalCost() and cell.TotalCost() <> [Real]cellValue ) {
+              cell.IsUpdateTotalCost( true );
+            }
+            cell.TotalCost( [Real]cellValue );
+          }
+        }
+      }
+    }
+  *]
 }
diff --git a/_Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl b/_Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl
new file mode 100644
index 0000000..a12b7a8
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute DisplayName
+{
+  #keys: '3[415754.0.459254726][415754.0.459254725][415754.0.459254727]'
+  Description: '鍒楁樉绀�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl b/_Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl
new file mode 100644
index 0000000..fea962d
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcDisplayName
+{
+  TextBody:
+  [*
+    value := ifexpr( this.StartDate().IsMaxInfinity(), "SUM", this.StartDate().Format( "Y-M2-D2" ) );
+    
+    this.DisplayName( value );
+  *]
+}
diff --git a/_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl b/_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl
index cc3f7b8..64e6dfc 100644
--- a/_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl
+++ b/_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl
@@ -6,7 +6,7 @@
   [*
     // lihongji Aug-12-2024 (created)
     
-    value := this.Generation() + " " + this.MLB_MQB();
+    value := this.Generation() + ifexpr( this.MLB_MQB() <> "", " " + this.MLB_MQB(), "" );
     
     this.Name( value );
   *]
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl
new file mode 100644
index 0000000..9678765
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCLineHaulCost
+{
+  #keys: '3[415754.0.459222291][415754.0.459222290][415754.0.459222292]'
+  Description: 'CC闀块�旇繍杈撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl
new file mode 100644
index 0000000..ae42526
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCOutboundExpensesForRentedWarehouses
+{
+  #keys: '3[415754.0.459256613][415754.0.459256612][415754.0.459256614]'
+  Description: 'CC澶栫搴撳嚭搴撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl
new file mode 100644
index 0000000..77be3e8
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCRentalWarehouseStorageFees
+{
+  #keys: '3[415754.0.459256657][415754.0.459256656][415754.0.459256658]'
+  Description: 'CC澶栫搴撲粨鍌ㄨ垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl
new file mode 100644
index 0000000..07e6841
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCShortDistanceTransportationCosts
+{
+  #keys: '3[415754.0.459256731][415754.0.459256730][415754.0.459256732]'
+  Description: 'CC鐭�旇繍杈撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl
new file mode 100644
index 0000000..7bece2a
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCStorageFeesForRentedWarehouses
+{
+  #keys: '3[415754.0.459256569][415754.0.459256568][415754.0.459256570]'
+  Description: 'CC澶栫搴撳叆搴撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl
new file mode 100644
index 0000000..5b3a854
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCleaningCost
+{
+  #keys: '3[415754.0.459256981][415754.0.459256980][415754.0.459256982]'
+  Description: '娓呮礂璐圭敤鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl
new file mode 100644
index 0000000..137a894
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCoefficient
+{
+  #keys: '3[415754.0.459257069][415754.0.459257068][415754.0.459257070]'
+  Description: '绯绘暟鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl
new file mode 100644
index 0000000..f638db1
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLExternalRentalWarehouseTransportationCosts
+{
+  #keys: '3[415754.0.459256937][415754.0.459256936][415754.0.459256938]'
+  Description: 'DL澶栫搴撹繍杈撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl
new file mode 100644
index 0000000..2edbd6a
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLOutboundExpensesForRentedWarehouses
+{
+  #keys: '3[415754.0.459256863][415754.0.459256862][415754.0.459256864]'
+  Description: 'DL澶栫搴撳嚭搴撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl
new file mode 100644
index 0000000..733d715
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLRentalWarehouseStorageFees
+{
+  #keys: '3[415754.0.459256775][415754.0.459256774][415754.0.459256776]'
+  Description: '澶栫搴撲粨鍌ㄨ垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl
new file mode 100644
index 0000000..5d623f8
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLStorageFeesForRentedWarehouses
+{
+  #keys: '3[415754.0.459256819][415754.0.459256818][415754.0.459256820]'
+  Description: 'DL澶栫搴撳叆搴撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl
new file mode 100644
index 0000000..6c9ebc6
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsEstimatedTotalCost
+{
+  #keys: '3[415754.0.459257025][415754.0.459257024][415754.0.459257026]'
+  Description: '棰勮鎬昏垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl
new file mode 100644
index 0000000..1a2677d
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsNumberOfEmptyShelves
+{
+  #keys: '3[415754.0.459256525][415754.0.459256524][415754.0.459256526]'
+  Description: '绌烘枡鏋舵暟閲忔洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl
new file mode 100644
index 0000000..fe3356f
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsTotalCost
+{
+  #keys: '3[415754.0.459257113][415754.0.459257112][415754.0.459257114]'
+  Description: '鎬昏垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl
new file mode 100644
index 0000000..9a4eee2
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsTotalQuantityOfMaterialRacks
+{
+  #keys: '3[415754.0.459222217][415754.0.459222216][415754.0.459222218]'
+  Description: '鏂欐灦鎬绘暟閲忚窡鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl b/_Main/BL/Type_DL_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl
deleted file mode 100644
index 5bec7ea..0000000
--- a/_Main/BL/Type_DL_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl
+++ /dev/null
@@ -1,13 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Function CalcNumberOfEmptyShelves
-{
-  TextBody:
-  [*
-    // lihongji Oct-9-2024 (created)
-    
-    value := guard( this.TotalQuantityOfMaterialRacks() - ( this.PlannedInventory() / this.PackagingCapacity() ), 0 );
-    
-    this.NumberOfEmptyShelves( value );
-  *]
-}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl b/_Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl
new file mode 100644
index 0000000..74b51f0
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetTheTotalQuantity (
+  Real totalQuantityOfMaterialRacks
+)
+{
+  Description: '璁剧疆鏂欐灦鎬绘暟閲�'
+  TextBody:
+  [*
+    this.TotalQuantityOfMaterialRacks( totalQuantityOfMaterialRacks );
+    
+    // 绌烘枡鏋舵暟閲忚仈鍔�
+    this.NumberOfEmptyShelves( [Number] ( ( totalQuantityOfMaterialRacks - this.PlannedInventory() ) / this.PackagingCapacity() ) );
+    
+    // SUM琛岃仈鍔�
+    cell := select( this, DL_EngineRackColumn.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() = "SUM" );
+    cell.TotalQuantityOfMaterialRacks( sum( this, DL_EngineRackColumn.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalQuantityOfMaterialRacks() ) );
+    cell.NumberOfEmptyShelves( sum( this, DL_EngineRackColumn.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.NumberOfEmptyShelves() ) );
+    
+    // SUM鍒楄仈鍔�
+    cell := select( this, DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackColumn().DisplayName() = "SUM" );
+    cell.TotalQuantityOfMaterialRacks( sum( this,DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalQuantityOfMaterialRacks() ) );
+    cell.NumberOfEmptyShelves( sum( this,DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.NumberOfEmptyShelves() ) );
+  *]
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
index c4e7eee..5df7805 100644
--- a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
@@ -59,6 +59,7 @@
                                  tempPISPIP.PlannedInventoryLevelEnd() );
         cell.PackagingCapacity( guard( lce.PackagingCapacity(), 1 ) );
         cell.PlannedInventory( plannedInventory );
+        cell.NumberOfEmptyShelves( [Number] ( cell.TotalQuantityOfMaterialRacks() - guard( cell.PlannedInventory() / cell.PackagingCapacity(), 0 ) ) );
         
         // CC澶栫搴撳叆搴撹垂鐢細鍙戝姩鏈洪攢閲� / 鍖呰瀹归噺锛堝悜涓婂彇鏁达級* 鏂欐灦鍏ュ簱鍗曚环
         transportationQuantity1 := sum( macroPlan, SalesDemand.astype( Forecast ), tempF, 
@@ -141,10 +142,56 @@
         cell.Coefficient( 1.05 );
         
         // 鎬昏垂鐢�
-        cell.TotalCost( cell.EstimatedTotalCost() * cell.Coefficient() );
+        cell.TotalCost( [Number] ( cell.EstimatedTotalCost() * cell.Coefficient() ) );
                 
         cell.DL_EngineRackColumn( relset, dlerc );
       }
     }
+    
+    // 鍒涘缓SUM琛�
+    sumR   := macroPlan.DL_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 );
+    traverse ( macroPlan, DL_EngineRackColumn, dlerc ) {
+      cell := sumR.DL_EngineRackCell( relnew );
+      cell.DL_EngineRackColumn( relset, dlerc );
+      
+      cell.TotalQuantityOfMaterialRacks( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalQuantityOfMaterialRacks() ) );
+      cell.NumberOfEmptyShelves( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.NumberOfEmptyShelves() ) );
+      cell.CCStorageFeesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCStorageFeesForRentedWarehouses() ) );
+      cell.CCOutboundExpensesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCOutboundExpensesForRentedWarehouses() ) );
+      cell.CCRentalWarehouseStorageFees( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCRentalWarehouseStorageFees() ) );
+      cell.CCLineHaulCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCLineHaulCost() ) );
+      cell.CCShortDistanceTransportationCosts( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCShortDistanceTransportationCosts() ) );
+      cell.DLStorageFeesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLStorageFeesForRentedWarehouses() ) );
+      cell.DLOutboundExpensesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLOutboundExpensesForRentedWarehouses() ) );
+      cell.DLExternalRentalWarehouseTransportationCosts( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLExternalRentalWarehouseTransportationCosts() ) );
+      cell.DLRentalWarehouseStorageFees( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLRentalWarehouseStorageFees() ) );
+      cell.CleaningCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CleaningCost() ) );
+      cell.EstimatedTotalCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.EstimatedTotalCost() ) );
+      cell.Coefficient( 1.05 );
+      cell.TotalCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalCost() ) );
+    }
+    
+    // 鍒涘缓SUM鍒�
+    sumC   := macroPlan.DL_EngineRackColumn( relnew, StartDate := Date::MaxDate() );
+    traverse ( macroPlan, DL_EngineRackRow, dlerr ) {
+      cell := dlerr.DL_EngineRackCell( relnew );
+      cell.DL_EngineRackColumn( relset, sumC );
+      
+      cell.TotalQuantityOfMaterialRacks( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalQuantityOfMaterialRacks() ) );
+      cell.NumberOfEmptyShelves( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.NumberOfEmptyShelves() ) );
+      cell.CCStorageFeesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCStorageFeesForRentedWarehouses() ) );    
+      cell.CCOutboundExpensesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCOutboundExpensesForRentedWarehouses() ) );    
+      cell.CCRentalWarehouseStorageFees( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCRentalWarehouseStorageFees() ) );    
+      cell.CCLineHaulCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCLineHaulCost() ) );    
+      cell.CCShortDistanceTransportationCosts( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCShortDistanceTransportationCosts() ) );    
+      cell.DLStorageFeesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLStorageFeesForRentedWarehouses() ) );    
+      cell.DLOutboundExpensesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLOutboundExpensesForRentedWarehouses() ) );    
+      cell.DLExternalRentalWarehouseTransportationCosts( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLExternalRentalWarehouseTransportationCosts() ) );    
+      cell.DLRentalWarehouseStorageFees( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLRentalWarehouseStorageFees() ) );    
+      cell.CleaningCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CleaningCost() ) );    
+      cell.EstimatedTotalCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.EstimatedTotalCost() ) );    
+      cell.Coefficient( 1.05 );
+      cell.TotalCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalCost() ) );                        
+    }
   *]
 }
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl
new file mode 100644
index 0000000..8cf8a6a
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl
@@ -0,0 +1,144 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Export (
+  MacroPlan macroPlan
+) as BinaryValue
+{
+  TextBody:
+  [*
+    xmlDOMI      := XMLDOMImplementation::Create();
+    xmlDOM       := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>Sheet1</name></table>' );
+    
+    tableElement := xmlDOM.GetElementByTagName( "table", 0 );
+    
+    // 绗竴鍒楋紙鍚嶇О锛�
+    dlerrs      := selectsortedset( macroPlan, DL_EngineRackRow, tempDLERR, true, tempDLERR.Index(), tempDLERR.Name() );
+    firstColumn := xmlDOM.CreateElement( "column" );
+    firstName   := xmlDOM.CreateElement( "name" );
+    firstType   := xmlDOM.CreateElement( "type" );
+    firstName.TextContent( "*" );
+    firstType.TextContent( "String" );
+    firstColumn.AppendChild( firstName );
+    firstColumn.AppendChild( firstType );
+    traverse ( dlerrs, Elements, dlerr ) {
+      firstCell := xmlDOM.CreateElement( "cell" );
+      firstCell.SetAttribute( "value", dlerr.Name() );
+      firstColumn.AppendChild( firstCell );
+      
+      for ( i := 0; i < 14; i++ ) {
+        firstCell := xmlDOM.CreateElement( "cell" );
+        firstCell.SetAttribute( "value", "" );
+        firstColumn.AppendChild( firstCell );
+      }
+    }
+    tableElement.AppendChild( firstColumn );
+    
+    
+    // 绗簩鍒�
+    attrs        := construct( Strings ); attrs.Add( "鏂欐灦鎬绘暟閲�" ); attrs.Add( "绌烘枡鏋舵暟閲�" ); attrs.Add( "CC澶栫搴撳叆搴撹垂鐢�" ); attrs.Add( "CC澶栫搴撳嚭搴撹垂鐢�" ); attrs.Add( "CC澶栫搴撲粨鍌ㄨ垂鐢�" );
+                                          attrs.Add( "CC闀块�旇繍杈撹垂鐢�" ); attrs.Add( "CC鐭�旇繍杈撹垂鐢�" ); attrs.Add( "DL澶栫搴撳叆搴撹垂鐢�" ); attrs.Add( "DL澶栫搴撳嚭搴撹垂鐢�" ); attrs.Add( "DL澶栫搴撹繍杈撹垂鐢�" );
+                                          attrs.Add( "澶栫搴撲粨鍌ㄨ垂鐢�" ); attrs.Add( "娓呮礂璐圭敤" ); attrs.Add( "棰勮鎬昏垂鐢�" ); attrs.Add( "绯绘暟" ); attrs.Add( "鎬昏垂鐢�" );
+    secondColumn := xmlDOM.CreateElement( "column" );
+    secondName   := xmlDOM.CreateElement( "name" );
+    secondType   := xmlDOM.CreateElement( "type" );
+    secondName.TextContent( "*" );
+    secondType.TextContent( "String" );
+    secondColumn.AppendChild( secondName );
+    secondColumn.AppendChild( secondType );
+    for ( i := 0; i < dlerrs.Size(); i++ ) {
+      traverse ( attrs, Elements, attr ) {
+        secondCell := xmlDOM.CreateElement( "cell" );
+        secondCell.SetAttribute( "value", attr );
+        secondColumn.AppendChild( secondCell );
+      }
+    }
+    tableElement.AppendChild( secondColumn );
+    
+    // 鏃堕棿鍒�
+    dlercs := selectsortedset( macroPlan, DL_EngineRackColumn, tempDLERC, true, tempDLERC.StartDate() );
+    traverse ( dlercs, Elements, dlerc ) {
+      cellColumn := xmlDOM.CreateElement( "column" );
+      cellName   := xmlDOM.CreateElement( "name" );
+      cellType   := xmlDOM.CreateElement( "type" );
+      cellName.TextContent( dlerc.DisplayName() );
+      cellType.TextContent( "Real" );
+      cellColumn.AppendChild( cellName );
+      cellColumn.AppendChild( cellType );
+      cells := selectsortedset( dlerc, DL_EngineRackCell, tempDLERCell, true, tempDLERCell.DL_EngineRackRow().Index(), tempDLERCell.DL_EngineRackRow().Name() );
+      traverse ( cells, Elements, c ) {
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks().Round( 0 ) ); // 鏂欐灦鎬绘暟閲�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves().Round( 0 ) ); // 绌烘枡鏋舵暟閲�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.CCStorageFeesForRentedWarehouses().Round( 0 ) ); // CC澶栫搴撳叆搴撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.CCOutboundExpensesForRentedWarehouses().Round( 0 ) ); // CC澶栫搴撳嚭搴撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.CCRentalWarehouseStorageFees().Round( 0 ) ); // CC澶栫搴撲粨鍌ㄨ垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.CCLineHaulCost().Round( 0 ) ); // CC闀块�旇繍杈撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.CCShortDistanceTransportationCosts().Round( 0 ) ); // CC鐭�旇繍杈撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.DLStorageFeesForRentedWarehouses().Round( 0 ) ); // DL澶栫搴撳叆搴撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.DLOutboundExpensesForRentedWarehouses().Round( 0 ) ); // DL澶栫搴撳嚭搴撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.DLExternalRentalWarehouseTransportationCosts().Round( 0 ) ); // DL澶栫搴撹繍杈撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.DLRentalWarehouseStorageFees().Round( 0 ) ); // 澶栫搴撲粨鍌ㄨ垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // 娓呮礂璐圭敤
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.EstimatedTotalCost().Round( 0 ) ); // 棰勮鎬昏垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.Coefficient().Round( 2 ) ); // 绯绘暟
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.TotalCost().Round( 0 ) ); // 鎬昏垂鐢�
+        cellColumn.AppendChild( cell );
+      }
+      tableElement.AppendChild( cellColumn );
+    }
+    
+    xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM )
+    
+    //info( xmlString );
+    
+    tableGroupHandle := TableGroupHandle::Create( "Sheet1" );
+    tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
+    tableGroupHandle.Add( tableHandle );
+    
+    binaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
+    
+    return binaryData.AsBinaryValue();
+  *]
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl
new file mode 100644
index 0000000..fc6b28d
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl
@@ -0,0 +1,111 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Import (
+  MacroPlan macroPlan,
+  GeneralExcelImportAndExportDataTable table
+)
+{
+  TextBody:
+  [*
+    isUpdateFlag        := "";
+    attributeUpdateFlag := "";
+    
+    traverse ( table, GeneralExcelImportAndExportDataRow, row ) {
+      traverse ( table, GeneralExcelImportAndExportDataColumn, column ) {
+        // 鍗曞厓鏍煎��
+        cellValue := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDCell, tempGEIAEDCell.GeneralExcelImportAndExportDataColumn() = column ).Value();
+        // 闀挎槬鏂欐灦鎶ヨ〃鍒�
+        dlerc     := select( macroPlan, DL_EngineRackColumn, tempDLERC, tempDLERC.DisplayName() = column.Name() );
+        cell      := select( macroPlan, DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() = "SUM" and tempDLERCell.DL_EngineRackColumn() = dlerc );
+        
+        if ( column.ColumnIndex() = 0 and cellValue <> "" ) {
+          isUpdateFlag := cellValue;
+        }
+        
+        if ( column.ColumnIndex() = 1 and cellValue <> "" ) {
+          attributeUpdateFlag := cellValue;
+        }
+        
+        if ( isUpdateFlag = "SUM" ) {
+          info( "鍗曞厓鏍煎�硷細", cellValue );
+          if ( attributeUpdateFlag = "鏂欐灦鎬绘暟閲�"            and not isnull( cell ) ) {
+            if ( not cell.IsTotalQuantityOfMaterialRacks() and cell.TotalQuantityOfMaterialRacks() <> [Real]cellValue ) {
+              cell.IsTotalQuantityOfMaterialRacks( true );
+            }
+            cell.TotalQuantityOfMaterialRacks( [Real]cellValue );    
+          } else if ( attributeUpdateFlag = "绌烘枡鏋舵暟閲�"     and not isnull( cell ) ) {
+            if ( not cell.IsNumberOfEmptyShelves() and cell.NumberOfEmptyShelves() <> [Real]cellValue ) {
+              cell.IsNumberOfEmptyShelves( true );
+            }
+            cell.NumberOfEmptyShelves( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "CC澶栫搴撳叆搴撹垂鐢�" and not isnull( cell ) ) {
+            if ( not cell.IsCCStorageFeesForRentedWarehouses() and cell.CCStorageFeesForRentedWarehouses() <> [Real]cellValue ) {
+              cell.IsCCStorageFeesForRentedWarehouses( true );
+            }
+            cell.CCStorageFeesForRentedWarehouses( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "CC澶栫搴撳嚭搴撹垂鐢�" and not isnull( cell ) ) {
+            if ( not cell.IsCCOutboundExpensesForRentedWarehouses() and cell.CCOutboundExpensesForRentedWarehouses() <> [Real]cellValue ) {
+              cell.IsCCOutboundExpensesForRentedWarehouses( true );
+            }
+            cell.CCOutboundExpensesForRentedWarehouses( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "CC澶栫搴撲粨鍌ㄨ垂鐢�" and not isnull( cell ) ) {
+            if ( not cell.IsCCRentalWarehouseStorageFees() and cell.CCRentalWarehouseStorageFees() <> [Real]cellValue ) {
+              cell.IsCCRentalWarehouseStorageFees( true );
+            }
+            cell.CCRentalWarehouseStorageFees( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "CC闀块�旇繍杈撹垂鐢�" and not isnull( cell ) ) {
+            if ( not cell.IsCCLineHaulCost() and cell.CCLineHaulCost() <> [Real]cellValue ) {
+              cell.IsCCLineHaulCost( true );
+            }
+            cell.CCLineHaulCost( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "CC鐭�旇繍杈撹垂鐢�"       and not isnull( cell ) ) {
+            if ( not cell.IsCCShortDistanceTransportationCosts() and cell.CCShortDistanceTransportationCosts() <> [Real]cellValue ) {
+              cell.IsCCShortDistanceTransportationCosts( true );
+            }
+            cell.CCShortDistanceTransportationCosts( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "DL澶栫搴撳叆搴撹垂鐢�"     and not isnull( cell ) ) {
+            if ( not cell.IsDLStorageFeesForRentedWarehouses() and cell.DLStorageFeesForRentedWarehouses() <> [Real]cellValue ) {
+              cell.IsDLStorageFeesForRentedWarehouses( true );
+            }
+            cell.DLStorageFeesForRentedWarehouses( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "DL澶栫搴撳嚭搴撹垂鐢�"           and not isnull( cell ) ) {
+            if ( not cell.IsDLOutboundExpensesForRentedWarehouses() and cell.DLOutboundExpensesForRentedWarehouses() <> [Real]cellValue ) {
+              cell.IsDLOutboundExpensesForRentedWarehouses( true );
+            }
+            cell.DLOutboundExpensesForRentedWarehouses( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "DL澶栫搴撹繍杈撹垂鐢�"         and not isnull( cell ) ) {
+            if ( not cell.IsDLExternalRentalWarehouseTransportationCosts() and cell.DLExternalRentalWarehouseTransportationCosts() <> [Real]cellValue ) {
+              cell.IsDLExternalRentalWarehouseTransportationCosts( true );
+            }
+            cell.DLExternalRentalWarehouseTransportationCosts( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "澶栫搴撲粨鍌ㄨ垂鐢�"         and not isnull( cell ) ) {
+            if ( not cell.IsDLRentalWarehouseStorageFees() and cell.DLRentalWarehouseStorageFees() <> [Real]cellValue ) {
+              cell.IsDLRentalWarehouseStorageFees( true );
+            }
+            cell.DLRentalWarehouseStorageFees( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "娓呮礂璐圭敤"         and not isnull( cell ) ) {
+            if ( not cell.IsCleaningCost() and cell.CleaningCost() <> [Real]cellValue ) {
+              cell.IsCleaningCost( true );
+            }
+            cell.CleaningCost( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "棰勮鎬昏垂鐢�"         and not isnull( cell ) ) {
+            if ( not cell.IsEstimatedTotalCost() and cell.EstimatedTotalCost() <> [Real]cellValue ) {
+              cell.IsEstimatedTotalCost( true );
+            }
+            cell.EstimatedTotalCost( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "绯绘暟"         and not isnull( cell ) ) {
+            if ( not cell.IsCoefficient() and cell.Coefficient() <> [Real]cellValue ) {
+              cell.IsCoefficient( true );
+            }
+            cell.Coefficient( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "鎬昏垂鐢�"         and not isnull( cell ) ) {
+            if ( not cell.IsTotalCost() and cell.TotalCost() <> [Real]cellValue ) {
+              cell.IsTotalCost( true );
+            }
+            cell.TotalCost( [Real]cellValue );
+          }
+        }
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl b/_Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl
new file mode 100644
index 0000000..426630d
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute DisplayName
+{
+  #keys: '3[415754.0.459254782][415754.0.459254781][415754.0.459254783]'
+  Description: '鍒楁樉绀�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl b/_Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl
new file mode 100644
index 0000000..fea962d
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcDisplayName
+{
+  TextBody:
+  [*
+    value := ifexpr( this.StartDate().IsMaxInfinity(), "SUM", this.StartDate().Format( "Y-M2-D2" ) );
+    
+    this.DisplayName( value );
+  *]
+}
diff --git a/_Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl b/_Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl
new file mode 100644
index 0000000..8e32629
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Index
+{
+  #keys: '3[415754.0.459217915][415754.0.459217914][415754.0.459217916]'
+  Description: '鎺掑簭绱㈠紩'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl b/_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl
index cc3f7b8..64e6dfc 100644
--- a/_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl
+++ b/_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl
@@ -6,7 +6,7 @@
   [*
     // lihongji Aug-12-2024 (created)
     
-    value := this.Generation() + " " + this.MLB_MQB();
+    value := this.Generation() + ifexpr( this.MLB_MQB() <> "", " " + this.MLB_MQB(), "" );
     
     this.Name( value );
   *]
diff --git a/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
index 6bcfb2a..f9b03a6 100644
--- a/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
@@ -115,7 +115,7 @@
       ccsvaluesum           := ccsvaluesum + ccsvalue;
     }
     sumcolumn                 := table.FinancialWeeklyColumn( relnew, Name := 'SUM' );
-    //cumulantcolumn            := table.FinancialWeeklyColumn( relnew, Name := '绱閲�' );
+    cumulantcolumn            := table.FinancialWeeklyColumn( relnew, Name := '绱閲�' );
     proportioncolumn          := table.FinancialWeeklyColumn( relnew, Name := '鍗犳瘮' );
     //SUM
     totalpcellsum           := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]( [Number]totalpvaluesum ) );
@@ -131,18 +131,18 @@
     ccscellsum              := sumcolumn.FinancialWeeklyCell( relnew, Value := [String]ccsvaluesum );
     ccsales.FinancialWeeklyCell( relinsert, ccscellsum );
     //绱閲�
-    //totalpcellcumulant      := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalpvaluecumulant );
-    //totalproduction.FinancialWeeklyCell( relinsert, totalpcellcumulant );
-    //dlpcellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlpvaluecumulant );
-    //dlproduction.FinancialWeeklyCell( relinsert, dlpcellcumulant );
-    //ccpcellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccpvaluecumulant );
-    //ccproduction.FinancialWeeklyCell( relinsert, ccpcellcumulant );
-    //totalscellcumulant      := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalsvaluecumulant );
-    //totalsales.FinancialWeeklyCell( relinsert, totalscellcumulant );
-    //dlscellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlsvaluecumulant );
-    //dlsales.FinancialWeeklyCell( relinsert, dlscellcumulant );
-    //ccscellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccsvaluecumulant );
-    //ccsales.FinancialWeeklyCell( relinsert, ccscellcumulant );
+    totalpcellcumulant      := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalpvaluecumulant );
+    totalproduction.FinancialWeeklyCell( relinsert, totalpcellcumulant );
+    dlpcellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlpvaluecumulant );
+    dlproduction.FinancialWeeklyCell( relinsert, dlpcellcumulant );
+    ccpcellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccpvaluecumulant );
+    ccproduction.FinancialWeeklyCell( relinsert, ccpcellcumulant );
+    totalscellcumulant      := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]totalsvaluecumulant );
+    totalsales.FinancialWeeklyCell( relinsert, totalscellcumulant );
+    dlscellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]dlsvaluecumulant );
+    dlsales.FinancialWeeklyCell( relinsert, dlscellcumulant );
+    ccscellcumulant         := cumulantcolumn.FinancialWeeklyCell( relnew, Value := [String]ccsvaluecumulant );
+    ccsales.FinancialWeeklyCell( relinsert, ccscellcumulant );
     //鍗犳瘮
     totalpvalueproportion   := guard( ( totalpvaluecumulant / totalpvaluesum ).Format( 'N(Dec(2))' ), '0.00' );
     totalpcellproportion    := proportioncolumn.FinancialWeeklyCell( relnew, Value := totalpvalueproportion );
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement.qbl
new file mode 100644
index 0000000..6099ad5
--- /dev/null
+++ b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateCellElement (
+  XMLDOMDocument xmlDOM,
+  XMLDOMElement columnelement,
+  String value
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-18-2024 (created)
+    cellElement          := xmlDOM.CreateElement( "cell" );
+    cellElement.SetAttribute( "value", value );
+    columnelement.AppendChild( cellElement );
+  *]
+}
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement0.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement0.qbl
new file mode 100644
index 0000000..509d7b3
--- /dev/null
+++ b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateCellElement0.qbl
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateCellElement (
+  XMLDOMDocument xmlDOM,
+  XMLDOMElement columnelement,
+  String value,
+  Number rowsize
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-18-2024 (created)
+    for( j := 0; j < rowsize; j := j + 1 ){
+      cellElement          := xmlDOM.CreateElement( "cell" );
+      cellElement.SetAttribute( "value", value );
+      columnelement.AppendChild( cellElement );
+    }
+  *]
+}
diff --git "a/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement\043817.qbl" "b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement\043817.qbl"
new file mode 100644
index 0000000..3060af4
--- /dev/null
+++ "b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement\043817.qbl"
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateColumnElement (
+  XMLDOMElement xmltable,
+  XMLDOMDocument xmlDOM,
+  String name
+) as XMLDOMElement
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-18-2024 (created)
+    columnelement           := xmlDOM.CreateElement( "column" );
+    nameelement             := xmlDOM.CreateElement( "name" );
+    typeelement             := xmlDOM.CreateElement( "type" );
+    nameelement.TextContent( name );
+    typeelement.TextContent( "String" );
+    columnelement.AppendChild( nameelement );
+    columnelement.AppendChild( typeelement );
+    
+    xmltable.AppendChild( columnelement ); 
+    return columnelement;
+  *]
+}
diff --git "a/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement\043822.qbl" "b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement\043822.qbl"
new file mode 100644
index 0000000..690264a
--- /dev/null
+++ "b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement\043822.qbl"
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateColumnElement (
+  XMLDOMElement xmltable,
+  XMLDOMDocument xmlDOM,
+  String value,
+  String name,
+  Number rowsize
+) as XMLDOMElement
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-18-2024 (created)
+    columnelement           := InventorySummarySource::CreateColumnElement( xmltable, xmlDOM, name );
+    
+    InventorySummarySource::CreateCellElement( xmlDOM, columnelement, value );
+    
+    for( i := 1; i < rowsize; i := i + 1 ){
+      InventorySummarySource::CreateCellElement( xmlDOM, columnelement, '' );
+    }
+    
+    return columnelement;
+  *]
+}
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement.qbl
new file mode 100644
index 0000000..e1d08e3
--- /dev/null
+++ b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement.qbl
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateColumnElement (
+  XMLDOMElement xmltable,
+  XMLDOMDocument xmlDOM,
+  Strings values,
+  String name,
+  Number rowsize
+) as XMLDOMElement
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-18-2024 (created)
+    columnelement           := InventorySummarySource::CreateColumnElement( xmltable, xmlDOM, name );
+    
+    for( i := 0; i < rowsize; i := i + 1 ){
+      if( i < values.Size() ){
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, values.Element( i ) );
+      }else{
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, '' );
+      }
+    }
+    
+    return columnelement;
+  *]
+}
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement0.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement0.qbl
new file mode 100644
index 0000000..e018a3e
--- /dev/null
+++ b/_Main/BL/Type_InventorySummarySource/StaticMethod_CreateColumnElement0.qbl
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateColumnElement (
+  XMLDOMElement xmltable,
+  XMLDOMDocument xmlDOM,
+  String name,
+  Number rowsize
+) as XMLDOMElement
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-18-2024 (created)
+    columnelement           := InventorySummarySource::CreateColumnElement( xmltable, xmlDOM, '' );
+    
+    for( i := 0; i < rowsize; i := i + 1 ){
+      InventorySummarySource::CreateCellElement( xmlDOM, columnelement, '' );
+    }
+    InventorySummarySource::CreateCellElement( xmlDOM, columnelement, name );
+    return columnelement;
+  *]
+}
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_Download.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_Download.qbl
index c989643..d18d397 100644
--- a/_Main/BL/Type_InventorySummarySource/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_InventorySummarySource/StaticMethod_Download.qbl
@@ -12,116 +12,67 @@
   Description: '涓嬭浇璐㈠姟鎶ヨ〃鏁版嵁'
   TextBody:
   [*
-    
+    //鑾峰彇鏌ヨ琛屾暟
+    searchrowsize               := InventorySummarySource::GetSearchRows( factorys, generations, powers, mlbmqls );
     table                       := selectobject( macroPlan, InventorySummarySource.InventorySummaryReport, table, table.IsShow() );
     
     xmlDOMI                     := XMLDOMImplementation::Create();
     xmlDOM                      := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + table.Name() + '</name></table>' );
     
     tableElement                := xmlDOM.GetElementByTagName( "table", 0 );
-    //Search
-    searchcolumnelement         := xmlDOM.CreateElement( "column" );
-    searchnameelement           := xmlDOM.CreateElement( "name" );
-    searchtypeelement           := xmlDOM.CreateElement( "type" );
-    searchnameelement.TextContent( 'Search' );
-    searchtypeelement.TextContent( "String" );
-    searchcolumnelement.AppendChild( searchnameelement );
-    searchcolumnelement.AppendChild( searchtypeelement );
-    //Product
-    productcolumnelement        := xmlDOM.CreateElement( "column" );
-    productnameelement          := xmlDOM.CreateElement( "name" );
-    producttypeelement          := xmlDOM.CreateElement( "type" );
-    productnameelement.TextContent( 'Product' );
-    producttypeelement.TextContent( "String" );
-    productcolumnelement.AppendChild( productnameelement );
-    productcolumnelement.AppendChild( producttypeelement );
-    //Unit
-    unitcolumnelement           := xmlDOM.CreateElement( "column" );
-    unitnameelement             := xmlDOM.CreateElement( "name" );
-    unittypeelement             := xmlDOM.CreateElement( "type" );
-    unitnameelement.TextContent( 'Unit' );
-    unittypeelement.TextContent( "String" );
-    unitcolumnelement.AppendChild( unitnameelement );
-    unitcolumnelement.AppendChild( unittypeelement );
-    //Attribute
-    attricolumnelement          := xmlDOM.CreateElement( "column" );
-    attrinameelement            := xmlDOM.CreateElement( "name" );
-    attritypeelement            := xmlDOM.CreateElement( "type" );
-    attrinameelement.TextContent( 'Attribute' );
-    attritypeelement.TextContent( "String" );
-    attricolumnelement.AppendChild( attrinameelement );
-    attricolumnelement.AppendChild( attritypeelement );
+    //Product/Unit
+    factoryvalues               := selectuniquevalues( factorys, Elements, factory, factory.Name() );
+    productcolumnelement        := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, factoryvalues, 'Unit', searchrowsize );
+    InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, 'Product' );
+    //Unit/Generation
+    generationvalues            := selectuniquevalues( generations, Elements, generation, generation.Generation() );
+    unitcolumnelement           := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, generationvalues, 'Generation', searchrowsize );
+    InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, 'Unit' );
+    //Attribute/Power
+    powervalues                 := selectuniquevalues( powers, Elements, power, power.Power() );
+    attricolumnelement          := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, powervalues, 'Power', searchrowsize );
+    InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, 'Attribute' );
+    //MLBMQBS
+    mlbmqbvalues                := selectuniquevalues( mlbmqls, Elements, mlbmqb, mlbmqb.MLBMQB() );
+    mlbmqlcolumnelement         := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, mlbmqbvalues, 'MLBMQB', searchrowsize );
+    //Start date
+    startcolumnelement          := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, search.StartDate().Format( 'M2/D2/Y' ), 'Start date', searchrowsize );
+    //End date
+    endcolumnelement            := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, search.EndDate().Format( 'M2/D2/Y' ), 'End date', searchrowsize );
+    //Period
+    periodcolumnelement         := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, search.Category(), 'Period', searchrowsize );
     
-    tableElement.AppendChild( searchcolumnelement ); 
-    tableElement.AppendChild( productcolumnelement ); 
-    tableElement.AppendChild( unitcolumnelement ); 
-    tableElement.AppendChild( attricolumnelement );
-    searchtotal                 := factorys.Size() + generations.Size() + powers.Size() + mlbmqls.Size() + 10 ;
-    searchunitElement           := xmlDOM.CreateElement( "cell" );
-    searchunitElement.SetAttribute( "value", 'Unit' );
-    searchcolumnelement.AppendChild( searchunitElement );
-    traverse( factorys, Elements, factory ){
-      searchunitcellElement     := xmlDOM.CreateElement( "cell" );
-      searchunitcellElement.SetAttribute( "value", factory.Name() );
-      searchcolumnelement.AppendChild( searchunitcellElement );
-    }
-    searchgenerationElement     := xmlDOM.CreateElement( "cell" );
-    searchgenerationElement.SetAttribute( "value", 'Generation' );
-    searchcolumnelement.AppendChild( searchgenerationElement );
-    traverse( generations, Elements, generation ){
-      generationcellElement     := xmlDOM.CreateElement( "cell" );
-      generationcellElement.SetAttribute( "value", generation.Generation() );
-      searchcolumnelement.AppendChild( generationcellElement );
-    }
-    searchpowerElement          := xmlDOM.CreateElement( "cell" );
-    searchpowerElement.SetAttribute( "value", 'Power' );
-    searchcolumnelement.AppendChild( searchpowerElement );
-    traverse( powers, Elements, power ){
-      searchpowercellElement    := xmlDOM.CreateElement( "cell" );
-      searchpowercellElement.SetAttribute( "value", power.Power() );
-      searchcolumnelement.AppendChild( searchpowercellElement );
-    }
-    searchmlbmqlElement         := xmlDOM.CreateElement( "cell" );
-    searchmlbmqlElement.SetAttribute( "value", 'MQBMLB' );
-    searchcolumnelement.AppendChild( searchmlbmqlElement );
-    traverse( mlbmqls, Elements, mlbmql ){
-      searchmlbmqlcellElement   := xmlDOM.CreateElement( "cell" );
-      searchmlbmqlcellElement.SetAttribute( "value", mlbmql.MLBMQB() );
-      searchcolumnelement.AppendChild( searchmlbmqlcellElement );
-    }
-    searchstartdateElement      := xmlDOM.CreateElement( "cell" );
-    searchstartdateElement.SetAttribute( "value", 'Start date' );
-    searchcolumnelement.AppendChild( searchstartdateElement );
-    searchstartdatecellElement  := xmlDOM.CreateElement( "cell" );
-    searchstartdatecellElement.SetAttribute( "value", search.StartDate().Format( 'M2/D2/Y' ) );
-    searchcolumnelement.AppendChild( searchstartdatecellElement );
-    searchenddateElement        := xmlDOM.CreateElement( "cell" );
-    searchenddateElement.SetAttribute( "value", 'End date' );
-    searchcolumnelement.AppendChild( searchenddateElement );
-    searchenddatecellElement    := xmlDOM.CreateElement( "cell" );
-    searchenddatecellElement.SetAttribute( "value", search.EndDate().Format( 'M2/D2/Y' ) );
-    searchcolumnelement.AppendChild( searchenddatecellElement );
-    searchperiodElement         := xmlDOM.CreateElement( "cell" );
-    searchperiodElement.SetAttribute( "value", 'Periods' );
-    searchcolumnelement.AppendChild( searchperiodElement );
-    searchperiodcellElement     := xmlDOM.CreateElement( "cell" );
-    searchperiodcellElement.SetAttribute( "value", search.Category() );
-    searchcolumnelement.AppendChild( searchperiodcellElement );
-    
-    for( i := searchtotal; i < table.InventroySummaryRow( relsize ) * 4; i := i + 1 ){
-      searchcellElement         := xmlDOM.CreateElement( "cell" );
-      searchcellElement.SetAttribute( "value", '' );
-      searchcolumnelement.AppendChild( searchcellElement );
+    searchcolumn                := 7 ;
+    rowsize                     := table.InventroySummaryRow( relsize ) * 4;
+    for( i := table.InventorySummaryColumn( relsize ); i < searchcolumn - 3; i := i + 1 ){
+      if( i = 0 ){
+        InventorySummarySource::CreateCellElement( xmlDOM, mlbmqlcolumnelement, '', rowsize );
+      }else if( i = 1 ){
+        InventorySummarySource::CreateCellElement( xmlDOM, startcolumnelement, '', rowsize );
+      }else if( i = 2 ){
+        InventorySummarySource::CreateCellElement( xmlDOM, endcolumnelement, '', rowsize );
+      }else if( i = 3 ){
+        InventorySummarySource::CreateCellElement( xmlDOM, periodcolumnelement, '', rowsize );
+      }
     }
     
     traverse ( table, InventorySummaryColumn, column ) {
-      columnelement             := xmlDOM.CreateElement( "column" );
-      nameelement               := xmlDOM.CreateElement( "name" );
-      typeelement               := xmlDOM.CreateElement( "type" );
-      nameelement.TextContent( column.Name() );
-      typeelement.TextContent( "String" );
-      columnelement.AppendChild( nameelement );
-      columnelement.AppendChild( typeelement );
+      columnelement             := null( XMLDOMElement ); 
+      if( column.Index() = 0 ){
+        columnelement           := mlbmqlcolumnelement;
+        InventorySummarySource::CreateCellElement( xmlDOM, mlbmqlcolumnelement, column.Name() );
+      }else if( column.Index() = 1 ){
+        columnelement           := startcolumnelement
+        InventorySummarySource::CreateCellElement( xmlDOM, startcolumnelement, column.Name() );
+      }else if( column.Index() = 2 ){
+        columnelement           := endcolumnelement;
+        InventorySummarySource::CreateCellElement( xmlDOM, endcolumnelement, column.Name() );
+      }else if( column.Index() = 3 ){
+        columnelement           := periodcolumnelement;
+        InventorySummarySource::CreateCellElement( xmlDOM, periodcolumnelement, column.Name() );
+      }else{
+        columnelement           := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, column.Name(), rowsize );
+      }
       
       cells                     := selectsortedset( column, InventorySummaryCell, cell, cell.InventroySummaryRow().RowNr() );
     
@@ -129,86 +80,36 @@
         if( column.Index() = 0 ){
           row                   := c.InventroySummaryRow();
           //Product
-          productcellElement1   := xmlDOM.CreateElement( "cell" );
-          productcellElement1.SetAttribute( "value", row.Name() );
-          productcolumnelement.AppendChild( productcellElement1 );
-          productcellElement2   := xmlDOM.CreateElement( "cell" );
-          productcellElement2.SetAttribute( "value", row.Name() );
-          productcolumnelement.AppendChild( productcellElement2 );
-          productcellElement3   := xmlDOM.CreateElement( "cell" );
-          productcellElement3.SetAttribute( "value", row.Name() );
-          productcolumnelement.AppendChild( productcellElement3 );
-          productcellElement4   := xmlDOM.CreateElement( "cell" );
-          productcellElement4.SetAttribute( "value", row.Name() );
-          productcolumnelement.AppendChild( productcellElement4 );
+          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
+          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
+          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
+          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
           //Unit
-          unitcellElement1      := xmlDOM.CreateElement( "cell" );
-          unitcellElement1.SetAttribute( "value", row.Unit() );
-          unitcolumnelement.AppendChild( unitcellElement1 );
-          unitcellElement2      := xmlDOM.CreateElement( "cell" );
-          unitcellElement2.SetAttribute( "value", row.Unit() );
-          unitcolumnelement.AppendChild( unitcellElement2 );
-          unitcellElement3      := xmlDOM.CreateElement( "cell" );
-          unitcellElement3.SetAttribute( "value", row.Unit() );
-          unitcolumnelement.AppendChild( unitcellElement3 );
-          unitcellElement4      := xmlDOM.CreateElement( "cell" );
-          unitcellElement4.SetAttribute( "value", row.Unit() );
-          unitcolumnelement.AppendChild( unitcellElement4 );
+          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
+          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
+          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
+          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
           //Attribute
           //鏈熸湯搴撳瓨
-          endcellElement        := xmlDOM.CreateElement( "cell" );
-          endcellElement.SetAttribute( "value", '鏈熸湯搴撳瓨' );//EndingInventory
-          attricolumnelement.AppendChild( endcellElement );
+          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '鏈熸湯搴撳瓨' );//EndingInventory
           //鏈�灏忓簱瀛�
-          mincellElement        := xmlDOM.CreateElement( "cell" );
-          mincellElement.SetAttribute( "value", '鏈�灏忓簱瀛�' );//MinimumInventory
-          attricolumnelement.AppendChild( mincellElement );
+          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '鏈�灏忓簱瀛�' );//MinimumInventory
           //鏈�澶у簱瀛�
-          maxcellElement        := xmlDOM.CreateElement( "cell" );
-          maxcellElement.SetAttribute( "value", '鏈�澶у簱瀛�' );//MaximumInventory
-          attricolumnelement.AppendChild( maxcellElement );
+          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '鏈�澶у簱瀛�' );//MaximumInventory
           //骞冲潎搴撳瓨
-          avecellElement        := xmlDOM.CreateElement( "cell" );
-          avecellElement.SetAttribute( "value", '骞冲潎搴撳瓨' );//AverageInventory
-          attricolumnelement.AppendChild( avecellElement );
+          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '骞冲潎搴撳瓨' );//AverageInventory
     
         }
         //鏈熸湯搴撳瓨
-        endcellElement          := xmlDOM.CreateElement( "cell" );
-        endcellElement.SetAttribute( "value", [String]c.EndingInventory() );
-        columnelement.AppendChild( endcellElement );
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.EndingInventory() );
         //鏈�灏忓簱瀛�
-        mincellElement          := xmlDOM.CreateElement( "cell" );
-        mincellElement.SetAttribute( "value", [String]c.MinimumInventory() );
-        columnelement.AppendChild( mincellElement );
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.MinimumInventory() );
         //鏈�澶у簱瀛�
-        maxcellElement          := xmlDOM.CreateElement( "cell" );
-        maxcellElement.SetAttribute( "value", [String]c.MaximumInventory() );
-        columnelement.AppendChild( maxcellElement );
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.MaximumInventory() );
         //骞冲潎搴撳瓨
-        avecellElement          := xmlDOM.CreateElement( "cell" );
-        avecellElement.SetAttribute( "value", [String]c.AverageInventory() );
-        columnelement.AppendChild( avecellElement );
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.AverageInventory() );
       }
-      for( i := cells.Size() * 4; i < searchtotal; i := i + 1 ){
-        searchcellElement       := xmlDOM.CreateElement( "cell" );
-        searchcellElement.SetAttribute( "value", '' );
-        columnelement.AppendChild( searchcellElement );
-        if( column.Index() = 0 ){
-          productcellElement    := xmlDOM.CreateElement( "cell" );
-          productcellElement.SetAttribute( "value", '' );
-          productcolumnelement.AppendChild( productcellElement );
-          
-          unitcellElement       := xmlDOM.CreateElement( "cell" );
-          unitcellElement.SetAttribute( "value", '' );
-          unitcolumnelement.AppendChild( unitcellElement );
-            
-          endcellElement        := xmlDOM.CreateElement( "cell" );
-          endcellElement.SetAttribute( "value", '' );//EndingInventory
-          attricolumnelement.AppendChild( endcellElement );
-          
-        }
-      }
+    
       tableElement.AppendChild( columnelement );  
     }
     
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_Download0.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_Download0.qbl
new file mode 100644
index 0000000..36a27c4
--- /dev/null
+++ b/_Main/BL/Type_InventorySummarySource/StaticMethod_Download0.qbl
@@ -0,0 +1,104 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Download0 (
+  MacroPlan macroPlan,
+  Factorys factorys,
+  ProductGenerations generations,
+  ProductPowers powers,
+  ProductMLBMQBs mlbmqls,
+  InventorySummarySearch search
+) as BinaryValue
+{
+  Description: '涓嬭浇璐㈠姟鎶ヨ〃鏁版嵁'
+  TextBody:
+  [*
+    //鑾峰彇鏌ヨ琛屾暟
+    searchrowsize               := InventorySummarySource::GetSearchRows( factorys, generations, powers, mlbmqls );
+    table                       := selectobject( macroPlan, InventorySummarySource.InventorySummaryReport, table, table.IsShow() );
+    
+    xmlDOMI                     := XMLDOMImplementation::Create();
+    xmlDOM                      := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + table.Name() + '</name></table>' );
+    
+    tableElement                := xmlDOM.GetElementByTagName( "table", 0 );
+    //Product
+    productcolumnelement        := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Product' );
+    //Unit
+    unitcolumnelement           := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Unit' );
+    //Attribute
+    attricolumnelement          := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Attribute' );
+    traverse ( table, InventorySummaryColumn, column ) {
+      columnelement             := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, column.Name() );
+      
+      cells                     := selectsortedset( column, InventorySummaryCell, cell, cell.InventroySummaryRow().RowNr() );
+    
+      traverse ( cells, Elements, c ) {
+        if( column.Index() = 0 ){
+          row                   := c.InventroySummaryRow();
+          //Product
+          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
+          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
+          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
+          InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
+          //Unit
+          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
+          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
+          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
+          InventorySummarySource::CreateCellElement( xmlDOM, unitcolumnelement, row.Unit() );
+          //Attribute
+          //鏈熸湯搴撳瓨
+          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '鏈熸湯搴撳瓨' );//EndingInventory
+          //鏈�灏忓簱瀛�
+          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '鏈�灏忓簱瀛�' );//MinimumInventory
+          //鏈�澶у簱瀛�
+          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '鏈�澶у簱瀛�' );//MaximumInventory
+          //骞冲潎搴撳瓨
+          InventorySummarySource::CreateCellElement( xmlDOM, attricolumnelement, '骞冲潎搴撳瓨' );//AverageInventory
+    
+        }
+        //鏈熸湯搴撳瓨
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.EndingInventory() );
+        //鏈�灏忓簱瀛�
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.MinimumInventory() );
+        //鏈�澶у簱瀛�
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.MaximumInventory() );
+        //骞冲潎搴撳瓨
+        InventorySummarySource::CreateCellElement( xmlDOM, columnelement, [String]c.AverageInventory() );
+      }
+    
+      tableElement.AppendChild( columnelement );  
+    }
+    searchxmlDOM                := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + 'Search' + '</name></table>' );
+    searchElement               := searchxmlDOM.GetElementByTagName( "table", 0 );
+    //Unit
+    factoryvalues               := selectuniquevalues( factorys, Elements, factory, factory.Name() );
+    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, factoryvalues, 'Unit', searchrowsize );
+    //Generation
+    generationvalues            := selectuniquevalues( generations, Elements, generation, generation.Generation() );
+    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, generationvalues, 'Generation', searchrowsize );
+    //Power
+    powervalues                 := selectuniquevalues( powers, Elements, power, power.Power() );
+    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, powervalues, 'Power', searchrowsize );
+    //MLBMQBS
+    mlbmqbvalues                := selectuniquevalues( mlbmqls, Elements, mlbmqb, mlbmqb.MLBMQB() );
+    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, mlbmqbvalues, 'MLBMQB', searchrowsize );
+    //Start date
+    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, search.StartDate().Format( 'M2/D2/Y' ), 'Start date', searchrowsize );
+    //End date
+    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, search.EndDate().Format( 'M2/D2/Y' ), 'End date', searchrowsize );
+    //Period
+    InventorySummarySource::CreateColumnElement( searchElement, searchxmlDOM, search.Category(), 'Period', searchrowsize );
+    
+    xmlString                   := xmlDOMI.CreateSerializer().WriteToString( xmlDOM );
+    
+    tableGroupHandle            := TableGroupHandle::Create( InventorySummaryReport::GetDefaultName() );
+    tableHandle                 := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
+    tableGroupHandle.Add( tableHandle );
+    searchxmlString                   := xmlDOMI.CreateSerializer().WriteToString( searchxmlDOM );
+    searchtableHandle                 := TableHandle::ImportXML( BinaryValue::Construct( searchxmlString ) );
+    tableGroupHandle.Add( searchtableHandle );
+    
+    binaryData                  := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
+    
+    return binaryData.AsBinaryValue();
+  *]
+}
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_GetSearchRows.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_GetSearchRows.qbl
new file mode 100644
index 0000000..b8deb38
--- /dev/null
+++ b/_Main/BL/Type_InventorySummarySource/StaticMethod_GetSearchRows.qbl
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetSearchRows (
+  Factorys factorys,
+  ProductGenerations generations,
+  ProductPowers powers,
+  ProductMLBMQBs mlbmqls
+) as Number
+{
+  Description: '鑾峰彇鏌ヨ鏉′欢琛屾暟'
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-18-2024 (created)
+    searchrows                  := construct( Numbers );
+    searchrows.Add( factorys.Size() );
+    searchrows.Add( generations.Size() );
+    searchrows.Add( powers.Size() );
+    searchrows.Add( mlbmqls.Size() );
+    searchrowsize               := max( searchrows, Elements, e, e );
+    return searchrowsize;
+  *]
+}
diff --git a/_Main/BL/Type_Unit/Method_WholeShiftFiltering.qbl b/_Main/BL/Type_Unit/Method_WholeShiftFiltering.qbl
index b110d74..e56a1d9 100644
--- a/_Main/BL/Type_Unit/Method_WholeShiftFiltering.qbl
+++ b/_Main/BL/Type_Unit/Method_WholeShiftFiltering.qbl
@@ -2,5 +2,5 @@
 #parent: #root
 Method WholeShiftFiltering () declarative remote as Boolean
 {
-  TextBody: 'return this.HasCapacityTypeTime() or this.HasCapacityTypeTransportQuantity();'
+  TextBody: 'return this.HasCapacityTypeTime() or ( this.HasCapacityTypeTransportQuantity() and this.Name().Regex( "Transport" ) );'
 }
diff --git a/_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling4.qbl b/_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling4.qbl
index 2155752..e2d567d 100644
--- a/_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling4.qbl
+++ b/_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling4.qbl
@@ -8,27 +8,17 @@
   Description: '杞﹂亾鏁寸彮'
   TextBody:
   [*
-    traverse ( unit, Lane.LaneLeg.Trip, t ) {
-      traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 ) {
-        info( pit.Product_MP().ParentID() );
-        // 鑾峰彇浜у搧lotsize鍊嶆暟
-        lotsize := 1;
-        if ( pit.Product_MP().ParentID().Regex( "ZKG" ) ) {
-          lotsize := macroPlan.CylinderBlock();
-        } else if ( pit.Product_MP().ParentID().Regex( "ZKM" ) ) {
-          lotsize := macroPlan.CylinderHead();
-        } else if ( pit.Product_MP().ParentID().Regex( "PL" ) ) {
-          lotsize := macroPlan.ConnectingRod();
-        } else if ( pit.Product_MP().ParentID().Regex( "KW" ) ) {
-          lotsize := macroPlan.Crankshaft();
-        } else if ( pit.Product_MP().ParentID().Regex( "AGW" ) ) {
-          lotsize := macroPlan.BalanceAxis();
-        }
-        
-        if ( lotsize > 1 ) {
-          debuginfo( "浜у搧ID锛�", pit.ProductID(), "    浜у搧鏁伴噺锛�", pit.Quantity(), "    lotsize锛�", lotsize );
-          quantityToBeSupplemented := lotsize - ( pit.Quantity() mod lotsize );
-          pit.Update( pit.Quantity() + quantityToBeSupplemented, true );
+    us  := unit.Name().Tokenize( " " );
+    tmq := select( macroPlan, TransferMinimumQuantity, tempTMQ, tempTMQ.FactoryAbbreviation() = us.Element( 0 ) and tempTMQ.ProductID() = us.Element( 3 ) );
+    
+    if ( not isnull( tmq ) ) {
+    //  info( "鏈�灏忓寘瑁卨otsize锛�", tmq.Quantity() );
+      traverse ( unit, Lane.LaneLeg.Trip, t ) {
+        needRoundTransferQuantity := tmq.Quantity() - ( [Number]t.Quantity() mod tmq.Quantity() );
+        if ( needRoundTransferQuantity <> 0 and needRoundTransferQuantity <> tmq.Quantity() ) {
+    //      info( "鏃堕棿锛�", t.Departure().Date().Format( "Y-M2-D2" ), "    浣欐暟锛�", needRoundTransferQuantity );
+          pit := minselect( t, ProductInTrip, tempPIT, tempPIT.Quantity() > 0, tempPIT.Quantity() );
+          pit.Update( pit.Quantity() + needRoundTransferQuantity, true );
         }
       }
     }
diff --git a/_Main/Sys/Repr/Global/CC_EngineRackCell.qrp b/_Main/Sys/Repr/Global/CC_EngineRackCell.qrp
index 5e9255b..18b474f 100644
--- a/_Main/Sys/Repr/Global/CC_EngineRackCell.qrp
+++ b/_Main/Sys/Repr/Global/CC_EngineRackCell.qrp
@@ -6,51 +6,166 @@
   {
     AttributeKey: '[413988.0.1476832733]'
     Synonym: '娓呮礂璐圭敤'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateCleaningCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation Coefficient
   {
     AttributeKey: '[413988.0.1476832766]'
     Synonym: '绯绘暟'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateCoefficient()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
+    DataRepresentation.Default
+    {
+      FormatString: 'N(Dec(2))'
+      InheritFormatting: false
+    }
   }
   AttributeRepresentation EstimatedTotalCost
   {
     AttributeKey: '[413988.0.1476832743]'
     Synonym: '棰勮鎬昏垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateEstimatedTotalCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation ExternalRentalWarehouseTransportationCosts
   {
     AttributeKey: '[413988.0.1476832710]'
     Synonym: '澶栫搴撹繍杈撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateExternalRentalWarehouseTransportationCosts()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation NumberOfEmptyShelves
   {
     AttributeKey: '[413988.0.1476832677]'
     Synonym: '绌烘枡鏋舵暟閲�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateNumberOfEmptyShelves()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation OutboundExpensesForRentedWarehouses
   {
     AttributeKey: '[413988.0.1476832700]'
     Synonym: '澶栫搴撳嚭搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateOutboundExpensesForRentedWarehouses()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation RentalWarehouseStorageFees
   {
     AttributeKey: '[413988.0.1476832723]'
     Synonym: '澶栫搴撲粨鍌ㄨ垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateRentalWarehouseStorageFees()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation StorageFeesForRentedWarehouses
   {
     AttributeKey: '[413988.0.1476832690]'
     Synonym: '澶栫搴撳叆搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateStorageFeesForRentedWarehouses()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation TotalCost
   {
     AttributeKey: '[413988.0.1476832756]'
     Synonym: '鎬昏垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateTotalCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation TotalQuantityOfMaterialRacks
   {
     AttributeKey: '[413988.0.1476832664]'
     Synonym: '鏂欐灦鎬绘暟閲�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateTotalQuantityOfMaterialRacks()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   RelationRepresentation CC_EngineRackColumn { RelationKey: '[413988.0.1476832593]' Visibility: 'Normal' }
 }
diff --git a/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp b/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
index 1ee56ec..4542a16 100644
--- a/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
+++ b/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
@@ -6,76 +6,246 @@
   {
     AttributeKey: '[413988.0.1488160126]'
     Synonym: 'CC闀块�旇繍杈撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsCCLineHaulCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CCOutboundExpensesForRentedWarehouses
   {
     AttributeKey: '[413988.0.1488160087]'
     Synonym: 'CC澶栫搴撳嚭搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsCCOutboundExpensesForRentedWarehouses()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CCRentalWarehouseStorageFees
   {
     AttributeKey: '[413988.0.1488160084]'
     Synonym: 'CC澶栫搴撲粨鍌ㄨ垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsCCRentalWarehouseStorageFees()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CCShortDistanceTransportationCosts
   {
     AttributeKey: '[413988.0.1488160139]'
     Synonym: 'CC鐭�旇繍杈撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsCCShortDistanceTransportationCosts()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CCStorageFeesForRentedWarehouses
   {
     AttributeKey: '[413988.0.1488160081]'
     Synonym: 'CC澶栫搴撳叆搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsCCStorageFeesForRentedWarehouses()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CleaningCost
   {
     AttributeKey: '[413988.0.1488160069]'
     Synonym: '娓呮礂璐圭敤'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsCleaningCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation Coefficient
   {
     AttributeKey: '[413988.0.1488160075]'
     Synonym: '绯绘暟'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsCoefficient()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
+    DataRepresentation.Default
+    {
+      FormatString: 'N(Dec(2))'
+      InheritFormatting: false
+    }
   }
   AttributeRepresentation DLExternalRentalWarehouseTransportationCosts
   {
     AttributeKey: '[413988.0.1488160119]'
     Synonym: 'DL澶栫搴撹繍杈撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsDLExternalRentalWarehouseTransportationCosts()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation DLOutboundExpensesForRentedWarehouses
   {
     AttributeKey: '[413988.0.1488160106]'
     Synonym: 'DL澶栫搴撳嚭搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsDLOutboundExpensesForRentedWarehouses()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation DLRentalWarehouseStorageFees
   {
     AttributeKey: '[413988.0.1488160103]'
     Synonym: '澶栫搴撲粨鍌ㄨ垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsDLRentalWarehouseStorageFees()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation DLStorageFeesForRentedWarehouses
   {
     AttributeKey: '[413988.0.1488160100]'
     Synonym: 'DL澶栫搴撳叆搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsDLStorageFeesForRentedWarehouses()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation EstimatedTotalCost
   {
     AttributeKey: '[413988.0.1488160066]'
     Synonym: '棰勮鎬昏垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsEstimatedTotalCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation NumberOfEmptyShelves
   {
     AttributeKey: '[413988.0.1488160058]'
     Synonym: '绌烘枡鏋舵暟閲�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsNumberOfEmptyShelves()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation TotalCost
   {
     AttributeKey: '[413988.0.1488160072]'
     Synonym: '鎬昏垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsTotalCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation TotalQuantityOfMaterialRacks
   {
     AttributeKey: '[413988.0.1488160062]'
     Synonym: '鏂欐灦鎬绘暟閲�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsTotalQuantityOfMaterialRacks()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   RelationRepresentation DL_EngineRackColumn { RelationKey: '[413988.0.1488132648]' Visibility: 'Normal' }
 }
diff --git a/_Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp b/_Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp
index 6e211a7..b891513 100644
--- a/_Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp
+++ b/_Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp
@@ -11,6 +11,14 @@
   {
     AttributeKey: '[413988.0.1462991559]'
     Synonym: '绯绘暟'
+    Conditional:
+    [
+    ]
+    DataRepresentation.Default
+    {
+      FormatString: 'N(Dec(2))'
+      InheritFormatting: false
+    }
   }
   AttributeRepresentation EstimatedTotalCost
   {
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def
index 6179223..2a109d9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def
@@ -79,7 +79,7 @@
       ]
       Properties:
       [
-        Legend: 'StartDate'
+        Legend: 'DisplayName'
         SortCriteria: 'StartDate'
         Taborder: 2
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def
new file mode 100644
index 0000000..7ca9b8d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor531
+Response OnCheckEditability () id:Response_MatrixEditor531_OnCheckEditability
+{
+  #keys: '[415754.0.470111247]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMatrixEditor_OnCheckEditability'
+  QuillAction
+  {
+    Body:
+    [*
+      cond := focusedattribute = "TotalQuantityOfMaterialRacks";
+      
+      editinfo.CanEdit( cond );
+      editinfo.UserHint( ifexpr( cond, "", "涓嶈兘淇敼" ) );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def
new file mode 100644
index 0000000..3a06bb2
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor531
+Response OnUpdateValue (
+  CC_EngineRackCell cell,
+  Real value
+) id:Response_MatrixEditor531_OnUpdateValue
+{
+  #keys: '[415754.0.469051167]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
+  QuillAction
+  {
+    Body:
+    [*
+      cell.SetTheTotalQuantity( value );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
index e80f1a7..353785c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
@@ -79,7 +79,7 @@
       ]
       Properties:
       [
-        Legend: 'StartDate'
+        Legend: 'DisplayName'
         SortCriteria: 'StartDate'
         Taborder: 2
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def
index d9d33b0..3eff2a7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def
@@ -15,6 +15,28 @@
         Taborder: 0
       ]
     }
+    Component bImport id:bImport_549
+    {
+      #keys: '[415754.0.469011898]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'IMPORT1'
+        Label: '瀵煎叆'
+        Taborder: 1
+      ]
+    }
+    Component bExport id:bExport_715
+    {
+      #keys: '[415754.0.469011958]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'EXPORT1'
+        Label: '瀵煎嚭'
+        Taborder: 2
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def
new file mode 100644
index 0000000..c28e190
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor392
+Response OnCheckEditability () id:Response_MatrixEditor392_OnCheckEditability
+{
+  #keys: '[415754.0.469021886]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMatrixEditor_OnCheckEditability'
+  QuillAction
+  {
+    Body:
+    [*
+      cond := focusedattribute = "TotalQuantityOfMaterialRacks";
+      
+      editinfo.CanEdit( cond );
+      editinfo.UserHint( ifexpr( cond, "", "涓嶈兘淇敼" ) );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def
new file mode 100644
index 0000000..4177425
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor392
+Response OnUpdateValue (
+  DL_EngineRackCell cell,
+  Real value
+) id:Response_MatrixEditor392_OnUpdateValue
+{
+  #keys: '[415754.0.469021864]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
+  QuillAction
+  {
+    Body:
+    [*
+      cell.SetTheTotalQuantity( value );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick\043844.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick\043844.def"
new file mode 100644
index 0000000..d495159
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick\043844.def"
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: pHeader/bExport_715
+Response OnClick () id:Response_pHeader_bExport_OnClick_844
+{
+  #keys: '[415754.0.469011957]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      binaryValue := DL_EngineRackCell::Export( MacroPlan );
+      
+      Application.Download( "澶ц繛鍙戝姩鏈烘枡鏋舵姤琛�.xlsx", binaryValue.AsBinaryData() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick\043593.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick\043593.def"
new file mode 100644
index 0000000..577891a
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick\043593.def"
@@ -0,0 +1,45 @@
+Quintiq file version 2.0
+#parent: pHeader/bImport_549
+Response OnClick () id:Response_pHeader_bImport_OnClick_593
+{
+  #keys: '[415754.0.469011897]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      try {
+        uploadJsonString := Application.GetFile();
+        if ( uploadJsonString <> "" ) {
+          uploadJson := JSON::Parse( uploadJsonString );
+          Archive::VerifyTheFileName( uploadJson );
+                
+          fileName := uploadJson.Get( "name" ).GetString();
+          base64String := uploadJson.Get( "data" ).GetString();
+              
+          webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
+          
+          generalExcelImportAndExportDataSource := GeneralExcelImportAndExportDataSource::Upload( RecycleBin, webFileBinaryData, fileName );
+          generalExcelImportAndExportDataSource.ReadStructure();
+          
+          selection := select( generalExcelImportAndExportDataSource, GeneralExcelImportAndExportDataTable, tempGEIAEDT, tempGEIAEDT.Name() = "Sheet1" );
+          
+          DL_EngineRackCell::Import( MacroPlan, selection );
+          
+          // 鍚庣画鍒犻櫎
+          generalExcelImportAndExportDataSource.Delete();
+          
+          WebMessageBox::Success( Translations::A_VWED_Success() );
+        }
+      } onerror {
+        WebMessageBox::Error( e.GeneralInformation() );
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/CCEngineRackReport.vw b/_Main/UI/MacroPlannerWebApp/Views/CCEngineRackReport.vw
index 30d67af..2861c46 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/CCEngineRackReport.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/CCEngineRackReport.vw
@@ -30,7 +30,7 @@
           FormCC_EngineRackReport_MatrixEditor531
           {
             gridColor: '#c4c4c4'
-            totalHeaderWidth: 500
+            totalHeaderWidth: 214
             attributeHeaderWidthRatio: 0.6
             nameHeaderWidthRatio: 0.4
             columnWidth: 100
diff --git a/_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw b/_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw
index 12f5037..0866ece 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw
@@ -27,6 +27,163 @@
           {
             sizeRatio: 1
           }
+          FormDL_EngineRackReport_MatrixEditor392
+          {
+            gridColor: '#c4c4c4'
+            totalHeaderWidth: 222
+            attributeHeaderWidthRatio: 0.6
+            nameHeaderWidthRatio: 0.4
+            columnWidth: 100
+            horizontalGrid: true
+            verticalGrid: true
+            backendState
+            {
+              componentId: 'QMacroPlanner::FormDL_EngineRackReport.MatrixEditor392'
+              state
+              {
+                cells
+                {
+                  attributes
+                  {
+                    attribute_TotalQuantityOfMaterialRacks
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 0
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'TotalQuantityOfMaterialRacks'
+                    }
+                    attribute_NumberOfEmptyShelves
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 1
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'NumberOfEmptyShelves'
+                    }
+                    attribute_CCStorageFeesForRentedWarehouses
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 2
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'CCStorageFeesForRentedWarehouses'
+                    }
+                    attribute_CCOutboundExpensesForRentedWarehouses
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 3
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'CCOutboundExpensesForRentedWarehouses'
+                    }
+                    attribute_CCRentalWarehouseStorageFees
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 4
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'CCRentalWarehouseStorageFees'
+                    }
+                    attribute_CCLineHaulCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 5
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'CCLineHaulCost'
+                    }
+                    attribute_CCShortDistanceTransportationCosts
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 6
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'CCShortDistanceTransportationCosts'
+                    }
+                    attribute_DLStorageFeesForRentedWarehouses
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 7
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'DLStorageFeesForRentedWarehouses'
+                    }
+                    attribute_DLOutboundExpensesForRentedWarehouses
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 8
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'DLOutboundExpensesForRentedWarehouses'
+                    }
+                    attribute_DLExternalRentalWarehouseTransportationCosts
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 9
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'DLExternalRentalWarehouseTransportationCosts'
+                    }
+                    attribute_DLRentalWarehouseStorageFees
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 10
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'DLRentalWarehouseStorageFees'
+                    }
+                    attribute_CleaningCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 11
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'CleaningCost'
+                    }
+                    attribute_EstimatedTotalCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 12
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'EstimatedTotalCost'
+                    }
+                    attribute_Coefficient
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 13
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'Coefficient'
+                    }
+                    attribute_TotalCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 14
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'TotalCost'
+                    }
+                  }
+                }
+                columns
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'StartDate'"
+                  }
+                }
+                rows
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'Name'"
+                  }
+                }
+              }
+            }
+          }
         }
       }
       form_FormGeneralSettings

--
Gitblit v1.9.3