From b04848d0bf42b4eeed7a0726a28fd1dbc42a16c7 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期一, 12 八月 2024 17:59:28 +0800
Subject: [PATCH] 长春发动机物流成本报表

---
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentEnterCost.qbl                                                                            |    8 
 _Main/BL/Type_CCEngineLogisticsCostCell/_ROOT_Type_CCEngineLogisticsCostCell.qbl                                                               |   10 
 _Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_MqbMlb.qbl                                                                                 |    7 
 _Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_Power.qbl                                                                                  |    7 
 _Main/BL/Type_CCEngineLogisticsCostColumn/Function_CalcIndex.qbl                                                                               |   13 
 _Main/BL/Type_CCEngineLogisticsCostReport/Method_Clear.qbl                                                                                     |   13 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelPower#653.def                                             |   24 
 _Main/BL/Type_CCEngineLogisticsCostReport/Method_IsInUnit.qbl                                                                                  |   16 
 _Main/BL/Type_CCEngineLogisticsCostRow/Attribute_RowNr.qbl                                                                                     |    8 
 _Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl                                                                                 |   19 
 _Main/BL/Type_CCEngineLogisticsCostReport/DefaultValue_ID.qbl                                                                                  |    6 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_MenuCCEngineLogis.def |   16 
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetStockingPointCCLine.qbl                                                              |   11 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuEngineLogisticsCostReport.def                               |   24 
 _Main/BL/Type_CCEngineLogisticsCostReport/Attribute_Name.qbl                                                                                   |    8 
 _Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_Generation.qbl                                                                             |    7 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_OnCreated.def                                                   |   25 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/_ROOT_Component_FormCCEngineLogisticsCostReport.def                      |   38 +
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl                                                                            |  152 +++++
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonSearch_OnClick.def                        |   16 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_TotalCost.qbl                                                                                |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelMQBMLB_667_ddslMQBMLB_OnSelectionChanged.def               |   19 
 _Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcTotalCost.qbl                                                                             |   13 
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultName.qbl                                                                      |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelGeneration_969_ddslGeneration_OnCreated.def                |   23 
 _Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcEstimatedTotalCost.qbl                                                                    |   13 
 _Main/UI/MacroPlannerWebApp/Views/CC_engine_logistics_cost_report_view.vw                                                                      |  104 +++
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelGeneration_969_ddslGeneration_OnSelectionChanged.def       |   19 
 _Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_MqbMlb.qbl                                                                              |    6 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentStorageCost.qbl                                                                          |    8 
 _Main/BL/Type_CCEngineLogisticsCostReport/Method_GetRow.qbl                                                                                    |   21 
 _Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentOutCost.qbl                                                                               |   16 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_EstimatedTotalCost.qbl                                                                       |    8 
 _Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_Power.qbl                                                                               |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_matrixEditorActionBarPageTable#1.def                           |   10 
 _Main/BL/Type_CCEngineLogisticsCostRow/Method_Initialize.qbl                                                                                   |   17 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelMQBMLB_667_ddslMQBMLB_OnCreated.def                        |   23 
 _Main/BL/Type_CCEngineLogisticsCostColumn/_ROOT_Type_CCEngineLogisticsCostColumn.qbl                                                           |   10 
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultCCUnit.qbl                                                                    |   11 
 _Main/BL/Relations/Relation_CCEngineLogisticsCostCell_Column_CCEngineLogisticsCostColumn_Cell.qbl                                              |   23 
 _Main/BL/Relations/Relation_CCEngineLogisticsCostCell_Row_CCEngineLogisticsCostRow_Cell.qbl                                                    |   23 
 _Main/BL/Type_CCEngineLogisticsCostRow/Attribute_Name.qbl                                                                                      |    8 
 _Main/BL/Relations/Relation_CCEngineLogisticsCostReport_MacroPlan_MacroPlan_CCEngineLogisticsCo.qbl                                            |   23 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelPower_653_ddslPower_OnCreated.def                          |   23 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_FactoryToRentTransCost.qbl                                                                   |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_MatrixEditorTable_358_OnUpdateValue.def                         |   31 +
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_matrixeditorContextMenuTable#1.def                             |   10 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def                                               |   15 
 _Main/BL/Type_CCEngineLogisticsCostRow/_ROOT_Type_CCEngineLogisticsCostRow.qbl                                                                 |   10 
 _Main/BL/Type_CCEngineLogisticsCostReport/Attribute_ID.qbl                                                                                     |    8 
 _Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentStorageCost.qbl                                                                           |   16 
 _Main/BL/Type_CCEngineLogisticsCostReport/Method_GenerateColumn.qbl                                                                            |   20 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelGeneration#969.def                                        |   24 
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultAllUnit.qbl                                                                   |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelMQBMLB#667.def                                            |   24 
 _Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_Index.qbl                                                                                  |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_MatrixEditorTable#358.def                                      |   98 +++
 _Main/BL/Type_CCEngineLogisticsCostReport/Attribute_IsShow.qbl                                                                                 |    7 
 _Main/BL/Type_CCEngineLogisticsCostSearch/_ROOT_Type_CCEngineLogisticsCostSearch.qbl                                                           |   10 
 _Main/BL/Type_CCEngineLogisticsCostRow/DefaultValue_Name.qbl                                                                                   |    6 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentOutCost.qbl                                                                              |    8 
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetStockingPointCCRent.qbl                                                              |   10 
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl                                                                          |  124 ++++
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelCCEngineLogisticsCostReportSearch.def                     |   19 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelTable#211.def                                             |   14 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelPower_653_ddslPower_OnSelectionChanged.def                 |   19 
 _Main/BL/Relations/Relation_CCEngineLogisticsCostRow_Report_CCEngineLogisticsCostReport_Row.qbl                                                |   23 
 _Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_Generation.qbl                                                                          |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelExport#670.def                                            |   34 +
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonExport_OnClick.def                        |   22 
 _Main/BL/Relations/Relation_CCEngineLogisticsCostReport_Column_CCEngineLogisticsCostColumn_Repo.qbl                                            |   26 
 _Main/BL/Type_CCEngineLogisticsCostColumn/DefaultValue_Name.qbl                                                                                |    6 
 _Main/BL/Relations/Relation_CCEngineLogisticsCostSearch_MacroPlan_MacroPlan_CCEngineLogisticsCo.qbl                                            |   23 
 _Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_StartDate.qbl                                                                              |    8 
 _Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl                                                                                  |   49 +
 _Main/BL/Type_CCEngineLogisticsCostReport/DefaultValue_Name.qbl                                                                                |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelCCEngineLogisticsCostReportHeader.def                     |   15 
 _Main/BL/Type_CCEngineLogisticsCostCell/Attribute_Coefficient.qbl                                                                              |    8 
 _Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_Name.qbl                                                                                   |    8 
 _Main/BL/Type_CCEngineLogisticsCostReport/_ROOT_Type_CCEngineLogisticsCostReport.qbl                                                           |   10 
 _Main/BL/Type_CCEngineLogisticsCostRow/Method_SetFactoryToRentTransCost.qbl                                                                    |   16 
 _Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentEnterCost#517.qbl                                                                         |   16 
 82 files changed, 1,640 insertions(+), 8 deletions(-)

