From ee8ce391f8ee400130b49645a7717b62a7bf73cf Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期一, 11 十一月 2024 12:43:38 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev

---
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsCoefficientUpdate.qbl                                       |    8 
 _Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter_OfflinePlan.qbl                          |   48 +
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl   |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentOtherCostUpdate.qbl                                  |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCLongTransCostUpdate.qbl                                  |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Method_CalcEstimateTotalCost.qbl                                       |    9 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateTransferCost.qbl                                 |    8 
 _Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl                                                           |    2 
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl                                               |   71 +
 _Main/BL/Type_CCEngineLogisticsCostCell/Method_CalcEstimateTotalCost.qbl                                        |    7 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentInCostUpdate.qbl                                        |    8 
 _Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl                                            |   36 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateUnpackingCost#0.qbl                              |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentStorCostUpdate.qbl                                   |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCoefficientUpdate.qbl                                      |    8 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateBufferPaperCost.qbl                              |    8 
 _Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp                                                             |  134 ++++
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateCoefficient.qbl                                  |    8 
 _Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_Import.qbl                                            |  107 +++
 _Main/BL/Type_FinancialProductionRow/Method_Initialize#110.qbl                                                  |    2 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdatePackingCharges.qbl                               |    8 
 _Main/BL/Type_MachineLogisticsCostReportCell/Method_SetCellValue.qbl                                            |   34 +
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsEstimateTotalCostUpdate.qbl                                |    8 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateTotalCost.qbl                                    |    8 
 _Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl                                                 |    4 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl                   |    8 
 _Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl                                                  |   17 
 _Main/BL/Type_MachineLogisticsCostReportColumn/Attribute_DisplayName.qbl                                        |    8 
 _Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl                                                     |    2 
 _Main/BL/Type_FinancialSalesReport/Method_GenerateColumn.qbl                                                    |    7 
 _Main/BL/Type_OfflinePlanArchiveVersion/Method_GetRow.qbl                                                       |   12 
 _Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_pHeader.def                      |   12 
 _Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl                                                 |    4 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateWoodenCrateCost.qbl                              |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentStorCostUpdate.qbl                                   |    8 
 _Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl                                              |  124 ++-
 _Main/BL/Type_FinancialProductionReport/Method_GenerateColumn.qbl                                               |    7 
 _Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp                                                        |  140 ++++
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentStorCostUpdate.qbl                                      |    8 
 _Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl                                                     |    5 
 _Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp                                                             |   68 ++
 _Main/BL/Type_MachineLogisticsCostReportColumn/Function_CalcDisplayName.qbl                                     |   11 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsAllCostUpdate.qbl                                          |    8 
 _Main/BL/Type_InterfaceDataset/StaticMethod_PushOfflinePlanData.qbl                                             |   51 +
 _Main/BL/Type_MachineLogisticsCostReportRow/Attribute_Index.qbl                                                 |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_pHeader_bExport_OnClick.def       |    6 
 _Main/UI/MacroPlannerWebApp/Views/MachineLogisticsCostReport.vw                                                 |  141 ++++
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentOutOfCostUpdate.qbl                                  |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsAllCostUpdate.qbl                                           |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_MatrixEditor912_OnUpdateValue.def |   19 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl          |    8 
 _Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl                                                  |   19 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateQuantityOfWoodenCrates.qbl                       |    8 
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl                                           |    8 
 _Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl                                                       |   16 
 _Main/BL/Type_MachineLogisticsCostReportColumn/DefaultValue_DisplayName.qbl                                     |    6 
 _Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl                                               |    4 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_EstimatedTotalCost#455.qbl                               |    0 
 _Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_MatrixEditor912.def              |    4 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsWerkToDLRentTransCostUpdate.qbl                            |    8 
 _Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl                                                 |    4 
 _Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl                                             |    4 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl               |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsEstimateTotalCostUpdate.qbl                                 |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentOutOfCostUpdate.qbl                                  |    8 
 _Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl                                               |    8 
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpateEstimatedTotalCost.qbl                            |    8 
 /dev/null                                                                                                       |    7 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentInCostUpdate.qbl                                     |    8 
 _Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_Export.qbl                                            |  134 ++++
 _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_PackingCharges#420.qbl                                   |    0 
 _Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl                                                   |   13 
 _Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl                                        |   83 ++
 _Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_pHeader_bImport_OnClick#298.def   |   45 +
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentOutOfCostUpdate.qbl                                     |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsWerkToRentTransCostUpdate.qbl                               |    8 
 _Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl                                                    |    4 
 _Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl                                                      |    4 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentInCostUpdate.qbl                                     |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCShorTransCostUpdate.qbl                                  |    8 
 80 files changed, 1,524 insertions(+), 199 deletions(-)

diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsAllCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsAllCostUpdate.qbl
new file mode 100644
index 0000000..13ca5ae
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsAllCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsAllCostUpdate
+{
+  #keys: '3[415136.0.1293740107][415136.0.1293740106][415136.0.1293740108]'
+  Description: '鎬昏垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsCoefficientUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsCoefficientUpdate.qbl
new file mode 100644
index 0000000..30c095c
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsCoefficientUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCoefficientUpdate
+{
+  #keys: '3[415136.0.1293740114][415136.0.1293740113][415136.0.1293740115]'
+  Description: '绯绘暟鏄惁琚鍏ユ洿鏂�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsEstimateTotalCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsEstimateTotalCostUpdate.qbl
new file mode 100644
index 0000000..139e9d6
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsEstimateTotalCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsEstimateTotalCostUpdate
+{
+  #keys: '3[415136.0.1293740121][415136.0.1293740120][415136.0.1293740122]'
+  Description: '棰勮鎬昏垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentInCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentInCostUpdate.qbl
new file mode 100644
index 0000000..3692cdc
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentInCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsRentInCostUpdate
+{
+  #keys: '3[415136.0.1293740128][415136.0.1293740127][415136.0.1293740129]'
+  Description: '澶栫搴撳叆搴撹垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentOutOfCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentOutOfCostUpdate.qbl
new file mode 100644
index 0000000..33e2ee4
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentOutOfCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsRentOutOfCostUpdate
+{
+  #keys: '3[415136.0.1293740140][415136.0.1293740139][415136.0.1293740141]'
+  Description: '澶栫搴撳嚭搴撹垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentStorCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentStorCostUpdate.qbl
new file mode 100644
index 0000000..8b164a3
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsRentStorCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsRentStorCostUpdate
+{
+  #keys: '3[415136.0.1293740147][415136.0.1293740146][415136.0.1293740148]'
+  Description: '澶栫搴撲粨鍌ㄨ垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsUpdate.qbl
deleted file mode 100644
index 5082873..0000000
--- a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsUpdate.qbl
+++ /dev/null
@@ -1,8 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute IsUpdate
-{
-  #keys: '3[415136.0.1191950107][415136.0.1191950106][415136.0.1191950108]'
-  Description: '鏄惁琚鍏ユ洿鏂�'
-  ValueType: Boolean
-}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsWerkToRentTransCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsWerkToRentTransCostUpdate.qbl
new file mode 100644
index 0000000..c331e44
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_IsWerkToRentTransCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsWerkToRentTransCostUpdate
+{
+  #keys: '3[415136.0.1293740154][415136.0.1293740153][415136.0.1293740155]'
+  Description: '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤鏄惁琚鍏ユ洿鏂�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcEstimateTotalCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Method_CalcEstimateTotalCost.qbl
similarity index 61%
rename from _Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcEstimateTotalCost.qbl
rename to _Main/BL/Type_CCEngineLogisticsCostCell/Method_CalcEstimateTotalCost.qbl
index f4cd10b..d8a256e 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcEstimateTotalCost.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Method_CalcEstimateTotalCost.qbl
@@ -1,13 +1,12 @@
 Quintiq file version 2.0
 #parent: #root
-Function CalcEstimateTotalCost
+Method CalcEstimateTotalCost () as Real
 {
   TextBody:
   [*
-    // 鐢勫叞楦� Sep-24-2024 (created)
-    
+    // 鐢勫叞楦� Nov-11-2024 (created)
     value := this.RentInCost() + this.RentOutOfCost() + this.WerkToRentTransCost() + this.RentStorCost();
     
-    this.EstimateTotalCost( value );
+    return value;
   *]
 }
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsAllCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsAllCostUpdate.qbl
new file mode 100644
index 0000000..87960df
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsAllCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsAllCostUpdate
+{
+  #keys: '3[415136.0.1293750020][415136.0.1293750019][415136.0.1293750021]'
+  Description: '鎬昏垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCLongTransCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCLongTransCostUpdate.qbl
new file mode 100644
index 0000000..9b793a1
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCLongTransCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCLongTransCostUpdate
+{
+  #keys: '3[415136.0.1293740011][415136.0.1293740010][415136.0.1293740012]'
+  Description: '闀挎槬闀块�旇繍杈撹垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentInCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentInCostUpdate.qbl
new file mode 100644
index 0000000..cfe32cd
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentInCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCRentInCostUpdate
+{
+  #keys: '3[415136.0.1293740018][415136.0.1293740017][415136.0.1293740019]'
+  Description: '闀挎槬澶栫搴撳叆搴撹垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentOutOfCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentOutOfCostUpdate.qbl
new file mode 100644
index 0000000..c56fd29
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentOutOfCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCRentOutOfCostUpdate
+{
+  #keys: '3[415136.0.1293740025][415136.0.1293740024][415136.0.1293740026]'
+  Description: '闀挎槬澶栫搴撳嚭搴撹垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentStorCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentStorCostUpdate.qbl
new file mode 100644
index 0000000..3c93723
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCRentStorCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCRentStorCostUpdate
+{
+  #keys: '3[415136.0.1293740032][415136.0.1293740031][415136.0.1293740033]'
+  Description: '闀挎槬澶栫搴撲粨鍌ㄨ垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCShorTransCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCShorTransCostUpdate.qbl
new file mode 100644
index 0000000..725d067
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCCShorTransCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCShorTransCostUpdate
+{
+  #keys: '3[415136.0.1293740039][415136.0.1293740038][415136.0.1293740040]'
+  Description: '闀挎槬鐭�旇繍杈撹垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCoefficientUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCoefficientUpdate.qbl
new file mode 100644
index 0000000..5601da9
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsCoefficientUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCoefficientUpdate
+{
+  #keys: '3[415136.0.1293740046][415136.0.1293740045][415136.0.1293740047]'
+  Description: '绯绘暟鏄惁琚鍏ユ洿鏂�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentInCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentInCostUpdate.qbl
new file mode 100644
index 0000000..b58325b
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentInCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLRentInCostUpdate
+{
+  #keys: '3[415136.0.1293740053][415136.0.1293740052][415136.0.1293740054]'
+  Description: '澶ц繛澶栫搴撳叆搴撹垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentOtherCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentOtherCostUpdate.qbl
new file mode 100644
index 0000000..5db9ba4
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentOtherCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLRentOtherCostUpdate
+{
+  #keys: '3[415136.0.1293740060][415136.0.1293740059][415136.0.1293740061]'
+  Description: '澶ц繛澶栫搴撳叾浠栬垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentOutOfCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentOutOfCostUpdate.qbl
new file mode 100644
index 0000000..d095926
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentOutOfCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLRentOutOfCostUpdate
+{
+  #keys: '3[415136.0.1293740067][415136.0.1293740066][415136.0.1293740068]'
+  Description: '澶ц繛澶栫搴撳嚭搴撹垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentStorCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentStorCostUpdate.qbl
new file mode 100644
index 0000000..2dcceb3
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsDLRentStorCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLRentStorCostUpdate
+{
+  #keys: '3[415136.0.1293740074][415136.0.1293740073][415136.0.1293740075]'
+  Description: '澶ц繛澶栫搴撲粨鍌ㄨ垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsEstimateTotalCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsEstimateTotalCostUpdate.qbl
new file mode 100644
index 0000000..74fcef0
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsEstimateTotalCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsEstimateTotalCostUpdate
+{
+  #keys: '3[415136.0.1293740081][415136.0.1293740080][415136.0.1293740082]'
+  Description: '棰勮鎬昏垂鐢ㄦ槸鍚﹁瀵煎叆鏇存柊'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsUpdate.qbl
deleted file mode 100644
index e986266..0000000
--- a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsUpdate.qbl
+++ /dev/null
@@ -1,8 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute IsUpdate
-{
-  #keys: '3[415136.0.1191950111][415136.0.1191950110][415136.0.1191950112]'
-  Description: '鏄惁琚鍏ユ洿鏂�'
-  ValueType: Boolean
-}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsWerkToDLRentTransCostUpdate.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsWerkToDLRentTransCostUpdate.qbl
new file mode 100644
index 0000000..878d341
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Attribute_IsWerkToDLRentTransCostUpdate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsWerkToDLRentTransCostUpdate
+{
+  #keys: '3[415136.0.1293740088][415136.0.1293740087][415136.0.1293740089]'
+  Description: '鍘傚唴鍒板ぇ杩炲绉熷簱杩愯緭璐圭敤'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcEstimateTotalCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Method_CalcEstimateTotalCost.qbl
similarity index 74%
rename from _Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcEstimateTotalCost.qbl
rename to _Main/BL/Type_CCEngineLogisticsCostCell0/Method_CalcEstimateTotalCost.qbl
index 1e59ade..d4c77b0 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcEstimateTotalCost.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell0/Method_CalcEstimateTotalCost.qbl
@@ -1,14 +1,13 @@
 Quintiq file version 2.0
 #parent: #root
-Function CalcEstimateTotalCost
+Method CalcEstimateTotalCost () as Real
 {
   TextBody:
   [*
-    // 鐢勫叞楦� Aug-12-2024 (created) 
-    
+    // 鐢勫叞楦� Nov-11-2024 (created)
     value := this.CCRentInCost() + this.CCRentOutOfCost() + this.CCLongTransCost() + this.CCShorTransCost() + this.CCRentStorCost()
-    + this.DLRentInCost() + this.DLRentOutOfCost() + this.WerkToDLRentTransCost() + this.DLRentStorCost() + this.DLRentOtherCost()
+    + this.DLRentInCost() + this.DLRentOutOfCost() + this.WerkToDLRentTransCost() + this.DLRentStorCost() + this.DLRentOtherCost();
     
-    this.EstimateTotalCost( value );
+    return value;
   *]
 }
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl
index 62befe8..6d71205 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl
@@ -54,18 +54,25 @@
           sumcell.WerkToRentTransCost( cell.WerkToRentTransCost() + sumcell.WerkToRentTransCost() );
           sumcell.RentStorCost( cell.RentStorCost() + sumcell.RentStorCost() );
         }
+        yearcell.EstimateTotalCost( yearcell.CalcEstimateTotalCost() );
         yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() );
       }
     }
     Transaction::Transaction().Propagate( attribute( CCEngineLogisticsCostCell, EstimateTotalCost ) );
     traverse( yearcolumn, Cell, cell ){
+      cell.EstimateTotalCost( cell.CalcEstimateTotalCost() );
       cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
     }
     traverse( sumrow, Cell, cell ){
+      cell.EstimateTotalCost( cell.CalcEstimateTotalCost() );
       cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
-      if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){
-        cell.IsUpdate( true );
-      }
+      cell.IsAllCostUpdate( exists( cell.Column(), Cell, acell, acell.IsAllCostUpdate() ) );
+      cell.IsCoefficientUpdate( exists( cell.Column(), Cell, acell, acell.IsCoefficientUpdate() ) );
+      cell.IsEstimateTotalCostUpdate( exists( cell.Column(), Cell, acell, acell.IsEstimateTotalCostUpdate() ) );
+      cell.IsRentInCostUpdate( exists( cell.Column(), Cell, acell, acell.IsRentInCostUpdate() ) );
+      cell.IsRentOutOfCostUpdate( exists( cell.Column(), Cell, acell, acell.IsRentOutOfCostUpdate() ) );
+      cell.IsRentStorCostUpdate( exists( cell.Column(), Cell, acell, acell.IsRentStorCostUpdate() ) );
+      cell.IsWerkToRentTransCostUpdate( exists( cell.Column(), Cell, acell, acell.IsWerkToRentTransCostUpdate() ) );
     }
   *]
 }
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
index 85f17fb..08d33da 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
@@ -42,33 +42,54 @@
           cell                := selectobject( ccrow, Cell, cell, cell.Column() = column );
           traverse( sameproductcells, Elements.GeneralExcelImportAndExportDataRow, samerow ){
             attricell         := selectobject( samerow, GeneralExcelImportAndExportDataCell, attricell, attricell.GeneralExcelImportAndExportDataColumn() = attricolumn );
-            if( attricell.Value() = '鎬昏垂鐢�' ){
-              valuecell       := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn );
-              if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){
-                cell.AllCost( [Real]valuecell.Value() );
-                cell.IsUpdate( true );
-              }
-            }
-    //        if( not ( attricell.Value() = '棰勮鎬昏垂鐢�' or attricell.Value() = '鎬昏垂鐢�' ) ){
+    //        if( attricell.Value() = '鎬昏垂鐢�' ){
     //          valuecell       := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn );
-    //          if( attricell.Value() = '澶栫搴撳叆搴撹垂鐢�' ){
-    //            cell.RentInCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '澶栫搴撳嚭搴撹垂鐢�' ){
-    //            cell.RentOutOfCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤' ){
-    //            cell.WerkToRentTransCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '澶栫搴撲粨鍌ㄨ垂鐢�' ){
-    //            cell.RentStorCost( [Number]valuecell.Value() );
+    //          if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){
+    //            cell.AllCost( [Real]valuecell.Value() );
+    //            cell.IsUpdate( true );
     //          }
-    //          else if( attricell.Value() = '棰勮鎬昏垂鐢�' ){
-    //            cell.EstimatedTotalCost( [Number]valuecell.Value() );
-    //          }
-    //          else if( attricell.Value() = '绯绘暟' ){
-    //            cell.CoefficientValue( valuecell.Value() );
-    //          }
-    //          else if( attricell.Value() = '鎬昏垂鐢�' ){
-    //            cell.TotalCost( [Number]valuecell.Value() );
-    //          }
+    //        }
+    //        if( not ( attricell.Value() = '棰勮鎬昏垂鐢�' or attricell.Value() = '鎬昏垂鐢�' ) ){
+              valuecell       := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn );
+              if( attricell.Value() = '澶栫搴撳叆搴撹垂鐢�' ){
+                if( valuecell.Value() <> cell.RentInCost().Format( 'N(Dec)' ) ){
+                  cell.RentInCost( [Real]valuecell.Value() );
+                  cell.IsRentInCostUpdate( true );
+                }
+              }else if( attricell.Value() = '澶栫搴撳嚭搴撹垂鐢�' ){
+                if( valuecell.Value() <> cell.RentOutOfCost().Format( 'N(Dec)' ) ){
+                  cell.RentOutOfCost( [Real]valuecell.Value() );
+                  cell.IsRentOutOfCostUpdate( true );
+                }
+              }else if( attricell.Value() = '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤' ){
+                if( valuecell.Value() <> cell.WerkToRentTransCost().Format( 'N(Dec)' ) ){
+                  cell.WerkToRentTransCost( [Real]valuecell.Value() );
+                  cell.IsWerkToRentTransCostUpdate( true );
+                }
+              }else if( attricell.Value() = '澶栫搴撲粨鍌ㄨ垂鐢�' ){
+                if( valuecell.Value() <> cell.RentStorCost().Format( 'N(Dec)' ) ){
+                  cell.RentStorCost( [Real]valuecell.Value() );
+                  cell.IsRentStorCostUpdate( true );
+                }
+              }
+              else if( attricell.Value() = '棰勮鎬昏垂鐢�' ){
+                if( valuecell.Value() <> cell.EstimateTotalCost().Format( 'N(Dec)' ) ){
+                  cell.EstimateTotalCost( [Real]valuecell.Value() );
+                  cell.IsEstimateTotalCostUpdate( true );
+                }
+              }
+              else if( attricell.Value() = '绯绘暟' ){
+                if( valuecell.Value() <> cell.CoefficientValue() ){
+                  cell.CoefficientValue( valuecell.Value() );
+                  cell.IsCoefficientUpdate( true );
+                }
+              }
+              else if( attricell.Value() = '鎬昏垂鐢�' ){
+                if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){
+                  cell.AllCost( [Real]valuecell.Value() );
+                  cell.IsAllCostUpdate( true );
+                }
+              }
     //        }
           }
         }
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
index 23417e6..92fdf14 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -30,7 +30,7 @@
     //澶栫搴撳叆搴撹垂鐢細鍙栬嚜璐㈠姟浜ч噺鎶ヨ〃鐨勪骇閲忥紝鍦ㄤ骇鍝佽〃鏍规嵁鍙戝姩鏈哄彿鎵惧埌瀵瑰簲鐨凣eneration 鍜屾í绾靛埗锛屽湪鍙戝姩鏈烘垚鏈弬鏁拌〃閲屾壘鍒板搴旂殑鍖呰瀹归噺鍜屽叆搴撳崟浠凤紝鐢ㄥ叕寮忚绠楋紝鏈堝害杩涜姹囨��
     traverse( owner, FinancialProductionSource, source, not source.IsImport() ){//璐㈠姟浜ч噺鎶ヨ〃闈炲鍏�
       traverse( source, FinancialProductionReport, report, not report.IsShow() ){//璐㈠姟浜ч噺鎶ヨ〃涓嶆樉绀�
-        traverse( report, FinancialProductionRow, row, row.Unit() = ccunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' and not cell.FinancialProductionColumn().IsDay() ) ){//璐㈠姟浜ч噺鎶ヨ〃閲岀殑闀挎槬浜ч噺, 涓嶄负0
+        traverse( report, FinancialProductionRow, row, row.Unit() = ccunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0') ){//璐㈠姟浜ч噺鎶ヨ〃閲岀殑闀挎槬浜ч噺, 涓嶄负0
           product             := row.Product_MP();
           productparents      := product.GetAllParent();
           if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
@@ -41,7 +41,7 @@
             if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
               ccrow           := table.GetRow( row.Name() );
               products.Add( product );
-              traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and not cell.FinancialProductionColumn().IsDay() ){
+              traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){
                 cellcolumn    := cell.FinancialProductionColumn();
                 enginecost    := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() );
                 if( not isnull( enginecost ) ){
@@ -60,7 +60,7 @@
     //澶栫搴撳嚭搴撹垂鐢細鍑哄簱閲忕瓑浜庨暱鏄ラ攢閲忥紝鍙栬嚜璐㈠姟閿�閲忔姤琛ㄧ殑閿�閲忥紝鍦ㄤ骇鍝佽〃鏍规嵁鍙戝姩鏈哄彿鎵惧埌瀵瑰簲鐨凣eneration 鍜屾í绾靛埗锛屽湪鍙戝姩鏈烘垚鏈弬鏁拌〃閲屾壘鍒板搴旂殑鍖呰瀹归噺鍜屽嚭搴撳崟浠凤紝鐢ㄥ叕寮忚绠楋紝鏈堝害杩涜姹囨��
     traverse( owner, FinancialSalesSource, source, not source.IsImport() ){//璐㈠姟閿�閲忔姤琛ㄩ潪瀵煎叆
       traverse( source, FinancialSalesReport, report, not report.IsShow() ){//璐㈠姟閿�閲忔姤琛ㄤ笉鏄剧ず
-        traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' and not cell.FinancialSalesColumn().IsDay() ) ){//璐㈠姟閿�閲忔姤琛ㄩ噷鐨勯暱鏄ヤ骇閲�, 涓嶄负0
+        traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' ) ){//璐㈠姟閿�閲忔姤琛ㄩ噷鐨勯暱鏄ヤ骇閲�, 涓嶄负0
           product             := row.Product_MP();
           productparents      := product.GetAllParent();
           if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
@@ -71,7 +71,7 @@
             if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
               ccrow           := table.GetRow( row.Name() );
               products.Add( product );
-              traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and not cell.FinancialSalesColumn().IsDay() ){
+              traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){
                 cellcolumn    := cell.FinancialSalesColumn();
                 enginecost    := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() );
                 if( not isnull( enginecost ) ){
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
index 108b822..d5d4fcc 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
@@ -79,18 +79,31 @@
           sumcell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + sumcell.WerkToDLRentTransCost() );
           sumcell.DLRentStorCost( cell.DLRentStorCost() + sumcell.DLRentStorCost() );
         }
+        yearcell.EstimateTotalCost( yearcell.CalcEstimateTotalCost() );
         yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() );
       }
     }
     Transaction::Transaction().Propagate( attribute( DLEngineLogisticsCostCell, EstimateTotalCost ) );
     traverse( yearcolumn, Cell, cell ){
+      cell.EstimateTotalCost( cell.CalcEstimateTotalCost() );
       cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
     }
     traverse( sumrow, Cell, cell ){
+      cell.EstimateTotalCost( cell.CalcEstimateTotalCost() );
       cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
-      if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){
-        cell.IsUpdate( true );
-      }
+      cell.IsAllCostUpdate( exists( cell.Column(), Cell, acell, acell.IsAllCostUpdate() ) );
+      cell.IsCCLongTransCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCLongTransCostUpdate() ) );
+      cell.IsCCRentInCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCRentInCostUpdate() ) );
+      cell.IsCCRentOutOfCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCRentOutOfCostUpdate() ) );
+      cell.IsCCRentStorCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCRentStorCostUpdate() ) );
+      cell.IsCCShorTransCostUpdate( exists( cell.Column(), Cell, acell, acell.IsCCShorTransCostUpdate() ) );
+      cell.IsCoefficientUpdate( exists( cell.Column(), Cell, acell, acell.IsCoefficientUpdate() ) );
+      cell.IsDLRentInCostUpdate( exists( cell.Column(), Cell, acell, acell.IsDLRentInCostUpdate() ) );
+      cell.IsDLRentOtherCostUpdate( exists( cell.Column(), Cell, acell, acell.IsDLRentOtherCostUpdate() ) );
+      cell.IsDLRentOutOfCostUpdate( exists( cell.Column(), Cell, acell, acell.IsDLRentOutOfCostUpdate() ) );
+      cell.IsDLRentStorCostUpdate( exists( cell.Column(), Cell, acell, acell.IsDLRentStorCostUpdate() ) );
+      cell.IsEstimateTotalCostUpdate( exists( cell.Column(), Cell, acell, acell.IsEstimateTotalCostUpdate() ) );
+      cell.IsWerkToDLRentTransCostUpdate( exists( cell.Column(), Cell, acell, acell.IsWerkToDLRentTransCostUpdate() ) );
     }
     info( '-------------------------g------------end---------------------------------' );
   *]
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
index ce05c55..7ef4c7e 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
@@ -25,59 +25,97 @@
     attricolumn               := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 1 );
     //鐢熸垚鏂拌〃鐨勬棩鏈熷垪
     table                     := DLEngineLogisticsCostReport::InitiateSearch( owner );