diff --git a/_Main/BL/Relations/Relation_CCEngineLogisticsCostCell_Column_CCEngineLogisticsCostColumn_Cell.qbl b/_Main/BL/Relations/Relation_CCEngineLogisticsCostCell_Column_CCEngineLogisticsCostColumn_Cell.qbl
new file mode 100644
index 0000000..799a439
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CCEngineLogisticsCostCell_Column_CCEngineLogisticsCostColumn_Cell.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CCEngineLogisticsCostCell_Column_CCEngineLogisticsCostColumn_Cell
+{
+  #keys: '1[415136.0.986881391]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Column
+  {
+    #keys: '3[415136.0.986881393][415136.0.986881392][415136.0.986881394]'
+    Cardinality: '0to1'
+    ObjectDefinition: CCEngineLogisticsCostCell
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide Cell
+  {
+    #keys: '3[415136.0.986881396][415136.0.986881395][415136.0.986881397]'
+    Cardinality: '1toN'
+    ObjectDefinition: CCEngineLogisticsCostColumn
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_CCEngineLogisticsCostCell_Row_CCEngineLogisticsCostRow_Cell.qbl b/_Main/BL/Relations/Relation_CCEngineLogisticsCostCell_Row_CCEngineLogisticsCostRow_Cell.qbl
new file mode 100644
index 0000000..035a7b1
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CCEngineLogisticsCostCell_Row_CCEngineLogisticsCostRow_Cell.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CCEngineLogisticsCostCell_Row_CCEngineLogisticsCostRow_Cell
+{
+  #keys: '1[415136.0.986881404]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Row
+  {
+    #keys: '3[415136.0.986881406][415136.0.986881405][415136.0.986881407]'
+    Cardinality: '0to1'
+    ObjectDefinition: CCEngineLogisticsCostCell
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide Cell
+  {
+    #keys: '3[415136.0.986881409][415136.0.986881408][415136.0.986881410]'
+    Cardinality: '1toN'
+    ObjectDefinition: CCEngineLogisticsCostRow
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_CCEngineLogisticsCostReport_Column_CCEngineLogisticsCostColumn_Repo.qbl b/_Main/BL/Relations/Relation_CCEngineLogisticsCostReport_Column_CCEngineLogisticsCostColumn_Repo.qbl
new file mode 100644
index 0000000..52f06d0
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CCEngineLogisticsCostReport_Column_CCEngineLogisticsCostColumn_Repo.qbl
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CCEngineLogisticsCostReport_Column_CCEngineLogisticsCostColumn_Report
+{
+  #keys: '1[415136.0.986881356]'
+  ProceduralSequenceRelationStrategy
+  {
+    #keys: '13[0.0.0][415136.0.986881375][415136.0.986881369][415136.0.986881376][415136.0.986881370][415136.0.986881377][415136.0.986881371][415136.0.986881378][415136.0.986881372][415136.0.986881379][415136.0.986881373][415136.0.986881380][415136.0.986881374]'
+    SequenceElementSuffix: 'Column'
+    SequenceSuffix: 'Column'
+  }
+  RelationSide.LeftSide Column
+  {
+    #keys: '3[415136.0.986881358][415136.0.986881357][415136.0.986881359]'
+    Cardinality: '1toN'
+    ObjectDefinition: CCEngineLogisticsCostReport
+    OwningSide: 'Owned'
+  }
+  RelationSide.RightSide Report
+  {
+    #keys: '3[415136.0.986881361][415136.0.986881360][415136.0.986881362]'
+    Cardinality: '0to1'
+    ObjectDefinition: CCEngineLogisticsCostColumn
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_CCEngineLogisticsCostReport_MacroPlan_MacroPlan_CCEngineLogisticsCo.qbl b/_Main/BL/Relations/Relation_CCEngineLogisticsCostReport_MacroPlan_MacroPlan_CCEngineLogisticsCo.qbl
new file mode 100644
index 0000000..75fd42d
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CCEngineLogisticsCostReport_MacroPlan_MacroPlan_CCEngineLogisticsCo.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CCEngineLogisticsCostReport_MacroPlan_MacroPlan_CCEngineLogisticsCostReport
+{
+  #keys: '1[415136.0.986400960]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide MacroPlan
+  {
+    #keys: '3[415136.0.986400962][415136.0.986400961][415136.0.986400963]'
+    Cardinality: '0to1'
+    ObjectDefinition: CCEngineLogisticsCostReport
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide CCEngineLogisticsCostReport
+  {
+    #keys: '3[415136.0.986400965][415136.0.986400964][415136.0.986400966]'
+    Cardinality: '1toN'
+    ObjectDefinition: MacroPlan
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_CCEngineLogisticsCostRow_Report_CCEngineLogisticsCostReport_Row.qbl b/_Main/BL/Relations/Relation_CCEngineLogisticsCostRow_Report_CCEngineLogisticsCostReport_Row.qbl
new file mode 100644
index 0000000..4023f8e
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CCEngineLogisticsCostRow_Report_CCEngineLogisticsCostReport_Row.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CCEngineLogisticsCostRow_Report_CCEngineLogisticsCostReport_Row
+{
+  #keys: '1[415136.0.986616253]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Report
+  {
+    #keys: '3[415136.0.986616255][415136.0.986616254][415136.0.986616256]'
+    Cardinality: '0to1'
+    ObjectDefinition: CCEngineLogisticsCostRow
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide Row
+  {
+    #keys: '3[415136.0.986616258][415136.0.986616257][415136.0.986616259]'
+    Cardinality: '1toN'
+    ObjectDefinition: CCEngineLogisticsCostReport
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_CCEngineLogisticsCostSearch_MacroPlan_MacroPlan_CCEngineLogisticsCo.qbl b/_Main/BL/Relations/Relation_CCEngineLogisticsCostSearch_MacroPlan_MacroPlan_CCEngineLogisticsCo.qbl
new file mode 100644
index 0000000..cc3faa8
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CCEngineLogisticsCostSearch_MacroPlan_MacroPlan_CCEngineLogisticsCo.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CCEngineLogisticsCostSearch_MacroPlan_MacroPlan_CCEngineLogisticsCostSearch
+{
+  #keys: '1[415136.0.986844810]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide MacroPlan
+  {
+    #keys: '3[415136.0.986844812][415136.0.986844811][415136.0.986844813]'
+    Cardinality: '0to1'
+    ObjectDefinition: CCEngineLogisticsCostSearch
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide CCEngineLogisticsCostSearch
+  {
+    #keys: '3[415136.0.986844815][415136.0.986844814][415136.0.986844816]'
+    Cardinality: '0to1'
+    ObjectDefinition: MacroPlan
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_Coefficient.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_Coefficient.qbl
new file mode 100644
index 0000000..ffd2fc1
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_Coefficient.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Coefficient
+{
+  #keys: '3[415136.0.986844758][415136.0.986844757][415136.0.986844759]'
+  Description: '绯绘暟'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_EstimatedTotalCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_EstimatedTotalCost.qbl
new file mode 100644
index 0000000..8a9c7d8
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_EstimatedTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute EstimatedTotalCost
+{
+  #keys: '3[415136.0.986844739][415136.0.986844738][415136.0.986844740]'
+  Description: '棰勮鎬昏垂鐢�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_FactoryToRentTransCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_FactoryToRentTransCost.qbl
new file mode 100644
index 0000000..8dbddf0
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_FactoryToRentTransCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute FactoryToRentTransCost
+{
+  #keys: '3[415136.0.986844781][415136.0.986844780][415136.0.986844782]'
+  Description: '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentEnterCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentEnterCost.qbl
new file mode 100644
index 0000000..0343f9f
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentEnterCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute RentEnterCost
+{
+  #keys: '3[415136.0.986881423][415136.0.986881422][415136.0.986881424]'
+  Description: '澶栫搴撳叆搴撹垂鐢�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentOutCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentOutCost.qbl
new file mode 100644
index 0000000..005fa21
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentOutCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute RentOutCost
+{
+  #keys: '3[415136.0.986881433][415136.0.986881432][415136.0.986881434]'
+  Description: '澶栫搴撳嚭搴撹垂鐢�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentStorageCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentStorageCost.qbl
new file mode 100644
index 0000000..c42d3f6
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_RentStorageCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute RentStorageCost
+{
+  #keys: '3[415136.0.986881446][415136.0.986881445][415136.0.986881447]'
+  Description: '澶栫搴撲粨鍌ㄨ垂鐢�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_TotalCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_TotalCost.qbl
new file mode 100644
index 0000000..e205166
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Attribute_TotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute TotalCost
+{
+  #keys: '3[415136.0.986844771][415136.0.986844770][415136.0.986844772]'
+  Description: '鎬昏垂鐢�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcEstimatedTotalCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcEstimatedTotalCost.qbl
new file mode 100644
index 0000000..2251974
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcEstimatedTotalCost.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcEstimatedTotalCost
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-12-2024 (created)
+    
+    value := this.RentEnterCost() + this.RentOutCost() + this.FactoryToRentTransCost() + this.RentStorageCost();
+    
+    this.EstimatedTotalCost( value );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcTotalCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcTotalCost.qbl
new file mode 100644
index 0000000..e2e8080
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcTotalCost.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcTotalCost
+{
+  Description: '璁$畻鎬昏垂鐢�'
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-12-2024 (created)
+    value := this.EstimatedTotalCost() * this.Coefficient();
+    
+    this.TotalCost( value );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/_ROOT_Type_CCEngineLogisticsCostCell.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/_ROOT_Type_CCEngineLogisticsCostCell.qbl
new file mode 100644
index 0000000..4caa127
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostCell/_ROOT_Type_CCEngineLogisticsCostCell.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type CCEngineLogisticsCostCell
+{
+  #keys: '5[415136.0.986881388][415136.0.986881386][0.0.0][415136.0.986881387][415136.0.986881389]'
+  BaseType: Object
+  Description: '闀挎槬鍙戝姩鏈虹墿娴佹垚鏈姤琛ㄥ崟鍏冩牸'
+  StructuredName: 'CCEngineLogisticsCostCells'
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_Index.qbl b/_Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_Index.qbl
new file mode 100644
index 0000000..df42754
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_Index.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Index
+{
+  #keys: '3[415136.0.986616274][415136.0.986616273][415136.0.986616275]'
+  Description: '鍒楀彿'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_Name.qbl b/_Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_Name.qbl
new file mode 100644
index 0000000..5a12005
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_Name.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+  #keys: '3[415136.0.986616271][415136.0.986616270][415136.0.986616272]'
+  Description: '鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_StartDate.qbl b/_Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_StartDate.qbl
new file mode 100644
index 0000000..7b54308
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostColumn/Attribute_StartDate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute StartDate
+{
+  #keys: '3[415136.0.986881347][415136.0.986881346][415136.0.986881348]'
+  Description: '寮�濮嬫棩鏈�'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostColumn/DefaultValue_Name.qbl b/_Main/BL/Type_CCEngineLogisticsCostColumn/DefaultValue_Name.qbl
new file mode 100644
index 0000000..86c3d59
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostColumn/DefaultValue_Name.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Name
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostColumn/Function_CalcIndex.qbl b/_Main/BL/Type_CCEngineLogisticsCostColumn/Function_CalcIndex.qbl
new file mode 100644
index 0000000..92fa42d
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostColumn/Function_CalcIndex.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcIndex
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-12-2024 (created)
+    
+    value := ifexpr( isnull( this.PreviousColumn() ), 0, this.PreviousColumn().Index() + 1 );
+    
+    this.Index( value );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostColumn/_ROOT_Type_CCEngineLogisticsCostColumn.qbl b/_Main/BL/Type_CCEngineLogisticsCostColumn/_ROOT_Type_CCEngineLogisticsCostColumn.qbl
new file mode 100644
index 0000000..a958ed8
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostColumn/_ROOT_Type_CCEngineLogisticsCostColumn.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type CCEngineLogisticsCostColumn
+{
+  #keys: '5[415136.0.986616268][415136.0.986616266][0.0.0][415136.0.986616267][415136.0.986616269]'
+  BaseType: Object
+  Description: '闀挎槬鍙戝姩鏈虹墿娴佹垚鏈姤琛ㄥ垪'
+  StructuredName: 'CCEngineLogisticsCostColumns'
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Attribute_ID.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Attribute_ID.qbl
new file mode 100644
index 0000000..d2cbd0c
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Attribute_ID.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ID
+{
+  #keys: '3[415136.0.986400950][415136.0.986400949][415136.0.986400951]'
+  IsReadOnly: true
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Attribute_IsShow.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Attribute_IsShow.qbl
new file mode 100644
index 0000000..d20a0f9
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Attribute_IsShow.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsShow
+{
+  #keys: '3[415136.0.986400953][415136.0.986400952][415136.0.986400954]'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Attribute_Name.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Attribute_Name.qbl
new file mode 100644
index 0000000..41a82d6
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Attribute_Name.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+  #keys: '3[415136.0.986400956][415136.0.986400955][415136.0.986400957]'
+  Description: '鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/DefaultValue_ID.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/DefaultValue_ID.qbl
new file mode 100644
index 0000000..049abc0
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/DefaultValue_ID.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: ID
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/DefaultValue_Name.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/DefaultValue_Name.qbl
new file mode 100644
index 0000000..86c3d59
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/DefaultValue_Name.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Name
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Clear.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Clear.qbl
new file mode 100644
index 0000000..4acb371
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Clear.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Method Clear
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    this.Column( relflush );
+    this.Row( relflush );
+    
+    this.GenerateColumn( this.MacroPlan() );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl
new file mode 100644
index 0000000..74e7077
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl
@@ -0,0 +1,49 @@
+Quintiq file version 2.0
+#parent: #root
+Method Generate (
+  CCEngineLogisticsCostSearch search,
+  Product_MPs products
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    table            := selectobject( this, MacroPlan.CCEngineLogisticsCostReport, report, not report.IsShow() );
+    allunit          := '<All>';
+    //娓呯┖涔嬪墠瀛樺偍鐨勬樉绀烘暟鎹�
+    this.Clear();
+    //杩囨护鍚庣殑浜у搧id
+    productids       := selectuniquevalues( products, Elements, product, ( search.Generation() = allunit or product.Generation() = search.Generation() )
+                                      and ( search.MqbMlb() = allunit or product.MQBMLB() = search.MqbMlb() )
+                                      and ( search.Power() = allunit or product.Power() = search.Power() ), product.ID() );
+    sumrow           := this.Row( relnew, Name := 'SUM', RowNr := table.Row( relsize ) );
+    traverse( table, Row, row ){
+      productid      := construct( Strings );
+      productid.Add( row.Name() );
+      
+      if( productids.ContainsAll( productid ) ){
+        showrow      := this.Row( relnew, Name := row.Name(), RowNr := row.RowNr() );
+        
+        traverse( row, Cell, cell ){
+          column     := selectobject( this, Column, column, column.Name() = cell.Column().Name() );
+          
+          sumcell    := selectobject( column, Cell, c, c.Row() = sumrow );
+          if( isnull( sumcell ) ){
+            sumcell  := showrow.Cell( relnew, RentEnterCost         := 0
+                                     , RentOutCost                 := 0 
+                                     , FactoryToRentTransCost      := 0
+                                     , RentStorageCost             := 0 );
+            column.Cell( relinsert, sumcell );
+          }
+          
+          showcell   := showrow.Cell( relnew, RentEnterCost := cell.RentEnterCost(), RentOutCost := cell.RentOutCost(), FactoryToRentTransCost := cell.FactoryToRentTransCost(), RentStorageCost := cell.RentStorageCost() );
+          column.Cell( relinsert, showcell );
+          sumcell.RentEnterCost( cell.RentEnterCost() + sumcell.RentEnterCost() );
+          sumcell.RentOutCost( cell.RentOutCost() + sumcell.RentOutCost() );
+          sumcell.FactoryToRentTransCost( cell.FactoryToRentTransCost() + sumcell.FactoryToRentTransCost() );
+          sumcell.RentStorageCost( cell.RentStorageCost() + sumcell.RentStorageCost() );
+        }
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Method_GenerateColumn.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_GenerateColumn.qbl
new file mode 100644
index 0000000..880436e
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_GenerateColumn.qbl
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: #root
+Method GenerateColumn (
+  MacroPlan owner
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    startofplanning           := owner.StartOfPlanning();
+    startofyear               := startofplanning.StartOfYear();
+    startofnextyear           := startofplanning.StartOfNextYear();
+    
+    for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){
+      periodtime := start.Date();
+      periodname := periodtime.Format( "M2/D2/Y" );
+      this.Column( relnew, Name := periodname, StartDate := periodtime );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Method_GetRow.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_GetRow.qbl
new file mode 100644
index 0000000..a966d3a
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_GetRow.qbl
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetRow (
+  String product
+) as CCEngineLogisticsCostRow
+{
+  Description: '鏍规嵁宸ュ巶鑾峰彇琛�'
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-2-2024 (created)
+    row := selectobject( this, Row, row, row.Name() = product );
+    if( isnull( row ) ){
+      //鍒濆鍖栧崟鍏冩牸
+      row := this.Row( relnew, Name := product );
+      traverse( this, Column, column ){
+        row.Initialize( column );
+      }
+    }
+    return row;
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Method_IsInUnit.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_IsInUnit.qbl
new file mode 100644
index 0000000..57394ad
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_IsInUnit.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method IsInUnit (
+  StockingPoint_MP sp,
+  String unitname
+) as Boolean
+{
+  Description: '鏄惁灞炰簬鏌愪釜绾�'
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-5-2024 (created)
+    unit                  := sp.Unit();
+    parentunits           := unit.GetAllParent();
+    return sp.ID() = unitname or unit.ID() = unitname or exists( parentunits, Elements, punit, punit.ID() = unitname );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl
new file mode 100644
index 0000000..8af34f9
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl
@@ -0,0 +1,152 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Download (
+  MacroPlan macroPlan
+) as BinaryValue
+{
+  Description: '涓嬭浇璐㈠姟鎶ヨ〃鏁版嵁'
+  TextBody:
+  [*
+    
+    table := selectobject( macroPlan, CCEngineLogisticsCostReport, table, table.IsShow() );
+    
+    xmlDOMI := XMLDOMImplementation::Create();
+    xmlDOM  := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + table.Name() + '</name></table>' );
+    
+    tableElement := xmlDOM.GetElementByTagName( "table", 0 );
+    //Product
+    productcolumnelement := xmlDOM.CreateElement( "column" );
+    productnameelement   := xmlDOM.CreateElement( "name" );
+    producttypeelement   := xmlDOM.CreateElement( "type" );
+    productnameelement.TextContent( 'Product' );
+    producttypeelement.TextContent( "String" );
+    productcolumnelement.AppendChild( productnameelement );
+    productcolumnelement.AppendChild( producttypeelement );
+    //Attribute
+    attricolumnelement := xmlDOM.CreateElement( "column" );
+    attrinameelement   := xmlDOM.CreateElement( "name" );
+    attritypeelement   := xmlDOM.CreateElement( "type" );
+    attrinameelement.TextContent( 'Attribute' );
+    attritypeelement.TextContent( "String" );
+    attricolumnelement.AppendChild( attrinameelement );
+    attricolumnelement.AppendChild( attritypeelement );
+    
+    tableElement.AppendChild( productcolumnelement ); 
+    tableElement.AppendChild( attricolumnelement );
+    traverse ( table, Column, column ) {
+      columnelement := xmlDOM.CreateElement( "column" );
+      nameelement   := xmlDOM.CreateElement( "name" );
+      typeelement   := xmlDOM.CreateElement( "type" );
+      nameelement.TextContent( column.Name() );
+      typeelement.TextContent( "String" );
+      columnelement.AppendChild( nameelement );
+      columnelement.AppendChild( typeelement );
+      
+      cells := selectsortedset( column, Cell, cell, cell.Row().RowNr() );
+    
+      traverse ( cells, Elements, c ) {
+        if( column.Index() = 0 ){
+          row := c.Row();
+          //Product
+          product1cellElement := xmlDOM.CreateElement( "cell" );
+          product1cellElement.SetAttribute( "value", row.Name() );
+          productcolumnelement.AppendChild( product1cellElement );
+          
+          product2cellElement := xmlDOM.CreateElement( "cell" );
+          product2cellElement.SetAttribute( "value", row.Name() );
+          productcolumnelement.AppendChild( product2cellElement );
+          
+          product3cellElement := xmlDOM.CreateElement( "cell" );
+          product3cellElement.SetAttribute( "value", row.Name() );
+          productcolumnelement.AppendChild( product3cellElement );
+          
+          product4cellElement := xmlDOM.CreateElement( "cell" );
+          product4cellElement.SetAttribute( "value", row.Name() );
+          productcolumnelement.AppendChild( product4cellElement );
+          
+          product5cellElement := xmlDOM.CreateElement( "cell" );
+          product5cellElement.SetAttribute( "value", row.Name() );
+          productcolumnelement.AppendChild( product5cellElement );
+          
+          product6cellElement := xmlDOM.CreateElement( "cell" );
+          product6cellElement.SetAttribute( "value", row.Name() );
+          productcolumnelement.AppendChild( product6cellElement );
+          
+          product7cellElement := xmlDOM.CreateElement( "cell" );
+          product7cellElement.SetAttribute( "value", row.Name() );
+          productcolumnelement.AppendChild( product7cellElement );
+          //Attribute
+          //澶栫搴撳叆搴撹垂鐢�
+          rententercostcellElement := xmlDOM.CreateElement( "cell" );
+          rententercostcellElement.SetAttribute( "value", 'RentEnterCost' );
+          attricolumnelement.AppendChild( rententercostcellElement );
+          //澶栫搴撳嚭搴撹垂鐢�
+          rentoutcostcellElement := xmlDOM.CreateElement( "cell" );
+          rentoutcostcellElement.SetAttribute( "value", 'RentOutCost' );
+          attricolumnelement.AppendChild( rentoutcostcellElement );
+          //鍘傚唴鍒板绉熷簱杩愯緭璐圭敤
+          factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" );
+          factorytorenttranscostcellElement.SetAttribute( "value", 'FactoryToRentTransCost' );
+          attricolumnelement.AppendChild( factorytorenttranscostcellElement );
+          //澶栫搴撲粨鍌ㄨ垂鐢�
+          estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
+          estimatedtotalcostcellElement.SetAttribute( "value", 'EstimatedTotalCost' );
+          attricolumnelement.AppendChild( estimatedtotalcostcellElement );
+          //棰勮鎬昏垂鐢�
+          rentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
+          rentstoragecostcellElement.SetAttribute( "value", 'RentStorageCost' );
+          attricolumnelement.AppendChild( rentstoragecostcellElement );
+          //绯绘暟
+          coefficientcellElement := xmlDOM.CreateElement( "cell" );
+          coefficientcellElement.SetAttribute( "value", 'Coefficient' );
+          attricolumnelement.AppendChild( coefficientcellElement );
+          //鎬昏垂鐢�
+          totalcostcellElement := xmlDOM.CreateElement( "cell" );
+          totalcostcellElement.SetAttribute( "value", 'TotalCost' );
+          attricolumnelement.AppendChild( totalcostcellElement );
+        }
+        //澶栫搴撳叆搴撹垂鐢�
+        rententercostcellElement := xmlDOM.CreateElement( "cell" );
+        rententercostcellElement.SetAttribute( "value", [String]c.RentEnterCost() );
+        columnelement.AppendChild( rententercostcellElement );
+        //澶栫搴撳嚭搴撹垂鐢�
+        rentoutcostcellElement := xmlDOM.CreateElement( "cell" );
+        rentoutcostcellElement.SetAttribute( "value", [String]c.RentOutCost() );
+        columnelement.AppendChild( rentoutcostcellElement );
+        //鍘傚唴鍒板绉熷簱杩愯緭璐圭敤
+        factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" );
+        factorytorenttranscostcellElement.SetAttribute( "value", [String]c.FactoryToRentTransCost() );
+        columnelement.AppendChild( factorytorenttranscostcellElement );
+        //澶栫搴撲粨鍌ㄨ垂鐢�
+        estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
+        estimatedtotalcostcellElement.SetAttribute( "value", [String]c.EstimatedTotalCost() );
+        columnelement.AppendChild( estimatedtotalcostcellElement );
+        //棰勮鎬昏垂鐢�
+        rentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
+        rentstoragecostcellElement.SetAttribute( "value", [String]c.EstimatedTotalCost() );
+        columnelement.AppendChild( rentstoragecostcellElement );
+        //绯绘暟
+        coefficientcellElement := xmlDOM.CreateElement( "cell" );
+        coefficientcellElement.SetAttribute( "value", [String]c.Coefficient() );
+        columnelement.AppendChild( coefficientcellElement );
+        //鎬昏垂鐢�
+        totalcostcellElement := xmlDOM.CreateElement( "cell" );
+        totalcostcellElement.SetAttribute( "value", [String]c.TotalCost() );
+        columnelement.AppendChild( totalcostcellElement );
+      }
+      tableElement.AppendChild( columnelement );  
+    }
+    
+    xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM )
+    
+    //info( xmlString );
+    
+    tableGroupHandle := TableGroupHandle::Create( CCEngineLogisticsCostReport::GetDefaultName() );
+    tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
+    tableGroupHandle.Add( tableHandle );
+    
+    binaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
+    
+    return binaryData.AsBinaryValue();
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultAllUnit.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultAllUnit.qbl
new file mode 100644
index 0000000..e912c3f
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultAllUnit.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultAllUnit () const declarative as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '<All>';
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultCCUnit.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultCCUnit.qbl
new file mode 100644
index 0000000..4a17ee3
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultCCUnit.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultCCUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '闀挎槬宸ュ巶';
+    //return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultName.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultName.qbl
new file mode 100644
index 0000000..5f29f58
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetDefaultName.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultName () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return 'CC engine logistics cost reports';
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetStockingPointCCLine.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetStockingPointCCLine.qbl
new file mode 100644
index 0000000..1e19bf6
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetStockingPointCCLine.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetStockingPointCCLine () as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-28-2024 (created)
+    //return '闀挎槬瑁呴厤绾胯竟搴�';
+    return '闀挎槬瑁呴厤绾�';
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetStockingPointCCRent.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetStockingPointCCRent.qbl
new file mode 100644
index 0000000..d1d47c2
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_GetStockingPointCCRent.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetStockingPointCCRent () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-28-2024 (created)
+    return '闀挎槬澶栫搴�';
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
new file mode 100644
index 0000000..a7bf76a
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -0,0 +1,124 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Initialize (
+  MacroPlan owner
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-12-2024 (created)
+    owner.CCEngineLogisticsCostReport( relflush );
+    name                      := CCEngineLogisticsCostReport::GetDefaultName();
+    allunit                   := CCEngineLogisticsCostReport::GetDefaultAllUnit();
+    ccunit                    := CCEngineLogisticsCostReport::GetDefaultCCUnit();
+    ccline                    := CCEngineLogisticsCostReport::GetStockingPointCCLine();
+    ccrent                    := CCEngineLogisticsCostReport::GetStockingPointCCRent();
+    
+    startofplanning           := owner.StartOfPlanning().Date();
+    //startofyear               := startofplanning.StartOfYear();
+    startofnextyear           := startofplanning.StartOfNextYear();
+    
+    table                     := owner.CCEngineLogisticsCostReport( relnew, ID := name, Name := name );
+    showtable                 := owner.CCEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
+    search                    := owner.CCEngineLogisticsCostSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit );
+    
+    products                  := construct( Product_MPs );
+    
+    table.GenerateColumn( owner );
+    //澶栫搴撳叆搴撹垂鐢細鍙栬嚜璐㈠姟浜ч噺鎶ヨ〃鐨勪骇閲忥紝鍦ㄤ骇鍝佽〃鏍规嵁鍙戝姩鏈哄彿鎵惧埌瀵瑰簲鐨凣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' ) ){//璐㈠姟浜ч噺鎶ヨ〃閲岀殑闀挎槬浜ч噺, 涓嶄负0
+          ccrow               := table.GetRow( row.Name() );
+          //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
+          enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Product() = row.Name() );
+          traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){
+            //鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环锛屽叆搴撻噺绛変簬闀挎槬浜ч噺
+            quantity          := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
+            column            := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() );
+            //澶栫搴撳叆搴撹垂鐢�
+            ccrow.SetRentEnterCost( column, quantity );
+          }
+        }
+      }
+    }
+    //澶栫搴撳嚭搴撹垂鐢細鍑哄簱閲忕瓑浜庨暱鏄ラ攢閲忥紝鍙栬嚜璐㈠姟閿�閲忔姤琛ㄧ殑閿�閲忥紝鍦ㄤ骇鍝佽〃鏍规嵁鍙戝姩鏈哄彿鎵惧埌瀵瑰簲鐨凣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' ) ){//璐㈠姟閿�閲忔姤琛ㄩ噷鐨勯暱鏄ヤ骇閲�, 涓嶄负0
+          ccrow               := table.GetRow( row.Name() );
+          //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
+          enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Product() = row.Name() );
+          traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){
+            //鍑哄簱閲�/鍖呰瀹归噺*鍑哄簱鍗曚环锛屽叆搴撻噺绛変簬闀挎槬閿�閲�
+            quantity          := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
+            column            := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() );
+            //澶栫搴撳嚭搴撹垂鐢�
+            ccrow.SetRentOutCost( column, quantity );
+          }
+        }
+      }
+    }
+    //鍘傚唴鍒板绉熷簱杩愯緭璐圭敤锛氾紝鍦� trip plan閲屾壘鍒伴暱鏄ヨ閰嶇嚎杈瑰簱鍒伴暱鏄ュ绉熷簱鐨勮繍杈撴暟閲忥紝锛岋紝鐢ㄥ叕寮忚绠楀緱鍑虹粨鏋滐紝鏈堝害杩涜姹囨��
+    traverse( owner, Unit.Lane.LaneLeg, laneleg ){
+      //璧峰搴撳瓨鐐规槸鍚︽槸闀挎槬瑁呴厤绾胯竟搴�
+      originsp               := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.OriginStockingPointID() );
+      isccspline             := table.IsInUnit( originsp, ccline );
+      //鐩殑鍦版槸鍚︽槸闀挎槬澶栫搴�
+      destisp                := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.DestinationStockingPointID() );
+      isccrent               := table.IsInUnit( destisp, ccrent );
+      if( isccspline and isccrent ){
+        traverse( laneleg, Trip, trip, trip.Arrival().Date() < startofnextyear ){
+          periodtime         := trip.Arrival().StartOfMonth().Date();
+          periodname         := periodtime.Format( "M2/D2/Y" );
+          
+          column             := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
+          traverse( trip, ProductInTrip, pit, pit.Quantity() = 0 ){
+            row              := table.GetRow( pit.ProductID() );
+            //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
+            enginecost       := selectobject( owner, LogisticsCostEngine, engine, engine.Product() = row.Name() );
+            //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
+            transcost        := selectobject( owner, LogisticsCostTransport, trans, trans.Product() = row.Name() );
+            //杩愯緭鏁伴噺/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环
+            quantity         := ceil( ceil( [Number]pit.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//鍥涜垗浜斿叆
+            
+            row.SetFactoryToRentTransCost( column, quantity );
+          }
+        }
+      }
+    }
+    //澶栫搴撲粨鍌ㄨ垂鐢細浠撳偍鏁伴噺/鍖呰瀹归噺*浠撳偍鍗曚环锛屽湪Actual inventories閲屽彇鍒伴暱鏄ュ绉熷簱璇ュ彂鍔ㄦ満鐨勪粨鍌ㄩ噺锛屾牴鎹彂鍔ㄦ満鍙锋壘鍒板搴旂殑Generation 鍜屾í绾靛埗锛屽湪鍙戝姩鏈烘垚鏈弬鏁拌〃閲屾壘鍒板搴旂殑浠撳偍鍗曚环鍜屽寘瑁呭閲忥紝鐢ㄥ叕寮忚绠楋紝鏈堝害杩涜姹囨��
+    traverse( owner, StockingPoint_MP, stockingpoint ){
+      //鏄惁灞炰簬闀挎槬澶栫搴�
+      isccrent               := table.IsInUnit( stockingpoint, ccrent );
+      if( isccrent ){
+        traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() ){
+          //鑾峰彇琛�
+          row                := table.GetRow( pisp.ProductID() );
+          //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
+          enginecost         := selectobject( owner, LogisticsCostEngine, engine, engine.Product() = row.Name() );
+          products.Add( pisp.Product_MP() );
+          //褰損roduct planning鐨勬棩鏈熷尯闂村湪闇�瑕佺殑鏃ユ湡鍖洪棿鍐� 
+          traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear
+                    ){
+            periodtime := pispip.Start().StartOfMonth().Date();
+            periodname := periodtime.Format( "M2/D2/Y" );
+            quantity   := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
+            
+            column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
+            
+            row.SetRentStorageCost( column, quantity );
+          }    
+        }
+      }
+    }
+    rows := selectsortedset( table, Row, row, row.Name() );
+    i    := 0;
+    traverse( rows, Elements, e ){
+      e.RowNr( i );
+      i := i + 1;
+    }
+    //
+    showtable.Generate( search, products );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/_ROOT_Type_CCEngineLogisticsCostReport.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/_ROOT_Type_CCEngineLogisticsCostReport.qbl
new file mode 100644
index 0000000..763f27b
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/_ROOT_Type_CCEngineLogisticsCostReport.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type CCEngineLogisticsCostReport
+{
+  #keys: '5[415136.0.986400937][415136.0.986400935][0.0.0][415136.0.986400936][415136.0.986400938]'
+  BaseType: Object
+  Description: '闀挎槬鍙戝姩鏈虹墿娴佹垚鏈姤琛�'
+  StructuredName: 'CCEngineLogisticsCostReports'
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow/Attribute_Name.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow/Attribute_Name.qbl
new file mode 100644
index 0000000..c4671b2
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow/Attribute_Name.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+  #keys: '3[415136.0.986400984][415136.0.986400983][415136.0.986400985]'
+  Description: '鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow/Attribute_RowNr.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow/Attribute_RowNr.qbl
new file mode 100644
index 0000000..3be673c
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow/Attribute_RowNr.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute RowNr
+{
+  #keys: '3[415136.0.986616244][415136.0.986616243][415136.0.986616245]'
+  Description: '琛屽彿'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow/DefaultValue_Name.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow/DefaultValue_Name.qbl
new file mode 100644
index 0000000..86c3d59
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow/DefaultValue_Name.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Name
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow/Method_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_Initialize.qbl
new file mode 100644
index 0000000..3dfa50b
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_Initialize.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+Method Initialize (
+  CCEngineLogisticsCostColumn column
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-24-2024 (created)
+    cell := this.Cell( relnew, RentEnterCost         := 0
+                         , RentOutCost                 := 0 
+                         , FactoryToRentTransCost      := 0
+                         , RentStorageCost             := 0 );
+    
+    column.Cell( relinsert, cell );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetFactoryToRentTransCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetFactoryToRentTransCost.qbl
new file mode 100644
index 0000000..5f18e61
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetFactoryToRentTransCost.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetFactoryToRentTransCost (
+  CCEngineLogisticsCostColumn column,
+  Number quantity
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-24-2024 (created)
+    cell := selectobject( this, Cell, cell, cell.Column() = column );
+          
+    value := cell.FactoryToRentTransCost() + quantity;
+    cell.FactoryToRentTransCost( value );
+  *]
+}
diff --git "a/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentEnterCost\043517.qbl" "b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentEnterCost\043517.qbl"
new file mode 100644
index 0000000..9e1a6db
--- /dev/null
+++ "b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentEnterCost\043517.qbl"
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetRentEnterCost (
+  CCEngineLogisticsCostColumn column,
+  Number quantity
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-24-2024 (created)
+    cell := selectobject( this, Cell, cell, cell.Column() = column );
+          
+    value := cell.RentEnterCost() + quantity;
+    cell.RentEnterCost( value );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentOutCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentOutCost.qbl
new file mode 100644
index 0000000..4bc1338
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentOutCost.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetRentOutCost (
+  CCEngineLogisticsCostColumn column,
+  Number quantity
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-24-2024 (created)
+    cell := selectobject( this, Cell, cell, cell.Column() = column );
+          
+    value := cell.RentOutCost() + quantity;
+    cell.RentOutCost( value );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentStorageCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentStorageCost.qbl
new file mode 100644
index 0000000..ed29d5b
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow/Method_SetRentStorageCost.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetRentStorageCost (
+  CCEngineLogisticsCostColumn column,
+  Number quantity
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-24-2024 (created)
+    cell := selectobject( this, Cell, cell, cell.Column() = column );
+          
+    value := cell.RentStorageCost() + quantity;
+    cell.RentStorageCost( value );
+  *]
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow/_ROOT_Type_CCEngineLogisticsCostRow.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow/_ROOT_Type_CCEngineLogisticsCostRow.qbl
new file mode 100644
index 0000000..e879ecf
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow/_ROOT_Type_CCEngineLogisticsCostRow.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type CCEngineLogisticsCostRow
+{
+  #keys: '5[415136.0.986400975][415136.0.986400973][0.0.0][415136.0.986400974][415136.0.986400976]'
+  BaseType: Object
+  Description: '闀挎槬鍙戝姩鏈虹墿娴佹垚鏈姤琛ㄨ'
+  StructuredName: 'CCEngineLogisticsCostRows'
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_Generation.qbl b/_Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_Generation.qbl
new file mode 100644
index 0000000..9fe72ca
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_Generation.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Generation
+{
+  #keys: '3[415136.0.986844795][415136.0.986844794][415136.0.986844796]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_MqbMlb.qbl b/_Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_MqbMlb.qbl
new file mode 100644
index 0000000..9cbf262
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_MqbMlb.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute MqbMlb
+{
+  #keys: '3[415136.0.986844798][415136.0.986844797][415136.0.986844799]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_Power.qbl b/_Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_Power.qbl
new file mode 100644
index 0000000..5e899bd
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostSearch/Attribute_Power.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Power
+{
+  #keys: '3[415136.0.986844801][415136.0.986844800][415136.0.986844802]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_Generation.qbl b/_Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_Generation.qbl
new file mode 100644
index 0000000..9e5b51e
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_Generation.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Generation
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_MqbMlb.qbl b/_Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_MqbMlb.qbl
new file mode 100644
index 0000000..78982c5
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_MqbMlb.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: MqbMlb
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_Power.qbl b/_Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_Power.qbl
new file mode 100644
index 0000000..4922731
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostSearch/DefaultValue_Power.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Power
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostSearch/_ROOT_Type_CCEngineLogisticsCostSearch.qbl b/_Main/BL/Type_CCEngineLogisticsCostSearch/_ROOT_Type_CCEngineLogisticsCostSearch.qbl
new file mode 100644
index 0000000..a622989
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostSearch/_ROOT_Type_CCEngineLogisticsCostSearch.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type CCEngineLogisticsCostSearch
+{
+  #keys: '5[415136.0.986844792][415136.0.986844790][0.0.0][415136.0.986844791][415136.0.986844793]'
+  BaseType: Object
+  Description: '闀挎槬鍙戝姩鏈虹墿娴佹垚鏈姤琛ㄦ煡璇㈢被'
+  StructuredName: 'CCEngineLogisticsCostSearchs'
+}
diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
index e2ac2ed..a2ed74a 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
@@ -99,17 +99,20 @@
       isccrent              := table.IsInUnit( destisp, ccrent );
       if( isdlspline and isccrent ){
         traverse( laneleg, Trip, trip, trip.Arrival() < startofnextyearlead ){
-          periodtime        := ( trip.Arrival() - FinancialSalesReport::GetDefaultTripLeadingTime() ).StartOfMonth().Date();
+    //      periodtime        := ( trip.Arrival() - FinancialSalesReport::GetDefaultTripLeadingTime() ).StartOfMonth().Date();
+          periodtime        := trip.Departure().StartOfMonth().Date();
           periodname        := periodtime.Format( "M2/D2/Y" );
           
           column            := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime );
-          traverse( trip, ProductInTrip, pit ){
-            quantity        := [Number]pit.Quantity();//鍥涜垗浜斿叆
-            dlrow           := table.GetRow( dlunit, pit.Product_MP() );
-            dlrow.Initialize( column, quantity );//姹囨�绘暟閲�
-            
-            allrow          := table.GetRow( allunit, pit.Product_MP() );
-            allrow.Initialize( column, quantity );
+          if( not isnull( column ) ){
+            traverse( trip, ProductInTrip, pit ){
+              quantity        := [Number]pit.Quantity();//鍥涜垗浜斿叆
+              dlrow           := table.GetRow( dlunit, pit.Product_MP() );
+              dlrow.Initialize( column, quantity );//姹囨�绘暟閲�
+              
+              allrow          := table.GetRow( allunit, pit.Product_MP() );
+              allrow.Initialize( column, quantity );
+            }
           }
         }
       }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
index a385b33..04e16d7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
@@ -130,6 +130,21 @@
         Taborder: 9
       ]
     }
+    Component ButtonEngineLogisticsCostReport
+    {
+      #keys: '[415136.0.989557433]'
+      BaseType: 'WebButton'
+      Children:
+      [
+        #child: ContextMenuEngineLogisticsCostReport
+      ]
+      Properties:
+      [
+        Image: 'MONEY2'
+        Label: 'engine logistics cost report '
+        Taborder: 10
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuEngineLogisticsCostReport.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuEngineLogisticsCostReport.def
new file mode 100644
index 0000000..a78b527
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuEngineLogisticsCostReport.def
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+Component ContextMenuEngineLogisticsCostReport
+{
+  #keys: '[415136.0.989557478]'
+  BaseType: 'WebContextMenu'
+  Children:
+  [
+    Component MenuCCEngineLogisticsCostReport
+    {
+      #keys: '[415136.0.989557479]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'MONEY2'
+        Taborder: 0
+        Title: 'CC engine logistics cost report'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_MenuCCEngineLogis.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_MenuCCEngineLogis.def
new file mode 100644
index 0000000..3362b31
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_MenuCCEngineLogis.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ContextMenuEngineLogisticsCostReport/MenuCCEngineLogisticsCostReport
+Response OnClick () id:Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_MenuCCEngineLogisticsCostReport_OnClick
+{
+  #keys: '[415136.0.989557681]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      ApplicationScope.ViewManager().ResetUserViewById( "CC_engine_logistics_cost_report_view", true);
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_MatrixEditorTable\043358.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_MatrixEditorTable\043358.def"
new file mode 100644
index 0000000..272ae5a
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_MatrixEditorTable\043358.def"
@@ -0,0 +1,98 @@
+Quintiq file version 2.0
+Component MatrixEditorTable id:MatrixEditorTable_358
+{
+  #keys: '[415136.0.989500591]'
+  BaseType: 'WebMatrixEditor'
+  Children:
+  [
+    Component MatrixEditorCellTable
+    {
+      #keys: '[415136.0.989500592]'
+      BaseType: 'WebMatrixEditorCell'
+      Children:
+      [
+        Component DataExtractorCell
+        {
+          #keys: '[415136.0.989500593]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'CCEngineLogisticsCostReport'
+            Source: 'DataHolderTable'
+            Taborder: 0
+            Transformation: 'Row.Cell'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Attributes: 'Value'
+        Column: 'FinancialProductionColumn'
+        Row: 'FinancialProductionRow'
+        Taborder: 0
+      ]
+    }
+    Component MatrixEditorRowsTable
+    {
+      #keys: '[415136.0.989500594]'
+      BaseType: 'WebMatrixEditorHeaderLevel'
+      Children:
+      [
+        Component DataExtractorRow
+        {
+          #keys: '[415136.0.989500595]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'CCEngineLogisticsCostReport'
+            Source: 'DataHolderTable'
+            Taborder: 0
+            Transformation: 'Row'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Legend: 'Name'
+        SortCriteria: 'RowNr'
+        Taborder: 1
+      ]
+    }
+    Component MatrixEditorColumnsTable
+    {
+      #keys: '[415136.0.989500596]'
+      BaseType: 'WebMatrixEditorHeaderLevel'
+      Children:
+      [
+        Component DataExtractorColumn
+        {
+          #keys: '[415136.0.989500597]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'CCEngineLogisticsCostReport'
+            Source: 'DataHolderTable'
+            Taborder: 0
+            Transformation: 'Column'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Legend: 'Name'
+        SortCriteria: 'Index'
+        Taborder: 2
+      ]
+    }
+    #child: matrixEditorActionBarPageTable_1
+    #child: matrixeditorContextMenuTable_1
+  ]
+  Properties:
+  [
+    AllowMultipleAttributes: true
+    Columns: 'MatrixEditorColumnsTable'
+    ContextMenu: 'matrixeditorContextMenuTable'
+    Rows: 'MatrixEditorRowsTable'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelCCEngineLogisticsCostReportHeader.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelCCEngineLogisticsCostReportHeader.def
new file mode 100644
index 0000000..c2ab378
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelCCEngineLogisticsCostReportHeader.def
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+Component PanelCCEngineLogisticsCostReportHeader
+{
+  #keys: '[415136.0.989500449]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: PanelCCEngineLogisticsCostReportSearch
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Taborder: 2
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelCCEngineLogisticsCostReportSearch.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelCCEngineLogisticsCostReportSearch.def
new file mode 100644
index 0000000..ce604b5
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelCCEngineLogisticsCostReportSearch.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+Component PanelCCEngineLogisticsCostReportSearch
+{
+  #keys: '[415136.0.989500450]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: PanelExport_670
+    #child: PanelPower_653
+    #child: PanelMQBMLB_667
+    #child: PanelGeneration_969
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 0
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelExport\043670.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelExport\043670.def"
new file mode 100644
index 0000000..bb0fe40
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelExport\043670.def"
@@ -0,0 +1,34 @@
+Quintiq file version 2.0
+Component PanelExport id:PanelExport_670
+{
+  #keys: '[415136.0.989500459]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ButtonExport
+    {
+      #keys: '[415136.0.989500460]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'EXPORT1'
+        Taborder: 1
+      ]
+    }
+    Component ButtonSearch
+    {
+      #keys: '[415136.0.989500461]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'VIEW'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Orientation: 'horizontal'
+    Taborder: 3
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelGeneration\043969.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelGeneration\043969.def"
new file mode 100644
index 0000000..98fd409
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelGeneration\043969.def"
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+Component PanelGeneration id:PanelGeneration_969
+{
+  #keys: '[415136.0.989500453]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ddslGeneration
+    {
+      #keys: '[415136.0.989500454]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        Label: 'Generation'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Orientation: 'horizontal'
+    Taborder: 0
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelMQBMLB\043667.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelMQBMLB\043667.def"
new file mode 100644
index 0000000..095d66d
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelMQBMLB\043667.def"
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+Component PanelMQBMLB id:PanelMQBMLB_667
+{
+  #keys: '[415136.0.989500455]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ddslMQBMLB
+    {
+      #keys: '[415136.0.989500456]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        Label: 'MQB/MLB'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Orientation: 'horizontal'
+    Taborder: 1
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelPower\043653.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelPower\043653.def"
new file mode 100644
index 0000000..8631fe8
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelPower\043653.def"
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+Component PanelPower id:PanelPower_653
+{
+  #keys: '[415136.0.989500457]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ddslPower
+    {
+      #keys: '[415136.0.989500458]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        Label: 'Power'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Orientation: 'horizontal'
+    Taborder: 2
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelTable\043211.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelTable\043211.def"
new file mode 100644
index 0000000..8bec6f3
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_PanelTable\043211.def"
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+Component PanelTable id:PanelTable_211
+{
+  #keys: '[415136.0.989500590]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: MatrixEditorTable_358
+  ]
+  Properties:
+  [
+    Taborder: 3
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_matrixEditorActionBarPageTable\0431.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_matrixEditorActionBarPageTable\0431.def"
new file mode 100644
index 0000000..84c5a9d
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_matrixEditorActionBarPageTable\0431.def"
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component matrixEditorActionBarPageTable id:matrixEditorActionBarPageTable_1
+{
+  #keys: '[415136.0.989500598]'
+  BaseType: 'matrixEditorActionBarPage'
+  Properties:
+  [
+    Taborder: 3
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_matrixeditorContextMenuTable\0431.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_matrixeditorContextMenuTable\0431.def"
new file mode 100644
index 0000000..02ffa78
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Component_matrixeditorContextMenuTable\0431.def"
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component matrixeditorContextMenuTable id:matrixeditorContextMenuTable_1
+{
+  #keys: '[415136.0.989500599]'
+  BaseType: 'matrixeditorContextMenu'
+  Properties:
+  [
+    Taborder: 4
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_MatrixEditorTable_358_OnUpdateValue.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_MatrixEditorTable_358_OnUpdateValue.def
new file mode 100644
index 0000000..def875e
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_MatrixEditorTable_358_OnUpdateValue.def
@@ -0,0 +1,31 @@
+Quintiq file version 2.0
+#parent: MatrixEditorTable_358
+Response OnUpdateValue (
+  CCEngineLogisticsCostRow row,
+  CCEngineLogisticsCostColumn column,
+  CCEngineLogisticsCostCell cell,
+  Number value,
+  Number oldvalue
+) id:Response_MatrixEditorTable_358_OnUpdateValue
+{
+  #keys: '[415136.0.989501207]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
+  QuillAction
+  {
+    Body:
+    [*
+      table            := selectobject( MacroPlan, CCEngineLogisticsCostReport, report, not report.IsShow() );
+      traverse( table, Row, trow, trow.Name() = row.Name() ){
+        traverse( trow, Cell, tcel, tcel.Column().Name() = column.Name() ){
+          tcel.RentEnterCost( cell.RentEnterCost() );
+          tcel.RentOutCost( cell.RentOutCost() );
+          tcel.FactoryToRentTransCost( cell.FactoryToRentTransCost() );
+          tcel.RentStorageCost( cell.RentStorageCost() );
+          tcel.Coefficient( cell.Coefficient() );
+        }
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_OnCreated.def
new file mode 100644
index 0000000..0061f31
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_OnCreated.def
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: #root
+Response OnCreated () id:Response_FormCCEngineLogisticsCostReport_OnCreated
+{
+  #keys: '[415136.0.989500680]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      //鍒濆鍖�
+      //if( not exists( MacroPlan, FinancialProductionSource, source, not source.IsImport() ) ){
+        CCEngineLogisticsCostReport::Initialize( MacroPlan );
+      //}
+      //info( '------------------1----------------' );
+      table := selectobject( MacroPlan, CCEngineLogisticsCostReport, table, table.IsShow() );
+      //info( '------------------2----------------', table.IsImport(), table.IsShow() );
+      DataHolderTable.Data( table );
+      
+      dhSearch.Data( table.MacroPlan().CCEngineLogisticsCostSearch() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonExport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonExport_OnClick.def
new file mode 100644
index 0000000..3956972
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonExport_OnClick.def
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: PanelExport_670/ButtonExport
+Response OnClick () id:Response_PanelExport_670_ButtonExport_OnClick
+{
+  #keys: '[415136.0.989500440]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      binaryValue := CCEngineLogisticsCostReport::Download( MacroPlan );
+      
+      Application.Download( CCEngineLogisticsCostReport::GetDefaultName() + '.xlsx', binaryValue.AsBinaryData() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonSearch_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonSearch_OnClick.def
new file mode 100644
index 0000000..0396f68
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonSearch_OnClick.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: PanelExport_670/ButtonSearch
+Response OnClick () id:Response_PanelExport_670_ButtonSearch_OnClick
+{
+  #keys: '[415136.0.989500439]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelGeneration_969_ddslGeneration_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelGeneration_969_ddslGeneration_OnCreated.def
new file mode 100644
index 0000000..845a6c6
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelGeneration_969_ddslGeneration_OnCreated.def
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: PanelGeneration_969/ddslGeneration
+Response OnCreated () id:Response_PanelGeneration_969_ddslGeneration_OnCreated
+{
+  #keys: '[415136.0.989500446]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.Generation() );
+      
+      valueString := values.Concatenate( ";" );
+      valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" );
+      
+      valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString;
+      
+      this.Strings( valueString );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelGeneration_969_ddslGeneration_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelGeneration_969_ddslGeneration_OnSelectionChanged.def
new file mode 100644
index 0000000..a3099b3
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelGeneration_969_ddslGeneration_OnSelectionChanged.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelGeneration_969/ddslGeneration
+Response OnSelectionChanged () id:Response_PanelGeneration_969_ddslGeneration_OnSelectionChanged
+{
+  #keys: '[415136.0.989500445]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      if( dhSearch.Data().Generation() <> selection ){
+        dhSearch.Data().Generation( selection );
+      //  DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() );
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelMQBMLB_667_ddslMQBMLB_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelMQBMLB_667_ddslMQBMLB_OnCreated.def
new file mode 100644
index 0000000..4c3fe96
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelMQBMLB_667_ddslMQBMLB_OnCreated.def
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: PanelMQBMLB_667/ddslMQBMLB
+Response OnCreated () id:Response_PanelMQBMLB_667_ddslMQBMLB_OnCreated
+{
+  #keys: '[415136.0.989500444]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.MQBMLB() );
+      
+      valueString := values.Concatenate( ";" );
+      valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" );
+      
+      valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString;
+      
+      this.Strings( valueString );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelMQBMLB_667_ddslMQBMLB_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelMQBMLB_667_ddslMQBMLB_OnSelectionChanged.def
new file mode 100644
index 0000000..6514388
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelMQBMLB_667_ddslMQBMLB_OnSelectionChanged.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelMQBMLB_667/ddslMQBMLB
+Response OnSelectionChanged () id:Response_PanelMQBMLB_667_ddslMQBMLB_OnSelectionChanged
+{
+  #keys: '[415136.0.989500443]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      if( dhSearch.Data().MqbMlb() <> selection ){
+        dhSearch.Data().MqbMlb( selection );
+      //  DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() );
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelPower_653_ddslPower_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelPower_653_ddslPower_OnCreated.def
new file mode 100644
index 0000000..8e2b817
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelPower_653_ddslPower_OnCreated.def
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: PanelPower_653/ddslPower
+Response OnCreated () id:Response_PanelPower_653_ddslPower_OnCreated
+{
+  #keys: '[415136.0.989500442]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.Power() );
+      
+      valueString := values.Concatenate( ";" );
+      valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" );
+      
+      valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString;
+      
+      this.Strings( valueString );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelPower_653_ddslPower_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelPower_653_ddslPower_OnSelectionChanged.def
new file mode 100644
index 0000000..a5e290e
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelPower_653_ddslPower_OnSelectionChanged.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelPower_653/ddslPower
+Response OnSelectionChanged () id:Response_PanelPower_653_ddslPower_OnSelectionChanged
+{
+  #keys: '[415136.0.989500441]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      if( dhSearch.Data().Power() <> selection ){
+        dhSearch.Data().Power( selection );
+      //  DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() );
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/_ROOT_Component_FormCCEngineLogisticsCostReport.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/_ROOT_Component_FormCCEngineLogisticsCostReport.def
new file mode 100644
index 0000000..b273698
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/_ROOT_Component_FormCCEngineLogisticsCostReport.def
@@ -0,0 +1,38 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent FormCCEngineLogisticsCostReport
+{
+  #keys: '[415136.0.989500338]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    Component DataHolderTable id:DataHolderTable_437
+    {
+      #keys: '[415136.0.989500367]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'CCEngineLogisticsCostReport'
+      Properties:
+      [
+        Taborder: 0
+      ]
+    }
+    Component dhSearch id:dhSearch_902
+    {
+      #keys: '[415136.0.989500384]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'CCEngineLogisticsCostSearch'
+      Properties:
+      [
+        Taborder: 1
+      ]
+    }
+    #child: PanelCCEngineLogisticsCostReportHeader
+    #child: PanelTable_211
+  ]
+  Properties:
+  [
+    Image: 'MONEY2'
+    Title: 'CC engine logistics cost report'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/CC_engine_logistics_cost_report_view.vw b/_Main/UI/MacroPlannerWebApp/Views/CC_engine_logistics_cost_report_view.vw
new file mode 100644
index 0000000..d2ca7d4
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Views/CC_engine_logistics_cost_report_view.vw
@@ -0,0 +1,104 @@
+Quintiq file version 2.0
+{
+  viewcontents
+  {
+    forms
+    {
+      form_FormCCEngineLogisticsCostReport
+      {
+        title: 'QMacroPlanner::FormCCEngineLogisticsCostReport'
+        shown: true
+        componentID: 'QMacroPlanner::FormCCEngineLogisticsCostReport'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 15
+          columnPosition: 1
+          columnSpan: 13
+        }
+        components
+        {
+          FormCCEngineLogisticsCostReport_PanelCCEngineLogisticsCostReportHeader
+          {
+            sizeRatio: 1
+          }
+          FormCCEngineLogisticsCostReport_PanelCCEngineLogisticsCostReportSearch
+          {
+            sizeRatio: 1
+          }
+          FormCCEngineLogisticsCostReport_PanelGeneration
+          {
+            sizeRatio: 1
+          }
+          FormCCEngineLogisticsCostReport_PanelMQBMLB
+          {
+            sizeRatio: 1
+          }
+          FormCCEngineLogisticsCostReport_PanelPower
+          {
+            sizeRatio: 1
+          }
+          FormCCEngineLogisticsCostReport_PanelExport
+          {
+            sizeRatio: 1
+          }
+          FormCCEngineLogisticsCostReport_PanelTable
+          {
+            sizeRatio: 1
+          }
+          FormCCEngineLogisticsCostReport_MatrixEditorTable
+          {
+            gridColor: '#c4c4c4'
+            totalHeaderWidth: 113
+            attributeHeaderWidthRatio: 0.6
+            nameHeaderWidthRatio: 0.4
+            columnWidth: 100
+            horizontalGrid: true
+            verticalGrid: true
+            backendState
+            {
+              componentId: 'QMacroPlanner::FormCCEngineLogisticsCostReport.MatrixEditorTable'
+              state
+              {
+                cells
+                {
+                  attributes
+                  {
+                  }
+                }
+                columns
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'Index'"
+                  }
+                }
+                rows
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'RowNr'"
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    userconfigurableinformation
+    {
+    }
+    page: ''
+    group: ''
+    index: 27
+    image: 'MONEY2'
+    description: ''
+  }
+  formatversion: 2
+  id: 'CC_engine_logistics_cost_report_view'
+  name: 'CC engine logistics cost report view'
+  isglobal: false
+  isroot: true
+}

--
Gitblit v1.9.3