-    traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataRow, excelrow ){
-      productcell             := selectobject( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn() = productcolumn );
+    sameproductvalues         := selectuniquevalues( productcolumn, GeneralExcelImportAndExportDataCell, productcell, productcell.Value() );
+    traverse( sameproductvalues, Elements, productvalue ){
       //澶勭悊鏈鍚屾鐨勪骇鍝�
-      if( not exists( products, Elements, product, product.ID() = productcell.Value() ) ){
-        product               := selectobject( owner, Product_MP, product, product.ID() = productcell.Value() );
+      if( not exists( products, Elements, product, product.ID() = productvalue ) ){
+        product               := selectobject( owner, Product_MP, product, product.ID() = productvalue );
         products.Add( product );
-        ccrow                 := table.GetRow( productcell.Value() );
+        ccrow                 := table.GetRow( productvalue );
         //鑾峰彇鐩稿悓鐨勪骇鍝�
-        sameproductcells      := selectset( productcolumn, GeneralExcelImportAndExportDataCell, excelcell, excelcell.Value() = productcell.Value() );
+        sameproductcells      := selectset( productcolumn, GeneralExcelImportAndExportDataCell, excelcell, excelcell.Value() = productvalue );
         //浠庢棩鏈熷垪寮�濮嬪鐞�
-        traverse( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 1 ){
-          excelcolumn         := excelcell.GeneralExcelImportAndExportDataColumn();
+        traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, excelcolumn, excelcolumn.ColumnIndex() > 1 ){
           column              := selectobject( table, Column, column, column.Name() = excelcolumn.Name() );
           cell                := selectobject( ccrow, Cell, cell, cell.Column() = column );
           traverse( sameproductcells, Elements.GeneralExcelImportAndExportDataRow, samerow ){
             attricell         := selectobject( samerow, GeneralExcelImportAndExportDataCell, attricell, attricell.GeneralExcelImportAndExportDataColumn() = attricolumn );
-            if( attricell.Value() = '鎬昏垂鐢�' ){
-              valuecell       := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn );
-              if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){
-                cell.AllCost( [Real]valuecell.Value() );
-                cell.IsUpdate( true );
-              }
-            }
-    //        if( not ( attricell.Value() = '棰勮鎬昏垂鐢�' or attricell.Value() = '鎬昏垂鐢�' ) ){
+    //        if( attricell.Value() = '鎬昏垂鐢�' ){
     //          valuecell       := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn );
-    //          if( attricell.Value() = '闀挎槬澶栫搴撳叆搴撹垂鐢�' ){
-    //            cell.CCRentInCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '闀挎槬澶栫搴撳嚭搴撹垂鐢�' ){
-    //            cell.CCRentOutOfCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '闀挎槬闀块�旇繍杈撹垂鐢�' ){
-    //            cell.CCLongTransCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '闀挎槬鐭�旇繍杈撹垂鐢�' ){
-    //            cell.CCShorTransCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '闀挎槬澶栫搴撲粨鍌ㄨ垂鐢�' ){
-    //            cell.CCRentStorCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '澶ц繛澶栫搴撳叆搴撹垂鐢�' ){
-    //            cell.DLRentInCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '澶ц繛澶栫搴撳嚭搴撹垂鐢�' ){
-    //            cell.DLRentOutOfCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤' ){
-    //            cell.WerkToDLRentTransCost( [Number]valuecell.Value() );
-    //          }else if( attricell.Value() = '澶ц繛澶栫搴撲粨鍌ㄨ垂鐢�' ){
-    //            cell.DLRentStorCost( [Number]valuecell.Value() );
+    //          info( '------------------', valuecell.Value(), cell.AllCost().Format( 'N(Dec)' ),valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ));
+    //          if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){
+    //            cell.AllCost( [Real]valuecell.Value() );
+    //            cell.IsUpdate( true );
     //          }
-    ////          else if( attricell.Value() = '棰勮鎬昏垂鐢�' ){
-    ////            cell.EstimatedTotalCost( [Number]valuecell.Value() );
-    ////          }
-    //          else if( attricell.Value() = '绯绘暟' ){
-    //            cell.CoefficientValue( valuecell.Value() );
-    //          }
-    ////          else if( attricell.Value() = '鎬昏垂鐢�' ){
-    ////            cell.TotalCost( [Number]valuecell.Value() );
-    ////          }
+    //        }
+    //        if( not ( attricell.Value() = '棰勮鎬昏垂鐢�' or attricell.Value() = '鎬昏垂鐢�' ) ){
+              valuecell       := selectobject( samerow, GeneralExcelImportAndExportDataCell, valuecell, valuecell.GeneralExcelImportAndExportDataColumn() = excelcolumn );
+              if( attricell.Value() = '闀挎槬澶栫搴撳叆搴撹垂鐢�' ){
+                if( valuecell.Value() <> cell.CCRentInCost().Format( 'N(Dec)' ) ){
+                  cell.CCRentInCost( [Real]valuecell.Value() );
+                  cell.IsCCRentInCostUpdate( true );
+                }
+              }else if( attricell.Value() = '闀挎槬澶栫搴撳嚭搴撹垂鐢�' ){
+                if( valuecell.Value() <> cell.CCRentOutOfCost().Format( 'N(Dec)' ) ){
+                  cell.CCRentOutOfCost( [Real]valuecell.Value() );
+                  cell.IsCCRentOutOfCostUpdate( true );
+                }
+              }else if( attricell.Value() = '闀挎槬闀块�旇繍杈撹垂鐢�' ){
+                if( valuecell.Value() <> cell.CCLongTransCost().Format( 'N(Dec)' ) ){
+                  cell.CCLongTransCost( [Real]valuecell.Value() );
+                  cell.IsCCLongTransCostUpdate( true );
+                }
+              }else if( attricell.Value() = '闀挎槬鐭�旇繍杈撹垂鐢�' ){
+                if( valuecell.Value() <> cell.CCShorTransCost().Format( 'N(Dec)' ) ){
+                  cell.CCShorTransCost( [Real]valuecell.Value() );
+                  cell.IsCCShorTransCostUpdate( true );
+                }
+              }else if( attricell.Value() = '闀挎槬澶栫搴撲粨鍌ㄨ垂鐢�' ){
+                if( valuecell.Value() <> cell.CCRentStorCost().Format( 'N(Dec)' ) ){
+                  cell.CCRentStorCost( [Real]valuecell.Value() );
+                  cell.IsCCRentStorCostUpdate( true );
+                }
+              }else if( attricell.Value() = '澶ц繛澶栫搴撳叆搴撹垂鐢�' ){
+                if( valuecell.Value() <> cell.DLRentInCost().Format( 'N(Dec)' ) ){
+                  cell.DLRentInCost( [Real]valuecell.Value() );
+                  cell.IsDLRentInCostUpdate( true );
+                }
+              }else if( attricell.Value() = '澶ц繛澶栫搴撳嚭搴撹垂鐢�' ){
+                if( valuecell.Value() <> cell.DLRentOutOfCost().Format( 'N(Dec)' ) ){
+                  cell.DLRentOutOfCost( [Real]valuecell.Value() );
+                  cell.IsDLRentOutOfCostUpdate( true );
+                }
+              }else if( attricell.Value() = '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤' ){
+                if( valuecell.Value() <> cell.WerkToDLRentTransCost().Format( 'N(Dec)' ) ){
+                  cell.WerkToDLRentTransCost( [Real]valuecell.Value() );
+                  cell.IsWerkToDLRentTransCostUpdate( true );
+                }
+              }else if( attricell.Value() = '澶ц繛澶栫搴撲粨鍌ㄨ垂鐢�' ){
+                if( valuecell.Value() <> cell.DLRentStorCost().Format( 'N(Dec)' ) ){
+                  cell.DLRentStorCost( [Real]valuecell.Value() );
+                  cell.IsDLRentStorCostUpdate( true );
+                }
+              }else if( attricell.Value() = '澶ц繛澶栫搴撳叾浠栬垂鐢�' ){
+                if( valuecell.Value() <> cell.DLRentOtherCost().Format( 'N(Dec)' ) ){
+                  cell.DLRentOtherCost( [Real]valuecell.Value() );
+                  cell.IsDLRentOtherCostUpdate( true );
+                }
+              }else if( attricell.Value() = '棰勮鎬昏垂鐢�' ){
+                if( valuecell.Value() <> cell.EstimateTotalCost().Format( 'N(Dec)' ) ){
+                  cell.EstimateTotalCost( [Real]valuecell.Value() );
+                  cell.IsEstimateTotalCostUpdate( true );
+                }
+              }else if( attricell.Value() = '绯绘暟' ){
+                if( valuecell.Value() <> cell.CoefficientValue() ){
+                  cell.CoefficientValue( valuecell.Value() );
+                  cell.IsCoefficientUpdate( true );
+                }
+              }else if( attricell.Value() = '鎬昏垂鐢�' ){
+                if( valuecell.Value() <> cell.AllCost().Format( 'N(Dec)' ) ){
+                  cell.AllCost( [Real]valuecell.Value() );
+                  cell.IsAllCostUpdate( true );
+                }
+              }
     //        }
           }
         }
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
index 64f8ba1..14344a6 100644
--- a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
@@ -46,9 +46,6 @@
         // 瀹㈡埛搴撴枡鏋舵�绘暟閲�
         mrcc := select( macroPlan, MaterialRackCustomRow.MaterialRackCustomCell, tempMRCCell, tempMRCCell.MaterialRackCustomRow().Generation() = ccerr.Generation() and tempMRCCell.MaterialRackCustomRow().MLB_MQB() = ccerr.MLB_MQB() and tempMRCCell.MaterialRackColumn().Month() = ccerc.StartDate().Month() );
         
-        // 褰撳墠鏈堟湯鏈�鍚庝竴澶╂棩鏈�                
-        lastDayOfThisMonth := ccerc.StartDate().StartOfNextMonth() - 1; 
-        
         cell := ccerr.CC_EngineRackCell( relnew );
         
         // 鏂欐灦鎬绘暟閲�
@@ -56,7 +53,7 @@
                            tempMRTCell.MaterialRackTotalRow().Generation() = ccerr.Generation()        and
                            tempMRTCell.MaterialRackTotalRow().MLB_MQB()    = ccerr.MLB_MQB()           and
                            tempMRTCell.MaterialRackColumn().Month()        = ccerc.StartDate().Month() );
-        cell.TotalQuantityOfMaterialRacks( mrtcell.Quantity() );
+        cell.TotalQuantityOfMaterialRacks( guard( mrtcell.Quantity(), 0 ) );
         
         // 绌烘枡鏋舵暟閲忥細銆�350bar MQB鏂欐灦鎬绘暟閲� - 鎵�鏈�350bar MQB鎬诲簱瀛� / 鍖呰瀹归噺-瀹㈡埛搴撴枡鏋舵暟閲忋��* 闀挎槬澶栫搴撶┖鏂欐灦姣斾緥
         plannedInventory := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP,
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
index 1cf5d6b..32a186c 100644
--- a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
@@ -61,7 +61,7 @@
                            tempMRTCell.MaterialRackTotalRow().MLB_MQB()    = dlerr.MLB_MQB()           and
                            tempMRTCell.MaterialRackColumn().Month()        = dlerc.StartDate().Month() );
         if ( dlerr.Generation() = "350bar" and dlerr.MLB_MQB() = "MQB" ) {
-          cell.TotalQuantityOfMaterialRacks( mrtcell.Quantity() );
+          cell.TotalQuantityOfMaterialRacks( guard( mrtcell.Quantity(), 0 ) );
         }
        
         // 澶ц繛澶栫搴撶┖鏂欐灦鏁伴噺锛氥��350bar MQB鏂欐灦鎬绘暟閲� - 鎵�鏈�350bar MQB鎬诲簱瀛� / 鍖呰瀹归噺 - 瀹㈡埛搴撴枡鏋舵暟閲忋��* 澶ц繛澶栫搴撶┖鏂欐灦姣斾緥
diff --git a/_Main/BL/Type_FinancialProductionColumn/Attribute_IsDay.qbl b/_Main/BL/Type_FinancialProductionColumn/Attribute_IsDay.qbl
deleted file mode 100644
index 175d66f..0000000
--- a/_Main/BL/Type_FinancialProductionColumn/Attribute_IsDay.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute IsDay
-{
-  #keys: '3[415136.0.1144791862][415136.0.1144791861][415136.0.1144791863]'
-  ValueType: Boolean
-}
diff --git a/_Main/BL/Type_FinancialProductionReport/Method_GenerateColumn.qbl b/_Main/BL/Type_FinancialProductionReport/Method_GenerateColumn.qbl
index e74d045..f7f8483 100644
--- a/_Main/BL/Type_FinancialProductionReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_FinancialProductionReport/Method_GenerateColumn.qbl
@@ -11,13 +11,10 @@
     startofyear               := startofplanning.StartOfYear();
     startofnextyear           := startofplanning.StartOfNextYear();
     
-    for( start := startofyear; start < startofnextyear; start := start + Duration::Days( 1 ) ){
+    for( start := startofyear; start < startofnextyear; start := start.StartOfMonth() ){
       periodtime := start.Date();
       periodname := periodtime.Format( "M2/D2/Y" );
-      this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime, IsDay := true );
-      if( start = start.StartOfMonth() ){
-        this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime );
-      }
+      this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime );
     }
   *]
 }
diff --git a/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
index 683c9ad..c5dff64 100644
--- a/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
+++ b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
@@ -31,8 +31,8 @@
           yearcell            := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 );
           showrow.FinancialProductionCell( relinsert, yearcell );
         }
-        traverse( row, FinancialProductionCell, cell, not cell.FinancialProductionColumn().IsDay() ){
-          column              := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() and not column.IsDay() );
+        traverse( row, FinancialProductionCell, cell ){
+          column              := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() );
           if( isnull( column ) ){
             column            := this.FinancialProductionColumn( relnew, Name := cell.FinancialProductionColumn().Name(), Period := cell.FinancialProductionColumn().Period() );
           }
diff --git "a/_Main/BL/Type_FinancialProductionRow/Method_Initialize\043110.qbl" "b/_Main/BL/Type_FinancialProductionRow/Method_Initialize\043110.qbl"
index 5662263..bdd6e85 100644
--- "a/_Main/BL/Type_FinancialProductionRow/Method_Initialize\043110.qbl"
+++ "b/_Main/BL/Type_FinancialProductionRow/Method_Initialize\043110.qbl"
@@ -13,7 +13,7 @@
     cell := column.FinancialProductionCell( relnew, Quantity := 0 );
     
     this.FinancialProductionCell( relinsert, cell );
-    if( unit <> FinancialProductionReport::GetDefaultAllUnit() and not column.IsDay()){
+    if( unit <> FinancialProductionReport::GetDefaultAllUnit() ){
       importdata := product.MacroPlan().FPImportData( relnew, Generation := product.Generation()
                                                       , MqbMlb := product.MQBMLB()
                                                       , Power := product.Power()
diff --git a/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl b/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
index bad03e0..72d3e6d 100644
--- a/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
@@ -29,10 +29,6 @@
         if( isnull( unitrow ) ){
           unitrow           := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := unit.Value() );
         }
-    //    allrow  := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
-    //    if( isnull( unitrow ) ){
-    //      allrow            := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := allunit );
-    //    }
         
         //璇诲彇姣忎竴琛岀殑鍗曞厓鏍�
         traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and cnv2.Convert( cell.FinancialProductionColumn().Name() ) <> beforeyearday ){
@@ -44,24 +40,13 @@
             previouscell    := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn );
             quantity        := [Real]cell.Value() + [Real]previouscell.Value();
           }
-    //      info( '-----------------', period );
           //鑾峰彇琚鍏ユ姤琛ㄧ殑鏃ユ湡鍒�
-          tablecolumn       := selectobject( table, FinancialProductionColumn, column, not column.IsDay() and column.Name() = periodname );
+          tablecolumn       := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname );
           if( isnull( tablecolumn ) ){
             tablecolumn     := table.FinancialProductionColumn( relnew, Name := periodname, Period := yearday.Date() );
           }
           //鑾峰彇琚鍏ユ姤琛ㄧ殑鍗曞厓鏍�
           unitcell          := selectobject( unitrow, FinancialProductionCell, unitcell, unitcell.FinancialProductionColumn() = tablecolumn );
-    //      allcell           := selectobject( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = tablecolumn );
-    //      if( isnull( allcell ) ){
-    //        allcell         := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() );
-    //        allrow.FinancialProductionCell( relinsert, allcell );
-    //      }else{
-    //        if( allcell.Quantity() <> quantity ){
-    //          allcell.Quantity( quantity );
-    //          allcell.IsUpdate( true );
-    //        }
-    //      }
           if( isnull( unitcell ) ){
             unitcell        := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() );
             unitrow.FinancialProductionCell( relinsert, unitcell );
diff --git a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
index 2188d1d..8b86387 100644
--- a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
@@ -27,8 +27,8 @@
     //Unit
     unitcolumnelement             := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Unit' );
     
-    minindex                      := min( table, FinancialProductionColumn, column, not column.IsDay(), column.Index() );
-    traverse ( table, FinancialProductionColumn, column, not column.IsDay() ) {
+    minindex                      := min( table, FinancialProductionColumn, column, column.Index() );
+    traverse ( table, FinancialProductionColumn, column ) {
       columnelement               := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, column.Name() );
       
       cells                       := selectsortedset( column, FinancialProductionCell, cell, cell.FinancialProductionRow().RowNr() );
diff --git a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
index 7e014c0..31b5a4b 100644
--- a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
@@ -39,8 +39,8 @@
             periodtime        := dayperiodtime.StartOfMonth();
             periodname        := periodtime.Format( "M2/D2/Y" );
     //        quantity          := [Number]pispip.NewSupplyQuantity();//鍥涜垗浜斿叆
-            daycolumn         := selectobject( table, FinancialProductionColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
-            column            := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
+            daycolumn         := selectobject( table, FinancialProductionColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime );
+            column            := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime );
             factoryrow.Initialize( daycolumn, pispip.NewSupplyQuantity() );
             factoryrow.Initialize( column, pispip.NewSupplyQuantity() );
     //        allrow.Initialize( column, pispip.NewSupplyQuantity() );
diff --git a/_Main/BL/Type_FinancialSalesColumn/Attribute_IsDay.qbl b/_Main/BL/Type_FinancialSalesColumn/Attribute_IsDay.qbl
deleted file mode 100644
index 76487f5..0000000
--- a/_Main/BL/Type_FinancialSalesColumn/Attribute_IsDay.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute IsDay
-{
-  #keys: '3[415136.0.1144791876][415136.0.1144791875][415136.0.1144791877]'
-  ValueType: Boolean
-}
diff --git a/_Main/BL/Type_FinancialSalesReport/Method_GenerateColumn.qbl b/_Main/BL/Type_FinancialSalesReport/Method_GenerateColumn.qbl
index 8fa3b08..592acd8 100644
--- a/_Main/BL/Type_FinancialSalesReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_FinancialSalesReport/Method_GenerateColumn.qbl
@@ -11,13 +11,10 @@
     startofyear               := startofplanning.StartOfYear();
     startofnextyear           := startofplanning.StartOfNextYear();
     
-    for( start := startofyear; start < startofnextyear; start := start + Duration::Days( 1 ) ){
+    for( start := startofyear; start < startofnextyear; start := start.StartOfMonth() ){
       periodtime := start.Date();
       periodname := periodtime.Format( "M2/D2/Y" );
-      this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime, IsDay := true );
-      if( start = start.StartOfMonth() ){
-        this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime );
-      }
+      this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime );
     }
   *]
 }
diff --git a/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl b/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
index e56d045..52030a0 100644
--- a/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
+++ b/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
@@ -33,8 +33,8 @@
           showrow.FinancialSalesCell( relinsert, yearcell );
         }
         
-        traverse( row, FinancialSalesCell, cell, not cell.FinancialSalesColumn().IsDay() ){
-          column        := selectobject( this, FinancialSalesColumn, column, column.Name() = cell.FinancialSalesColumn().Name() and not column.IsDay());
+        traverse( row, FinancialSalesCell, cell ){
+          column        := selectobject( this, FinancialSalesColumn, column, column.Name() = cell.FinancialSalesColumn().Name() );
           if( isnull( column ) ){
             column            := this.FinancialSalesColumn( relnew, Name := cell.FinancialSalesColumn().Name(), Period := cell.FinancialSalesColumn().Period() );
           }
diff --git a/_Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl b/_Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl
index a6d4f72..1e7726c 100644
--- a/_Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl
+++ b/_Main/BL/Type_FinancialSalesRow/Method_Initialize.qbl
@@ -13,7 +13,7 @@
     cell := column.FinancialSalesCell( relnew, Value := '0' );
     
     this.FinancialSalesCell( relinsert, cell );
-    if( unit <> FinancialProductionReport::GetDefaultAllUnit() and not column.IsDay() ){
+    if( unit <> FinancialProductionReport::GetDefaultAllUnit() ){
       importdata := product.MacroPlan().FSImportData( relnew, Generation := product.Generation()
                                                       , MqbMlb := product.MQBMLB()
                                                       , Power := product.Power()
diff --git a/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl b/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
index a57f712..2abd5c6 100644
--- a/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
@@ -25,10 +25,6 @@
         if( isnull( unitrow ) ){
           unitrow           := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := unit.Value() );
         }
-    //    allrow              := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
-    //    if( isnull( unitrow ) ){
-    //      allrow            := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := allunit );
-    //    }
         
         traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn() <> productcolumn and cell.FinancialSalesColumn() <> unitcolumn and cnv2.Convert( cell.FinancialSalesColumn().Name() ) <> beforeyearday  ){
           column            := cell.FinancialSalesColumn();
@@ -42,7 +38,7 @@
           }
           tablecolumn       := construct( FinancialSalesColumn );
           //鑾峰彇琚鍏ユ姤琛ㄧ殑鏃ユ湡鍒�
-          tablecolumn       := selectobject( table, FinancialSalesColumn, fscolumn, not fscolumn.IsDay() and fscolumn.Name() = periodname );
+          tablecolumn       := selectobject( table, FinancialSalesColumn, fscolumn, fscolumn.Name() = periodname );
           if( isnull( tablecolumn ) ){
             tablecolumn     := table.FinancialSalesColumn( relnew, Name := periodname, Period := yearday.Date() );
           }
@@ -56,16 +52,6 @@
               unitcell.IsUpdate( true );
             }
           }
-    //      allcell  := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn  );
-    //      if( isnull( allcell ) ){
-    //        allcell         := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
-    //        allrow.FinancialSalesCell( relinsert, allcell );
-    //      }else{
-    //        if( [Real]allcell.Value() <> quantity ){
-    //          allcell.Value( [String]( [Number]quantity ) );
-    //          allcell.IsUpdate( true );
-    //        }
-    //      }
         }
       }
     }
diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
index a0bf9ca..6602944 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
@@ -27,8 +27,8 @@
     //Unit
     unitcolumnelement             := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, 'Unit' );
     
-    minindex                      := min( table, FinancialSalesColumn, column, not column.IsDay(), column.Index() );
-    traverse ( table, FinancialSalesColumn, column, not column.IsDay() ) {
+    minindex                      := min( table, FinancialSalesColumn, column, column.Index() );
+    traverse ( table, FinancialSalesColumn, column ) {
       columnelement               := InventorySummarySource::CreateColumnElement( tableElement, xmlDOM, column.Name() );
       
       cells := selectsortedset( column, FinancialSalesCell, cell, cell.FinancialSalesRow().RowNr() );
diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
index 7fa7381..5b6933e 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
@@ -56,8 +56,8 @@
           periodtime         := dayperiodtime.StartOfMonth();
           periodname         := periodtime.Format( "M2/D2/Y" );
     //      info( '-------------------------', periodname, periodtime );
-          daycolumn          := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
-          column             := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
+          daycolumn          := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime );
+          column             := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime );
     //      info( '-------------------------', column.Name() );
           quantity   := [Number]psdip.Quantity();//鍥涜垗浜斿叆
           
@@ -81,8 +81,8 @@
             dayperiodname   := dayperiodtime.Format( "M2/D2/Y" );
             periodtime      := dayperiodtime.StartOfMonth();
             periodname      := periodtime.Format( "M2/D2/Y" );
-            daycolumn       := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() );
-            column          := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
+            daycolumn       := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime );
+            column          := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime );
             quantity        := [Number]pispip.NewSupplyQuantity();//鍥涜垗浜斿叆
             
             factoryrow.Initialize( column, quantity );//鍙朤otal Demand瀛楁鎸夋湀姹囨�婚渶姹傛暟閲�
diff --git a/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
index 612bf56..48b168e 100644
--- a/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
@@ -40,8 +40,8 @@
     ccsvaluecumulant          := [Real]0;
     
     traverse( table, FinancialWeeklyColumn, column ){
-      productioncolumn      := selectobject( productiontable, FinancialProductionColumn, pcolumn, pcolumn.Name() = column.Name() and pcolumn.Period() = column.Period() and not pcolumn.IsDay() );
-      salescolumn           := selectobject( salestable, FinancialSalesColumn, scolumn, scolumn.Name() = column.Name() and scolumn.Period() = column.Period() and not scolumn.IsDay() );
+      productioncolumn      := selectobject( productiontable, FinancialProductionColumn, pcolumn, pcolumn.Name() = column.Name() and pcolumn.Period() = column.Period() );
+      salescolumn           := selectobject( salestable, FinancialSalesColumn, scolumn, scolumn.Name() = column.Name() and scolumn.Period() = column.Period() );
       
       //浜ч噺姹囨��
       dlpvalue              := [Real]0;
diff --git a/_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl b/_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl
index 27c99d0..a1bbc96 100644
--- a/_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl
+++ b/_Main/BL/Type_InterfaceDataset/Method_PublishPlanReportData.qbl
@@ -17,8 +17,8 @@
     if( iscustomdemand ){//鍏ㄥ勾鏃ュ害闇�姹�/瀹㈡埛闇�姹� 
       CustomerDemandPPAIDS::GenerateData( this, macroplan, executor );
     }
-    if( isofflineplan ){//鍚勪骇绾夸笅绾胯鍒�
-    //  OfflinePlanArchiveVersion::RefreshData( this, macroplan, archive );
+    if ( isofflineplan ) { // 鍚勪骇绾夸笅绾胯鍒�
+      InterfaceDataset::PushOfflinePlanData( macroplan, this, executor );
     }
     if( isshiftplan ){//鐝璁″垝
       DispatchShiftPlan::Dispatch(this, macroplan,executor );
diff --git a/_Main/BL/Type_InterfaceDataset/StaticMethod_PushOfflinePlanData.qbl b/_Main/BL/Type_InterfaceDataset/StaticMethod_PushOfflinePlanData.qbl
new file mode 100644
index 0000000..bbb615e
--- /dev/null
+++ b/_Main/BL/Type_InterfaceDataset/StaticMethod_PushOfflinePlanData.qbl
@@ -0,0 +1,51 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod PushOfflinePlanData (
+  const MacroPlan macroPlan,
+  InterfaceDataset interfaceDataset,
+  String executor
+)
+{
+  Description: '鍙戦�佷笅绾胯鍒掓暟鎹帴鍙�'
+  TextBody:
+  [*
+    table         := selectobject( interfaceDataset, OfflinePlanArchiveVersion, version, not version.IsShow() );
+    
+    totalRow      := 0;
+    interfaceTime := DateTime::ActualTime().Format( "Y-M2-D2 H2:m:s" );
+    
+    jsonarray     := JSON::Array();
+    
+    traverse ( table, Row, r ){
+      traverse ( table, Column, c, c.TimeUnit() = Translations::MP_GlobalParameters_Day() ) {
+        cell := select( r, Cell, tempC, tempC.Column() = c );
+        
+        if ( not isnull( cell ) ) {
+          idsjson := JSON::Object().Add( "product", r.ProductID() )       
+                                   .Add( "planningDate", c.StartDate().Format( 'Y-M2-D2' ) )
+                                   .Add( "planningQty", cell.Quantity() )
+                                   .Add( "versionName", macroPlan.ScenarioName() )
+                                   .Add( "factoryName", ifexpr( r.Unit().Regex( "CC" ), "闀挎槬宸ュ巶", "澶ц繛宸ュ巶" ) )
+                                   .Add( "fac", ifexpr( r.Unit().Regex( "CC" ), "CC", "DL" ) )
+                                   .Add( "interfaceTime", interfaceTime ).Build();
+          jsonarray.Add( idsjson );
+          totalRow++;
+        }
+      }
+    }
+    
+    requestbody := jsonarray.Build().AsString();
+    
+    //info(  requestbody );
+    
+    loginfo := interfaceDataset.InterfaceLoginfo( relnew, 
+                                                  ExecuteUser       := executor, 
+                                                  Name              := "Offline plan data", 
+                                                  InterfaceDateTime := DateTime::ActualTime(), 
+                                                  Message           := "涓嬬嚎璁″垝鏁版嵁", 
+                                                  RequestBody       := requestbody,
+                                                  TotalRow          := totalRow );
+    
+    InterfaceLoginfo::CallInterfaceForDataCenter_OfflinePlan( interfaceDataset, loginfo );
+  *]
+}
diff --git a/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter_OfflinePlan.qbl b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter_OfflinePlan.qbl
new file mode 100644
index 0000000..b8a22f6
--- /dev/null
+++ b/_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterfaceForDataCenter_OfflinePlan.qbl
@@ -0,0 +1,48 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CallInterfaceForDataCenter_OfflinePlan (
+  InterfaceDataset owner,
+  InterfaceLoginfo loginfo
+)
+{
+  Description: '璋冪敤鏁版嵁涓彴鎺ュ彛銆愪笅绾胯鍒掋��'
+  TextBody:
+  [*
+    address       := Translations::InterfaceDataset_DataCenter_Address(); 
+    
+    httpinterface := HTTPInterface::Create( address,80 );
+    
+    httpinterface.PostMethod( true ); 
+    httpinterface.URL( "/api/production-planning/saveList" );
+    httpinterface.MediaType( Translations::InterfaceDataset_ContentType() );
+    httpinterface.AddHeader( "clientId", Translations::InterfaceDataset_DataCenter_ClientId() );
+    httpinterface.AddHeader( "clientSecret", Translations::InterfaceDataset_DataCenter_ClientSecret() );
+    
+    try {
+      httpinterface.Call( loginfo.RequestBody() );
+      
+      result := httpinterface.Result();
+      
+      loginfo.Response( result );
+      loginfo.Success( true );
+    } onerror { 
+      loginfo.ReturnMsg( e.GeneralInformation() );
+    }
+    
+    // 鍚庣画鍏叡澶勭悊
+    loginfo.FinishTime( DateTime::ActualTime() );
+    
+    if ( loginfo.Success() ) {
+      resultJson := JSON::Parse( loginfo.Response() );
+      code       := resultJson.Get( "code" ).GetNumber();
+      msg        := resultJson.Get( "message" ).GetString();
+      
+      loginfo.ReturnMsg( msg );
+      
+      if ( code = 200 ) {
+        loginfo.ReturnSuccess( true );
+        loginfo.UpdateLast();
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_EstimatedTotalCost.qbl "b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_EstimatedTotalCost\043455.qbl"
similarity index 100%
rename from _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_EstimatedTotalCost.qbl
rename to "_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_EstimatedTotalCost\043455.qbl"
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpateEstimatedTotalCost.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpateEstimatedTotalCost.qbl
new file mode 100644
index 0000000..e9889d8
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpateEstimatedTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpateEstimatedTotalCost
+{
+  #keys: '3[413988.1.99460691][413988.1.99460690][413988.1.99460692]'
+  Description: '棰勮鎬昏垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateBufferPaperCost.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateBufferPaperCost.qbl
new file mode 100644
index 0000000..c3ee5de
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateBufferPaperCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateBufferPaperCost
+{
+  #keys: '3[413988.1.99460214][413988.1.99460213][413988.1.99460215]'
+  Description: '缂撳啿绾歌垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateCoefficient.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateCoefficient.qbl
new file mode 100644
index 0000000..9c64935
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateCoefficient.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateCoefficient
+{
+  #keys: '3[413988.1.99460638][413988.1.99460637][413988.1.99460639]'
+  Description: '绯绘暟鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl
new file mode 100644
index 0000000..2e31094
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateExternalRentalWarehouseTransportationCosts
+{
+  #keys: '3[413988.1.99460585][413988.1.99460584][413988.1.99460586]'
+  Description: '澶栫搴撹繍杈撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl
new file mode 100644
index 0000000..c6d37a5
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateOutboundExpensesForRentedWarehouses
+{
+  #keys: '3[413988.1.99460479][413988.1.99460478][413988.1.99460480]'
+  Description: '澶栫搴撳嚭搴撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdatePackingCharges.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdatePackingCharges.qbl
new file mode 100644
index 0000000..024b8c9
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdatePackingCharges.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdatePackingCharges
+{
+  #keys: '3[413988.1.99360501][413988.1.99360500][413988.1.99360502]'
+  Description: '鍖呰璐圭敤鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateQuantityOfWoodenCrates.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateQuantityOfWoodenCrates.qbl
new file mode 100644
index 0000000..a1c14c8
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateQuantityOfWoodenCrates.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateQuantityOfWoodenCrates
+{
+  #keys: '3[413988.1.99460320][413988.1.99460319][413988.1.99460321]'
+  Description: '鏈ㄧ鏁伴噺鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl
new file mode 100644
index 0000000..3fc165a
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateRentalWarehouseStorageFees
+{
+  #keys: '3[413988.1.99460532][413988.1.99460531][413988.1.99460533]'
+  Description: '澶栫搴撲粨鍌ㄨ垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl
new file mode 100644
index 0000000..14938c1
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateStorageFeesForRentedWarehouses
+{
+  #keys: '3[413988.1.99460426][413988.1.99460425][413988.1.99460427]'
+  Description: '澶栫搴撳叆搴撹垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateTotalCost.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateTotalCost.qbl
new file mode 100644
index 0000000..cd47406
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateTotalCost
+{
+  #keys: '3[413988.1.99460744][413988.1.99460743][413988.1.99460745]'
+  Description: '鎬昏垂鐢ㄦ洿鏂板��'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateTransferCost.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateTransferCost.qbl
new file mode 100644
index 0000000..4ea6c9f
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateTransferCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateTransferCost
+{
+  #keys: '3[413988.1.99460373][413988.1.99460372][413988.1.99460374]'
+  Description: '璋冩嫧璐圭敤鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git "a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateUnpackingCost\0430.qbl" "b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateUnpackingCost\0430.qbl"
new file mode 100644
index 0000000..cd60e26
--- /dev/null
+++ "b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateUnpackingCost\0430.qbl"
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateUnpackingCost
+{
+  #keys: '3[413988.1.99360582][413988.1.99360581][413988.1.99360583]'
+  Description: '鎷嗗寘璐圭敤鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateWoodenCrateCost.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateWoodenCrateCost.qbl
new file mode 100644
index 0000000..79bb81f
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_IsUpdateWoodenCrateCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateWoodenCrateCost
+{
+  #keys: '3[413988.1.99460267][413988.1.99460266][413988.1.99460268]'
+  Description: '鏈ㄧ璐圭敤鏇存柊鍊�'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_PackingCharges.qbl "b/_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_PackingCharges\043420.qbl"
similarity index 100%
rename from _Main/BL/Type_MachineLogisticsCostReportCell/Attribute_PackingCharges.qbl
rename to "_Main/BL/Type_MachineLogisticsCostReportCell/Attribute_PackingCharges\043420.qbl"
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/Method_SetCellValue.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/Method_SetCellValue.qbl
new file mode 100644
index 0000000..40d928d
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/Method_SetCellValue.qbl
@@ -0,0 +1,34 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetCellValue (
+  Real quantityOfWoodenCrates
+)
+{
+  Description: '鏇存柊鍗曞厓鏍煎��'
+  TextBody:
+  [*
+    // 璁剧疆鏈ㄧ鏁伴噺
+    this.QuantityOfWoodenCrates( quantityOfWoodenCrates );
+    
+    // 绌烘枡鏋舵暟閲忚仈鍔�
+    this.WoodenCrateCost( [Number] ( quantityOfWoodenCrates * this.WoodenCratePriceReal() ) );
+    
+    // SUM琛岃仈鍔�
+    cell := select( this, MachineLogisticsCostReportColumn.MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() = "SUM" );
+    cell.QuantityOfWoodenCrates( sum( this, MachineLogisticsCostReportColumn.MachineLogisticsCostReportCell, 
+                                      tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = this.MachineLogisticsCostReportRow().Factory(), 
+                                      tempMLCRCell.QuantityOfWoodenCrates() ) );
+    cell.WoodenCrateCost(        sum( this, MachineLogisticsCostReportColumn.MachineLogisticsCostReportCell, tempMLCRCell, 
+                                      tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = this.MachineLogisticsCostReportRow().Factory(), 
+                                      tempMLCRCell.WoodenCrateCost() ) );
+    
+    // SUM鍒楄仈鍔�
+    cell := select( this, MachineLogisticsCostReportRow.MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportColumn().DisplayName() = "SUM" );
+    cell.QuantityOfWoodenCrates( sum( this, MachineLogisticsCostReportRow.MachineLogisticsCostReportCell, tempMLCRCell, 
+                                      not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), 
+                                      tempMLCRCell.QuantityOfWoodenCrates() ) );
+    cell.WoodenCrateCost(        sum( this, MachineLogisticsCostReportRow.MachineLogisticsCostReportCell, tempMLCRCell, 
+                                      not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), 
+                                      tempMLCRCell.WoodenCrateCost() ) );
+  *]
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl
index c5b9fec..2f99195 100644
--- a/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl
@@ -14,8 +14,8 @@
                                       exists( tempPMP, AllParent.AsParent, tempPMP1, tempPMP1.ID() = "鏈哄姞浠�" ),  
                                       tempPMP.ParentID() );
     traverse ( categories, Elements, c ) {
-      macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "澶ц繛宸ュ巶", Category := c  );
-      macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "闀挎槬宸ュ巶", Category := c );
+      macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "澶ц繛宸ュ巶", Category := c, Index := 0 );
+      macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "闀挎槬宸ュ巶", Category := c, Index := 0 );
     }
     
     // 鍒涘缓鍒�
@@ -60,7 +60,7 @@
                                 tempPPC.PackagingPlanColumn().StartDate().Year()  = mlcrc.StartDate().Year()  and
                                 tempPPC.PackagingPlanColumn().StartDate().Month() = mlcrc.StartDate().Month(),
                                 tempPPC.Package() );
-        cell.PackingCharges( packageQuantity * guard( lcm.PackagePrice(), 1 ) );
+        cell.PackingCharges( [Number] ( packageQuantity * guard( lcm.PackagePrice(), 1 ) ) );
     
         // 璁剧疆鎷嗗寘璐圭敤锛堟媶鍖呴噺 * 鎷嗗寘鍗曚环锛�
         unpackingQuantity := sum( macroPlan, PackagingPlanRow.PackagingPlanCell, tempPPC,
@@ -69,10 +69,10 @@
                                   tempPPC.PackagingPlanColumn().StartDate().Year()  = mlcrc.StartDate().Year()  and
                                   tempPPC.PackagingPlanColumn().StartDate().Month() = mlcrc.StartDate().Month(),
                                   tempPPC.Unpacking() );
-        cell.UnpackingCost( unpackingQuantity * guard( lcm.UnpackingPrice(), 1 ) );
+        cell.UnpackingCost( [Number] ( unpackingQuantity * guard( lcm.UnpackingPrice(), 1 ) ) );
     
         // 璁剧疆缂撳啿绾歌垂鐢紙鍖呰绫� * 缂撳啿绾稿崟浠凤級
-        cell.BufferPaperCost( packageQuantity * guard( lcm.BufferPaperPrice(), 1 ) );
+        cell.BufferPaperCost( [Number] ( packageQuantity * guard( lcm.BufferPaperPrice(), 1 ) ) );
     
           // 璁剧疆鏈ㄧ鍗曚环
         cell.WoodenCratePriceReal( guard( lcm.WoodenCratePrice(), 1 ) );
@@ -88,10 +88,10 @@
         cell.TransferCost( [Number] ( ceil( ceil( transferQuantity / guard( lcm.PackagingCapacity(), 1 ) ) / guard( lct1.LoadingCapacity(), 1 ) ) * guard( lct1.TransportPrice(), 1 ) ) );
     
         // 澶栫搴撳叆搴撹垂鐢紙鍏ュ簱閲廩鍖呰閲廬 / 鍖呰瀹归噺 * 鍏ュ簱鍗曚环锛�
-        cell.StorageFeesForRentedWarehouses( packageQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.WarehousingPrice(), 1 ) );
+        cell.StorageFeesForRentedWarehouses( [Number] ( packageQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.WarehousingPrice(), 1 ) ) );
     
         // 澶栫搴撳嚭搴撹垂鐢紙鍑哄簱閲廩鎷嗗寘閲廬 / 鍖呰瀹归噺 * 鍑哄簱鍗曚环锛�
-        cell.OutboundExpensesForRentedWarehouses( unpackingQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.OutboundPrice(), 1 ) );
+        cell.OutboundExpensesForRentedWarehouses( [Number] ( unpackingQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.OutboundPrice(), 1 ) ) );
     
         // 澶栫搴撹繍杈撹垂鐢紙杩愯緭鏁伴噺 / 鍖呰瀹归噺 / 瑁呰浇瀹归噺 * 杩愯緭鍗曚环锛�
         transportationQuantity := sum( macroPlan, Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT,
@@ -111,7 +111,7 @@
                                        tempPIT.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() =  ifexpr( mlcrr.Factory() = "澶ц繛宸ュ巶", "DL", "CC" ) + " " + mlcrr.Category() + "绾胯竟搴�",
                                        tempPIT.Quantity()
                                       );
-        cell.ExternalRentalWarehouseTransportationCosts( transportationQuantity / guard( lcm.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) );
+        cell.ExternalRentalWarehouseTransportationCosts( [Number] ( transportationQuantity / guard( lcm.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) ) );
     
         // 澶栫搴撲粨鍌ㄨ垂鐢細浠撳偍鏁伴噺/鍖呰瀹归噺*浠撳偍鍗曚环
         plannedInventory := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP,
@@ -122,7 +122,7 @@
                                  tempPISPIP.End().Date()                                                                                <= lastDayOfThisMonth and
                                  tempPISPIP.ProductInStockingPoint_MP().StockingPointID()                                               =  ifexpr( mlcrr.Factory() = "澶ц繛宸ュ巶", "DL", "CC" ) + " " + mlcrr.Category() + "澶栫搴�",
                                  tempPISPIP.PlannedInventoryLevelEnd() );
-        cell.RentalWarehouseStorageFees( plannedInventory / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.StoragePrice(), 1 ) );
+        cell.RentalWarehouseStorageFees( [Number] ( plannedInventory / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.StoragePrice(), 1 ) ) );
     
         
         
@@ -143,10 +143,73 @@
         cell.Coefficient( 1.05 );
     
         // 鎬昏垂鐢�
-        cell.TotalCost( cell.EstimatedTotalCost() * cell.Coefficient() );
+        cell.TotalCost( [Number] ( cell.EstimatedTotalCost() * cell.Coefficient() ) );
         
         cell.MachineLogisticsCostReportColumn( relset, mlcrc );
       }
     }
+    
+    // 鍒涘缓SUM琛�
+    sumR   := macroPlan.MachineLogisticsCostReportRow( relnew,  Category := "SUM", Factory := "澶ц繛宸ュ巶", Index := 2 );
+    traverse ( macroPlan, MachineLogisticsCostReportColumn, mlcrc ) {
+      cell := sumR.MachineLogisticsCostReportCell( relnew );
+      cell.MachineLogisticsCostReportColumn( relset, mlcrc );
+      
+      cell.PackingCharges( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.PackingCharges() ) );
+      cell.UnpackingCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.UnpackingCost() ) );
+      cell.BufferPaperCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.BufferPaperCost() ) );
+      cell.QuantityOfWoodenCrates( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.QuantityOfWoodenCrates() ) );
+      cell.WoodenCrateCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.WoodenCrateCost() ) );
+      cell.TransferCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TransferCost() ) );
+      cell.StorageFeesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.StorageFeesForRentedWarehouses() ) );
+      cell.OutboundExpensesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.OutboundExpensesForRentedWarehouses() ) );
+      cell.ExternalRentalWarehouseTransportationCosts( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.ExternalRentalWarehouseTransportationCosts() ) );
+      cell.RentalWarehouseStorageFees( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.RentalWarehouseStorageFees() ) );
+      cell.EstimatedTotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.EstimatedTotalCost() ) );
+      cell.Coefficient( 1.05 );
+      cell.TotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TotalCost() ) );
+    }
+    
+    // 鍒涘缓SUM琛�
+    sumR   := macroPlan.MachineLogisticsCostReportRow( relnew,  Category := "SUM", Factory := "闀挎槬宸ュ巶", Index := 2 );
+    traverse ( macroPlan, MachineLogisticsCostReportColumn, mlcrc ) {
+      cell := sumR.MachineLogisticsCostReportCell( relnew );
+      cell.MachineLogisticsCostReportColumn( relset, mlcrc );
+      
+      cell.PackingCharges( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.PackingCharges() ) );
+      cell.UnpackingCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.UnpackingCost() ) );
+      cell.BufferPaperCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.BufferPaperCost() ) );
+      cell.QuantityOfWoodenCrates( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.QuantityOfWoodenCrates() ) );
+      cell.WoodenCrateCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.WoodenCrateCost() ) );
+      cell.TransferCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TransferCost() ) );
+      cell.StorageFeesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.StorageFeesForRentedWarehouses() ) );
+      cell.OutboundExpensesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.OutboundExpensesForRentedWarehouses() ) );
+      cell.ExternalRentalWarehouseTransportationCosts( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.ExternalRentalWarehouseTransportationCosts() ) );
+      cell.RentalWarehouseStorageFees( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.RentalWarehouseStorageFees() ) );
+      cell.EstimatedTotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.EstimatedTotalCost() ) );
+      cell.Coefficient( 1.05 );
+      cell.TotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TotalCost() ) );
+    }
+    
+    // 鍒涘缓SUM鍒�
+    sumC   := macroPlan.MachineLogisticsCostReportColumn( relnew, StartDate := Date::MaxDate() );
+    traverse ( macroPlan, MachineLogisticsCostReportRow, mlcrr ) {
+      cell := mlcrr.MachineLogisticsCostReportCell( relnew );
+      cell.MachineLogisticsCostReportColumn( relset, sumC );
+      
+      cell.PackingCharges( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.PackingCharges() ) );
+      cell.UnpackingCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.UnpackingCost() ) );
+      cell.BufferPaperCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.BufferPaperCost() ) );
+      cell.QuantityOfWoodenCrates( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.QuantityOfWoodenCrates() ) );
+      cell.WoodenCrateCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.WoodenCrateCost() ) );
+      cell.TransferCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.TransferCost() ) );
+      cell.StorageFeesForRentedWarehouses( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.StorageFeesForRentedWarehouses() ) );
+      cell.OutboundExpensesForRentedWarehouses( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.OutboundExpensesForRentedWarehouses() ) );
+      cell.ExternalRentalWarehouseTransportationCosts( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.ExternalRentalWarehouseTransportationCosts() ) );
+      cell.RentalWarehouseStorageFees( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.RentalWarehouseStorageFees() ) );
+      cell.EstimatedTotalCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.EstimatedTotalCost() ) );
+      cell.Coefficient( 1.05 ); 
+      cell.TotalCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.TotalCost() ) );    
+    }
   *]
 }
diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_Export.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_Export.qbl
index a37bcec..3d60299 100644
--- a/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_Export.qbl
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_Export.qbl
@@ -1,7 +1,139 @@
 Quintiq file version 2.0
 #parent: #root
 StaticMethod Export (
+  MacroPlan macroPlan,
   MachineLogisticsCostReportRows mlcrrs
-)
+) 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 );
+    
+    // 绗竴鍒楋紙鍚嶇О锛�
+    mlcrrs      := selectsortedset( mlcrrs, Elements, tempMLCRR, true, tempMLCRR.Index(), tempMLCRR.Category() );
+    firstColumn := xmlDOM.CreateElement( "column" );
+    firstName   := xmlDOM.CreateElement( "name" );
+    firstType   := xmlDOM.CreateElement( "type" );
+    firstName.TextContent( "*" );
+    firstType.TextContent( "String" );
+    firstColumn.AppendChild( firstName );
+    firstColumn.AppendChild( firstType );
+    traverse ( mlcrrs, Elements, mlcrr ) {
+      firstCell := xmlDOM.CreateElement( "cell" );
+      firstCell.SetAttribute( "value", mlcrr.Category() );
+      firstColumn.AppendChild( firstCell );
+      
+      for ( i := 0; i < 12; i++ ) {
+        firstCell := xmlDOM.CreateElement( "cell" );
+        firstCell.SetAttribute( "value", "" );
+        firstColumn.AppendChild( firstCell );
+      }
+    }
+    tableElement.AppendChild( firstColumn );
+    
+    
+    // 绗簩鍒�
+    attrs        := construct( Strings ); attrs.Add( "鍖呰璐圭敤" ); attrs.Add( "鎷嗗寘璐圭敤" ); attrs.Add( "缂撳啿绾歌垂鐢�" ); 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" );
+    secondType   := xmlDOM.CreateElement( "type" );
+    secondName.TextContent( "*" );
+    secondType.TextContent( "String" );
+    secondColumn.AppendChild( secondName );
+    secondColumn.AppendChild( secondType );
+    for ( i := 0; i < mlcrrs.Size(); i++ ) {
+      traverse ( attrs, Elements, attr ) {
+        secondCell := xmlDOM.CreateElement( "cell" );
+        secondCell.SetAttribute( "value", attr );
+        secondColumn.AppendChild( secondCell );
+      }
+    }
+    tableElement.AppendChild( secondColumn );
+    
+    // 鏃堕棿鍒�
+    mlcrcs := selectsortedset( macroPlan, MachineLogisticsCostReportColumn, tempMLCRC, true, tempMLCRC.StartDate() );
+    traverse ( mlcrcs, Elements, mlcrc ) {
+      cellColumn := xmlDOM.CreateElement( "column" );
+      cellName   := xmlDOM.CreateElement( "name" );
+      cellType   := xmlDOM.CreateElement( "type" );
+      cellName.TextContent( mlcrc.DisplayName() );
+      cellType.TextContent( "Real" );
+      cellColumn.AppendChild( cellName );
+      cellColumn.AppendChild( cellType );
+      cells := selectsortedset( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, 
+                                exists( mlcrrs, Elements, tempMLCRR, tempMLCRR = tempMLCRCell.MachineLogisticsCostReportRow() ), 
+                                tempMLCRCell.MachineLogisticsCostReportRow().Index(), tempMLCRCell.MachineLogisticsCostReportRow().Category() );
+      traverse ( cells, Elements, c ) {
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.PackingCharges().Round( 0 ) ); // 鍖呰璐圭敤
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.UnpackingCost().Round( 0 ) ); // 鎷嗗寘璐圭敤
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.BufferPaperCost().Round( 0 ) ); // 缂撳啿绾歌垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.QuantityOfWoodenCrates().Round( 0 ) ); // 鏈ㄧ鏁伴噺
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.WoodenCrateCost().Round( 0 ) ); // 鏈ㄧ璐圭敤
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.TransferCost().Round( 0 ) ); // 璋冩嫧璐圭敤
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.StorageFeesForRentedWarehouses().Round( 0 ) ); // 澶栫搴撳叆搴撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.OutboundExpensesForRentedWarehouses().Round( 0 ) ); // 澶栫搴撳嚭搴撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.ExternalRentalWarehouseTransportationCosts().Round( 0 ) ); // 澶栫搴撹繍杈撹垂鐢�
+        cellColumn.AppendChild( cell );
+        
+        cell := xmlDOM.CreateElement( "cell" );
+        cell.SetAttribute( "value", [String]c.RentalWarehouseStorageFees().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_MachineLogisticsCostReportCell/StaticMethod_Import.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_Import.qbl
new file mode 100644
index 0000000..03133cc
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_Import.qbl
@@ -0,0 +1,107 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Import (
+  MacroPlan macroPlan,
+  GeneralExcelImportAndExportDataTable table
+)
+{
+  TextBody:
+  [*
+    isUpdateFlag        := "";
+    attributeUpdateFlag := "";
+    
+    factory := table.GeneralExcelImportAndExportDataSource().Name().Tokenize( "_" ).Element( 0 );
+    if ( not ( factory = "澶ц繛宸ュ巶" or factory = "闀挎槬宸ュ巶" ) ) {
+      error( "鏂囦欢鍚嶉敊璇�" );
+    }
+    
+    traverse ( table, GeneralExcelImportAndExportDataRow, row ) {
+      traverse ( table, GeneralExcelImportAndExportDataColumn, column ) {
+        // 鍗曞厓鏍煎��
+        cellValue := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDCell, tempGEIAEDCell.GeneralExcelImportAndExportDataColumn() = column ).Value();
+        // 鏈哄姞鐗╂祦鎴愭湰鎶ヨ〃鍒�
+        mlcrc     := select( macroPlan, MachineLogisticsCostReportColumn, tempMLCRC, tempMLCRC.DisplayName() = column.Name() );
+        cell      := select( macroPlan, MachineLogisticsCostReportRow.MachineLogisticsCostReportCell, tempMLCRCell, 
+                             tempMLCRCell.MachineLogisticsCostReportRow().Category() = "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = factory
+                             and tempMLCRCell.MachineLogisticsCostReportColumn() = mlcrc );
+        
+        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.IsUpdatePackingCharges() and cell.PackingCharges() <> [Real]cellValue ) {
+              cell.IsUpdatePackingCharges( true );
+            }
+            cell.PackingCharges( [Real]cellValue );    
+          } else if ( attributeUpdateFlag = "鎷嗗寘璐圭敤"     and not isnull( cell ) ) {
+            if ( not cell.IsUpdateUnpackingCost() and cell.UnpackingCost() <> [Real]cellValue ) {
+              cell.IsUpdateUnpackingCost( true );
+            }
+            cell.UnpackingCost( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "缂撳啿绾歌垂鐢�"       and not isnull( cell ) ) {
+            if ( not cell.IsUpdateBufferPaperCost() and cell.BufferPaperCost() <> [Real]cellValue ) {
+              cell.IsUpdateBufferPaperCost( true );
+            }
+            cell.BufferPaperCost( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "鏈ㄧ鏁伴噺"       and not isnull( cell ) ) {
+            if ( not cell.IsUpdateQuantityOfWoodenCrates() and cell.QuantityOfWoodenCrates() <> [Real]cellValue ) {
+              cell.IsUpdateQuantityOfWoodenCrates( true );
+            }
+            cell.QuantityOfWoodenCrates( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "鏈ㄧ璐圭敤"       and not isnull( cell ) ) {
+            if ( not cell.IsUpdateWoodenCrateCost() and cell.WoodenCrateCost() <> [Real]cellValue ) {
+              cell.IsUpdateWoodenCrateCost( true );
+            }
+            cell.WoodenCrateCost( [Real]cellValue );
+          } else if ( attributeUpdateFlag = "璋冩嫧璐圭敤"       and not isnull( cell ) ) {
+            if ( not cell.IsUpdateTransferCost() and cell.TransferCost() <> [Real]cellValue ) {
+              cell.IsUpdateTransferCost( true );
+            }
+            cell.TransferCost( [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.IsUpateEstimatedTotalCost() and cell.EstimatedTotalCost() <> [Real]cellValue ) {
+              cell.IsUpateEstimatedTotalCost( 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_MachineLogisticsCostReportColumn/Attribute_DisplayName.qbl b/_Main/BL/Type_MachineLogisticsCostReportColumn/Attribute_DisplayName.qbl
new file mode 100644
index 0000000..3f12afa
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportColumn/Attribute_DisplayName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute DisplayName
+{
+  #keys: '3[413988.1.100804848][413988.1.100804847][413988.1.100804849]'
+  Description: '鍒楁樉绀�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportColumn/DefaultValue_DisplayName.qbl b/_Main/BL/Type_MachineLogisticsCostReportColumn/DefaultValue_DisplayName.qbl
new file mode 100644
index 0000000..96a7dae
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportColumn/DefaultValue_DisplayName.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: DisplayName
+}
diff --git a/_Main/BL/Type_MachineLogisticsCostReportColumn/Function_CalcDisplayName.qbl b/_Main/BL/Type_MachineLogisticsCostReportColumn/Function_CalcDisplayName.qbl
new file mode 100644
index 0000000..fea962d
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportColumn/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_MachineLogisticsCostReportRow/Attribute_Index.qbl b/_Main/BL/Type_MachineLogisticsCostReportRow/Attribute_Index.qbl
new file mode 100644
index 0000000..ee59131
--- /dev/null
+++ b/_Main/BL/Type_MachineLogisticsCostReportRow/Attribute_Index.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Index
+{
+  #keys: '3[413988.1.100900359][413988.1.100900358][413988.1.100900360]'
+  Description: '鎺掑簭绱㈠紩'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersion/Method_GetRow.qbl b/_Main/BL/Type_OfflinePlanArchiveVersion/Method_GetRow.qbl
index a6201d7..0345029 100644
--- a/_Main/BL/Type_OfflinePlanArchiveVersion/Method_GetRow.qbl
+++ b/_Main/BL/Type_OfflinePlanArchiveVersion/Method_GetRow.qbl
@@ -11,11 +11,13 @@
     
     if( isnull( row ) ){
       product := selectobject( noprow.NewOfflinePlanTable().MacroPlan(), Product_MP, product, product.ID() = noprow.ProductID() );
-      unit    := ifexpr( noprow.ProductionLine().FindString( "CC", 0 ) > -1, FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );
-      row     := this.Row( relnew, Name := noprow.ProductID(), ProductionLine := noprow.ProductionLine(), Type := noprow.Type(), Unit := unit
-                           , ProductID := ifexpr( exists( product.GetAllParent(), Elements, e, e.ID() = EnginePipelineReport::GetDefaultProductParent() ), product.Notes(), product.ID() ) );
-      //鍒濆鍖栧崟鍏冩牸
-      row.InitializeCell();
+      if( not isnull( product ) ){
+        unit    := ifexpr( noprow.ProductionLine().FindString( "CC", 0 ) > -1, FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );
+        row     := this.Row( relnew, Name := noprow.ProductID(), ProductionLine := noprow.ProductionLine(), Type := noprow.Type(), Unit := unit
+                             , ProductID := ifexpr( exists( product.GetAllParent(), Elements, e, e.ID() = EnginePipelineReport::GetDefaultProductParent() ), product.Notes(), product.ID() ) );
+        //鍒濆鍖栧崟鍏冩牸
+        row.InitializeCell();
+      }
     }
     
     return row;
diff --git a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
index ee7c9fd..de27233 100644
--- a/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
+++ b/_Main/BL/Type_OfflinePlanArchiveVersion/StaticMethod_RefreshData.qbl
@@ -35,24 +35,26 @@
     }
     traverse( noptable, NewOfflinePlanRow, noprow ){
       row                  := table.GetRow( noprow );
-      traverse( noprow, NewOfflinePlanCell, nopcell ){
-        column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );
-        cell               := selectobject( row, Cell, cell, cell.Column() = column );
-        actproductionKey   := noprow.ProductID() + column.StartDate().AsQUILL();
-        actproductionhandle:= actproductiontree.GetHandle( actproductionKey );
-        actproductionindex := guard( actproductiontree.Root().Child( actproductionhandle ),null( NamedValue ));
-        
-        actproductionqty       := 0.0;
-        if( not isnull( actproductionindex )){
-          actproduction        := actproductiondatas.Element( actproductionindex.GetValueAsNumber() );
-          actproductionqty     := actproduction.ActualOut();
+      if( not isnull( row ) ){
+        traverse( noprow, NewOfflinePlanCell, nopcell ){
+          column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );
+          cell               := selectobject( row, Cell, cell, cell.Column() = column );
+          actproductionKey   := noprow.ProductID() + column.StartDate().AsQUILL();
+          actproductionhandle:= actproductiontree.GetHandle( actproductionKey );
+          actproductionindex := guard( actproductiontree.Root().Child( actproductionhandle ),null( NamedValue ));
+          
+          actproductionqty       := 0.0;
+          if( not isnull( actproductionindex )){
+            actproduction        := actproductiondatas.Element( actproductionindex.GetValueAsNumber() );
+            actproductionqty     := actproduction.ActualOut();
+          }
+          cell.ActualProductionQty( actproductionqty );
+          cell.InventoryWeight( nopcell.InventoryWeight() );
+      //      cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() );
+          cell.Quantity( nopcell.Quantity() );
+      //      cell.Shift( nopcell.Shift() );
+      //      cell.Value( nopcell.Value() );
         }
-        cell.ActualProductionQty( actproductionqty );
-        cell.InventoryWeight( nopcell.InventoryWeight() );
-    //      cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() );
-        cell.Quantity( nopcell.Quantity() );
-    //      cell.Shift( nopcell.Shift() );
-    //      cell.Value( nopcell.Value() );
       }
     }
     showtable.Generate( search );
diff --git a/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp b/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
index ddb28c0..098ad47 100644
--- a/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
+++ b/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
@@ -11,7 +11,7 @@
       DataRepresentation.Conditional
       {
         BackgroundColor: '$FF6666'
-        ConditionBody: 'object.IsUpdate()'
+        ConditionBody: 'object.IsAllCostUpdate()'
         ConversionBody: ''
         DefaultBackgroundColor: false
         InheritConversion: false
@@ -22,31 +22,97 @@
   {
     AttributeKey: '[415136.0.1188511346]'
     Synonym: '绯绘暟'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsCoefficientUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation EstimateTotalCost
   {
     AttributeKey: '[415136.0.1160240036]'
     Synonym: '棰勮鎬昏垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsEstimateTotalCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation RentInCost
   {
     AttributeKey: '[415136.0.1160164662]'
     Synonym: '澶栫搴撳叆搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsRentInCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation RentOutOfCost
   {
     AttributeKey: '[415136.0.1160164672]'
     Synonym: '澶栫搴撳嚭搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsRentOutOfCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation RentStorCost
   {
     AttributeKey: '[415136.0.1160164707]'
     Synonym: '澶栫搴撲粨鍌ㄨ垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsRentStorCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation WerkToRentTransCost
   {
     AttributeKey: '[415136.0.1160240024]'
     Synonym: '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsWerkToRentTransCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   RelationRepresentation Column { RelationKey: '[415136.0.986881392]' Visibility: 'Normal' }
 }
diff --git a/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp b/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
index dff9aa5..97494ec 100644
--- a/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
+++ b/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
@@ -11,7 +11,7 @@
       DataRepresentation.Conditional
       {
         BackgroundColor: '$FF6666'
-        ConditionBody: 'object.IsUpdate()'
+        ConditionBody: 'object.IsAllCostUpdate()'
         ConversionBody: ''
         DefaultBackgroundColor: false
         InheritConversion: false
@@ -22,61 +22,193 @@
   {
     AttributeKey: '[415136.0.1160164734]'
     Synonym: '闀挎槬闀块�旇繍杈撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsCCLongTransCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CCRentInCost
   {
     AttributeKey: '[415136.0.1160164742]'
     Synonym: '闀挎槬澶栫搴撳叆搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsCCRentInCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CCRentOutOfCost
   {
     AttributeKey: '[415136.0.1160164750]'
     Synonym: '闀挎槬澶栫搴撳嚭搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsCCRentOutOfCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CCRentStorCost
   {
     AttributeKey: '[415136.0.1160164771]'
     Synonym: '闀挎槬澶栫搴撲粨鍌ㄨ垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsCCRentStorCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CCShorTransCost
   {
     AttributeKey: '[415136.0.1160164779]'
     Synonym: '闀挎槬鐭�旇繍杈撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsCCShorTransCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation CoefficientValue
   {
     AttributeKey: '[415136.0.1188511355]'
     Synonym: '绯绘暟'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsCoefficientUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation DLRentInCost
   {
     AttributeKey: '[415136.0.1160164787]'
     Synonym: '澶ц繛澶栫搴撳叆搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsDLRentInCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation DLRentOtherCost
   {
     AttributeKey: '[415136.0.1184074681]'
     Synonym: '澶ц繛澶栫搴撳叾浠栬垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsDLRentOtherCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation DLRentOutOfCost
   {
     AttributeKey: '[415136.0.1160164795]'
     Synonym: '澶ц繛澶栫搴撳嚭搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsDLRentOutOfCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation DLRentStorCost
   {
     AttributeKey: '[415136.0.1160164806]'
     Synonym: '澶ц繛澶栫搴撲粨鍌ㄨ垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsDLRentStorCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation EstimateTotalCost
   {
     AttributeKey: '[415136.0.1160164814]'
     Synonym: '棰勮鎬昏垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsEstimateTotalCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation WerkToDLRentTransCost
   {
     AttributeKey: '[415136.0.1160164822]'
     Synonym: '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF6666'
+        ConditionBody: 'object.IsWerkToDLRentTransCostUpdate()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   RelationRepresentation Column { RelationKey: '[415136.0.992900194]' Visibility: 'Normal' }
 }
diff --git a/_Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp b/_Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp
index b891513..b737013 100644
--- a/_Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp
+++ b/_Main/Sys/Repr/Global/MachineLogisticsCostReportCell.qrp
@@ -6,6 +6,17 @@
   {
     AttributeKey: '[413988.0.1462991459]'
     Synonym: '缂撳啿绾歌垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateBufferPaperCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation Coefficient
   {
@@ -13,6 +24,14 @@
     Synonym: '绯绘暟'
     Conditional:
     [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateCoefficient()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
     ]
     DataRepresentation.Default
     {
@@ -24,56 +43,177 @@
   {
     AttributeKey: '[413988.0.1462991539]'
     Synonym: '棰勮鎬昏垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpateEstimatedTotalCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation ExternalRentalWarehouseTransportationCosts
   {
     AttributeKey: '[413988.0.1462991519]'
     Synonym: '澶栫搴撹繍杈撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateExternalRentalWarehouseTransportationCosts()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation OutboundExpensesForRentedWarehouses
   {
     AttributeKey: '[413988.0.1462991509]'
     Synonym: '澶栫搴撳嚭搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateOutboundExpensesForRentedWarehouses()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation PackingCharges
   {
     AttributeKey: '[413988.0.1462991439]'
     Synonym: '鍖呰璐圭敤'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdatePackingCharges()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation QuantityOfWoodenCrates
   {
     AttributeKey: '[413988.0.1462991469]'
     Synonym: '鏈ㄧ鏁伴噺'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateQuantityOfWoodenCrates()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation RentalWarehouseStorageFees
   {
     AttributeKey: '[413988.0.1462991529]'
     Synonym: '澶栫搴撲粨鍌ㄨ垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateRentalWarehouseStorageFees()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation StorageFeesForRentedWarehouses
   {
     AttributeKey: '[413988.0.1462991499]'
     Synonym: '澶栫搴撳叆搴撹垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateStorageFeesForRentedWarehouses()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation TotalCost
   {
     AttributeKey: '[413988.0.1462991549]'
     Synonym: '鎬昏垂鐢�'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateTotalCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation TransferCost
   {
     AttributeKey: '[413988.0.1462991489]'
     Synonym: '璋冩嫧璐圭敤'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateTransferCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation UnpackingCost
   {
     AttributeKey: '[413988.0.1462991449]'
     Synonym: '鎷嗗寘璐圭敤'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateUnpackingCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   AttributeRepresentation WoodenCrateCost
   {
     AttributeKey: '[413988.0.1462991479]'
     Synonym: '鏈ㄧ璐圭敤'
+    Conditional:
+    [
+      DataRepresentation.Conditional
+      {
+        BackgroundColor: '$FF3399'
+        ConditionBody: 'object.IsUpdateWoodenCrateCost()'
+        ConversionBody: ''
+        DefaultBackgroundColor: false
+        InheritConversion: false
+      }
+    ]
   }
   RelationRepresentation MachineLogisticsCostReportColumn { RelationKey: '[413988.0.1462991383]' Visibility: 'Normal' }
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_MatrixEditor912.def b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_MatrixEditor912.def
index bae3842..9d698a5 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_MatrixEditor912.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_MatrixEditor912.def
@@ -56,7 +56,7 @@
       Properties:
       [
         Legend: 'Category'
-        SortCriteria: 'Category'
+        SortCriteria: 'Index;Category'
         Taborder: 1
       ]
     }
@@ -81,7 +81,7 @@
       ]
       Properties:
       [
-        Legend: 'StartDate'
+        Legend: 'DisplayName'
         SortCriteria: 'StartDate'
         Taborder: 2
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_pHeader.def b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_pHeader.def
index 883b60a..ebcd3cb 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_pHeader.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Component_pHeader.def
@@ -33,6 +33,18 @@
       Properties:
       [
         Image: 'EXPORT1'
+        Label: '瀵煎嚭'
+        Taborder: 3
+      ]
+    }
+    Component bImport id:bImport_438
+    {
+      #keys: '[413988.1.109640450]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'IMPORT1'
+        Label: '瀵煎叆'
         Taborder: 2
       ]
     }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_MatrixEditor912_OnUpdateValue.def b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_MatrixEditor912_OnUpdateValue.def
new file mode 100644
index 0000000..3d7776c
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_MatrixEditor912_OnUpdateValue.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor912
+Response OnUpdateValue (
+  MachineLogisticsCostReportCell cell,
+  Real value
+) id:Response_MatrixEditor912_OnUpdateValue
+{
+  #keys: '[413988.1.115290697]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
+  QuillAction
+  {
+    Body:
+    [*
+      cell.SetCellValue( value );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_pHeader_bExport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_pHeader_bExport_OnClick.def
index d6dce97..87d85f4 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_pHeader_bExport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_pHeader_bExport_OnClick.def
@@ -13,9 +13,11 @@
   {
     Body:
     [*
-      mlcrrs := selectset( MacroPlan, MachineLogisticsCostReportRow, tempMLCRR, true );
+      mlcrrs := selectset( MacroPlan, MachineLogisticsCostReportRow, tempMLCRR, tempMLCRR.Factory() = ddslFactory.Text() );
       
-      MachineLogisticsCostReportCell::Export( mlcrrs );
+      binaryValue := MachineLogisticsCostReportCell::Export( MacroPlan, mlcrrs );
+      
+      Application.Download( ddslFactory.Text() + "_鏈哄姞鐗╂祦鎴愭湰鎶ヨ〃.xlsx", binaryValue.AsBinaryData() );
     *]
     GroupServerCalls: false
   }
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_pHeader_bImport_OnClick\043298.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_pHeader_bImport_OnClick\043298.def"
new file mode 100644
index 0000000..74e4825
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormMachineLogisticsCostReport/Response_pHeader_bImport_OnClick\043298.def"
@@ -0,0 +1,45 @@
+Quintiq file version 2.0
+#parent: pHeader/bImport_438
+Response OnClick () id:Response_pHeader_bImport_OnClick_298
+{
+  #keys: '[413988.1.109640449]'
+  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" );
+          
+          MachineLogisticsCostReportCell::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/MachineLogisticsCostReport.vw b/_Main/UI/MacroPlannerWebApp/Views/MachineLogisticsCostReport.vw
index 4f9b6ae..322ae26 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/MachineLogisticsCostReport.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/MachineLogisticsCostReport.vw
@@ -27,6 +27,147 @@
           {
             sizeRatio: 1
           }
+          FormMachineLogisticsCostReport_MatrixEditor912
+          {
+            gridColor: '#c4c4c4'
+            totalHeaderWidth: 200
+            attributeHeaderWidthRatio: 0.6
+            nameHeaderWidthRatio: 0.4
+            columnWidth: 90
+            horizontalGrid: true
+            verticalGrid: true
+            backendState
+            {
+              componentId: 'QMacroPlanner::FormMachineLogisticsCostReport.MatrixEditor912'
+              state
+              {
+                cells
+                {
+                  attributes
+                  {
+                    attribute_PackingCharges
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 0
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'PackingCharges'
+                    }
+                    attribute_UnpackingCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 1
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'UnpackingCost'
+                    }
+                    attribute_BufferPaperCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 2
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'BufferPaperCost'
+                    }
+                    attribute_QuantityOfWoodenCrates
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 3
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'QuantityOfWoodenCrates'
+                    }
+                    attribute_WoodenCrateCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 4
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'WoodenCrateCost'
+                    }
+                    attribute_TransferCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 5
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'TransferCost'
+                    }
+                    attribute_StorageFeesForRentedWarehouses
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 6
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'StorageFeesForRentedWarehouses'
+                    }
+                    attribute_OutboundExpensesForRentedWarehouses
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 7
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'OutboundExpensesForRentedWarehouses'
+                    }
+                    attribute_ExternalRentalWarehouseTransportationCosts
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 8
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'ExternalRentalWarehouseTransportationCosts'
+                    }
+                    attribute_RentalWarehouseStorageFees
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 9
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'RentalWarehouseStorageFees'
+                    }
+                    attribute_EstimatedTotalCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 10
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'EstimatedTotalCost'
+                    }
+                    attribute_Coefficient
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 11
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'Coefficient'
+                    }
+                    attribute_TotalCost
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 12
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'TotalCost'
+                    }
+                  }
+                }
+                columns
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'StartDate'"
+                  }
+                }
+                rows
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'Index';datamember:'Category'"
+                  }
+                }
+              }
+            }
+          }
         }
       }
       form_FormGeneralSettings

--
Gitblit v1.9.3