From e528264b38b96ad2f59ba9d7ab5d5b17385cb777 Mon Sep 17 00:00:00 2001
From: Administrator <renhui.hao@capgemini.com>
Date: 星期日, 24 九月 2023 18:58:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'refs/remotes/origin/dev'

---
 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick.def                                                 |   19 
 _Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl                                                                                                           |    4 
 _Main/BL/Type_CapacityAllocationResults/Attribute_VersionNumber.qbl                                                                                               |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/_ROOT_Component_FrmOrderForecast.def                                                                       |    9 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetNextFriday.qbl                                                                                                   |   29 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_list_ForecastView_FOF#670.def                                                                    |    2 
 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel950.def                                                                                            |   25 
 _Main/Sys/Integration/Mapping/PanelMaterialResponseResult1.xml                                                                                                    |    0 
 _Main/BL/Type_H_MaterialInfo/Attribute_MaterialName.qbl                                                                                                           |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel796.def                                                                     |   26 
 _Main/UI/MacroPlannerWebApp/Views/OrderLock.vw                                                                                                                    |  451 +++++--
 _Main/BL/Type_H_MaterialInfo/Attribute_ID.qbl                                                                                                                     |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop264#19.def                                                               |    8 
 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def                                                                                              |   41 
 _Main/BL/Relations/Relation_CapacityAllocationResults_GlobalOTDTable_GlobalOTDTable_CapacityAll.qbl                                                               |   23 
 _var/_Main/ProjSettings/MacroPlannerWebApp/TypeConfigs/CustomerOrder.qtc                                                                                          |   20 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel989.def                                                                     |   24 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl                                                                                                       |   27 
 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def                                                                     |   14 
 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def                                                                             |    4 
 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def                                                                                          |   18 
 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def                                                                           |    2 
 _Main/BL/Type_CapacityAllocationResults/Attribute_PanelMaterialCode.qbl                                                                                           |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_OnCreated.def                                                                     |   43 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def                                        |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def                                                   |   41 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop846#618.def                                                              |   10 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel849.def                                                                                     |    4 
 _Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl                                                                                                   |   40 
 _Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp                                                                                                   |    2 
 _Main/BL/Type_H_MaterialInfo/Attribute_MaterialType.qbl                                                                                                           |    8 
 _Main/BL/Type_H_MessagePassing/Attribute_ValueJsonString.qbl                                                                                                      |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_List696.def                                                                                             |   41 
 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593#93.def                                                                      |   38 
 _Main/BL/Type_CapacityAllocationResults/_ROOT_Type_CapacityAllocationResults.qbl                                                                                  |   10 
 _Main/BL/Type_H_Forecast/Attribute_StockingPointID.qbl                                                                                                            |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_InitialData778_OnClick#971.def                                                       |   35 
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_CustomerCode.qbl                                                                                                  |    8 
 _Main/BL/Type_H_MaterialInfo/Attribute_ParentSKU.qbl                                                                                                              |    8 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_MaterialReverse.qbl                                                                                                 |   65 +
 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def                                                                                   |    4 
 _Main/UI/MacroPlanner/Component_FormTestButtonCollection/_ROOT_Component_FormTestButtonCollection.def                                                             |   50 
 _Main/BL/Type_CapacityAllocationResults/Attribute_ModuleBase.qbl                                                                                                  |    8 
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_ID.qbl                                                                                                            |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def                                                                       |   16 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def                                                                                     |   96 +
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_CustomerName.qbl                                                                                                  |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop#217.def                                                                 |    8 
 _Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl                                                                                               |   28 
 _Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl                                                                                                       |   31 
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_AuthorizeQty.qbl                                                                                                  |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/_ROOT_Component_FrmAuthorizeAndCountersign_Material.def                                 |    1 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel261#223.def                                                                 |   10 
 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def                                                                                          |   33 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick#222.def                                                  |   58 
 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def                                                                      |   15 
 _Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration.qbl                                                                                      |   55 
 _Main/BL/Type_H_MaterialHedgingResult/DefaultValue_SKU.qbl                                                                                                        |    6 
 _Main/BL/Type_CapacityAllocationResults/Attribute_ModuleMaterialCode.qbl                                                                                          |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def                                         |   11 
 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock#844.def                                                                               |    2 
 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Response_Panel224_btn_Query_FRAS_OnClick.def                                                                      |   20 
 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def                                                                            |    6 
 _Main/BL/Relations/Relation_H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo.qbl                                                                                 |   23 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl                                                                                                 |  104 +
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop360#136.def                                                              |    8 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl                                                                                                    |  200 +++
 _Main/BL/Type_CapacityAllocationResults/Attribute_NumberOfModules.qbl                                                                                             |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def                                                               |   14 
 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def                                                                              |   44 
 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def                                                                                     |   24 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel383.def                                                                                     |    1 
 _Main/BL/Relations/Relation_H_MaterialHedgingResult_MacroPlan_MacroPlan_H_MaterialHedgingResult.qbl                                                               |   23 
 _Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def                                                                     |    3 
 _Main/BL/Type_CapacityAllocationResults/Attribute_RequirementDate.qbl                                                                                             |    8 
 _Main/BL/Type_H_MaterialInfo/Attribute_Unit.qbl                                                                                                                   |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def                                             |   28 
 _Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl                                                                                                      |    2 
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_ForecastQty.qbl                                                                                                   |    8 
 _Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def                                                                                               |    2 
 _Main/BL/Type_CapacityAllocationResults/Attribute_PanelBase.qbl                                                                                                   |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase354.def                                                                 |   26 
 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def                                                                                       |   61 +
 _Main/Sys/Integration/Brokers/PanelMaterialResponseResult1.xml                                                                                                    |    0 
 _Main/BL/Type_CapacityAllocationResults/Attribute_NumberOfPanels.qbl                                                                                              |    8 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl                                                                                                     |   18 
 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_listContextMenu660.def                                                                                  |    4 
 _Main/BL/Type_H_MaterialInfo/Attribute_NeedDate.qbl                                                                                                               |    8 
 _Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def                                                                               |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def                                                                        |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_PanelReleaseRecord423.def                                                                       |   26 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl                                                                                                    |   22 
 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader#545.def                                                                        |   16 
 _Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def                                                                           |   12 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/_ROOT_Component_FrmAuthorizeAndCountersign_Order.def                                       |   28 
 _Main/BL/Type_H_MaterialHedgingResult/DefaultValue_ID.qbl                                                                                                         |    6 
 _Main/BL/Type_CapacityAllocationResults/Attribute_ModuleMeasurementUnit.qbl                                                                                       |    8 
 _Main/BL/Type_MPSync/Method_RefreshCapacityAndSaleBudgeFilter#323.qbl                                                                                             |   15 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_Add_Order_FOF_OnClick.def                                                            |    2 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo#1.qbl                                                                                                |   19 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel647.def                                                                                     |    2 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def                                                                    |   33 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/_ROOT_Component_FrmOrderResult.def                                                                           |    1 
 _Main/BL/Type_H_MaterialInfo/Attribute_SKU.qbl                                                                                                                    |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def                              |   10 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop612#612.def                                                              |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick#975.def                                                                    |   54 
 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def                              |    2 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl                                                                                              |  111 +
 _Main/BL/Type_ScenarioManager/StaticMethod_GeneratesTheSpecifiedXMLColumn.qbl                                                                                     |   23 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonExportCompare_OnClick.def                                                    |   21 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_OrderH_FOF_OnClick.def                                                               |   16 
 _Main/BL/Type_CapacityAllocationResults/Attribute_PanelMeasurementUnit.qbl                                                                                        |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def                                                                                     |   37 
 _Main/BL/Type_H_MaterialHedgingResult/DefaultValue_CustomerCode.qbl                                                                                               |    6 
 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel224.def                                                                                            |   49 
 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog221.def                                                                         |   26 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop597#324.def                                                              |    8 
 _Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl                                                                              |   25 
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_SKU.qbl                                                                                                           |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def                                                                  |   25 
 _Main/Sys/Integration/Structure/PanelMaterialResponseResult1_from.xml                                                                                             |    0 
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_Unit.qbl                                                                                                          |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Order_FOF449_OnClick#880.def                                                     |   43 
 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def                                                                                 |   20 
 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl                                                                                            |  120 ++
 _Main/BL/Type_H_MaterialInfo/Attribute_VCode.qbl                                                                                                                  |    8 
 _Main/BL/Type_H_MaterialHedgingResult/_ROOT_Type_H_MaterialHedgingResult.qbl                                                                                      |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick.def                                      |   18 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnClose.def                                                                                       |    3 
 _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl                                                                                              |   15 
 _Main/BL/Type_H_MaterialInfo/_ROOT_Type_H_MaterialInfo.qbl                                                                                                        |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def                                       |    2 
 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button687_OnClick.def                                                                                     |   16 
 _Main/BL/Type_H_MaterialInfo/Attribute_StockPoint.qbl                                                                                                             |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def                                                                                           |    4 
 _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompareExport.qbl                                                                                        |   42 
 _Main/BL/Type_H_MaterialInfo/Attribute_NeedQty.qbl                                                                                                                |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def                                      |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterPlaceOfProductionOfArray/Component_ListCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.def |    2 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_liH_Forecast.def                                                                                 |    4 
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_ReverseQty.qbl                                                                                                    |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_Panel261_223_btn_Cancel_FAAC_OnClick.def                                          |   16 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop104#150.def                                                              |   10 
 _Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def                                                                                        |    2 
 _Main/BL/Type_H_MaterialInfo/Attribute_ForecastID.qbl                                                                                                             |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_listActionBarPage112.def                                                                                |    4 
 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Response_OnCreated.def                                                                                            |   16 
 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/_ROOT_Component_FrmRAShow.def                                                                                     |   33 
 _Main/UI/MacroPlannerWebApp/Component_Form234/_ROOT_Component_FrmOrderResultEx#234.def                                                                            |    1 
 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def                                                                                 |    4 
 _Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse#1.qbl                                             |   15 
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_MType.qbl                                                                                                         |    8 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop744#568.def                                                              |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def                                                                    |    4 
 _Main/BL/Type_H_MaterialHedgingResult/Attribute_Serial.qbl                                                                                                        |    8 
 _Main/Sys/Integration/Structure/PanelMaterialResponseResult1_to.xml                                                                                               |    0 
 /dev/null                                                                                                                                                         |   42 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterBusinessType/Component_ListCapacityAndSaleBudgeFilterBusinessType.def                         |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def                                                         |   10 
 _Main/BL/Type_CapacityAllocationResults/Attribute_Division.qbl                                                                                                    |    8 
 _Main/BL/Type_H_MaterialInfo/Attribute_OrgCode.qbl                                                                                                                |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_ButtonGenerateCapacityAllocationResults_OnClick.def                                  |   16 
 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_Panel261_223_btn_OK_FAAC_OnClick.def                                              |   37 
 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def                                                                                    |    2 
 165 files changed, 3,150 insertions(+), 400 deletions(-)

diff --git "a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl" "b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl"
index 3692157..7a5e360 100644
--- "a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl"
+++ "b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl"
@@ -2,8 +2,21 @@
 #parent: #root
 ContentMapperProcessor ContentMapperReponse
 {
-  DefaultMappingName: 'PanelMaterialResponseResult'
   PosX: 330
   PosY: 450
   ReplyChannelOutputs: QuintiqEndpoint
+  ConditionalMapping
+  {
+    ExpectedValue: '/panelMaterial/send'
+    MappingName: 'PanelMaterialResponseResult1'
+    SourceMessagePath
+    {
+      Path: 'Header'
+    }
+    SourceMessagePath
+    {
+      Path: 'path'
+      SequenceNr: 1
+    }
+  }
 }
diff --git a/_Main/BL/Relations/Relation_CapacityAllocationResults_GlobalOTDTable_GlobalOTDTable_CapacityAll.qbl b/_Main/BL/Relations/Relation_CapacityAllocationResults_GlobalOTDTable_GlobalOTDTable_CapacityAll.qbl
new file mode 100644
index 0000000..278c0e9
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CapacityAllocationResults_GlobalOTDTable_GlobalOTDTable_CapacityAll.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CapacityAllocationResults_GlobalOTDTable_GlobalOTDTable_CapacityAllocationResults
+{
+  #keys: '1[414702.0.340560333]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide GlobalOTDTable
+  {
+    #keys: '3[414702.0.340560335][414702.0.340560334][414702.0.340560336]'
+    Cardinality: '0to1'
+    ObjectDefinition: CapacityAllocationResults
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide CapacityAllocationResults
+  {
+    #keys: '3[414702.0.340560338][414702.0.340560337][414702.0.340560339]'
+    Cardinality: '1toN'
+    ObjectDefinition: GlobalOTDTable
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_H_MaterialHedgingResult_MacroPlan_MacroPlan_H_MaterialHedgingResult.qbl b/_Main/BL/Relations/Relation_H_MaterialHedgingResult_MacroPlan_MacroPlan_H_MaterialHedgingResult.qbl
new file mode 100644
index 0000000..587e695
--- /dev/null
+++ b/_Main/BL/Relations/Relation_H_MaterialHedgingResult_MacroPlan_MacroPlan_H_MaterialHedgingResult.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation H_MaterialHedgingResult_MacroPlan_MacroPlan_H_MaterialHedgingResult
+{
+  #keys: '1[414724.0.133544606]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide MacroPlan
+  {
+    #keys: '3[414724.0.133544608][414724.0.133544607][414724.0.133544609]'
+    Cardinality: '0to1'
+    ObjectDefinition: H_MaterialHedgingResult
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide H_MaterialHedgingResult
+  {
+    #keys: '3[414724.0.133544611][414724.0.133544610][414724.0.133544612]'
+    Cardinality: '1toN'
+    ObjectDefinition: MacroPlan
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo.qbl b/_Main/BL/Relations/Relation_H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo.qbl
new file mode 100644
index 0000000..075c195
--- /dev/null
+++ b/_Main/BL/Relations/Relation_H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo
+{
+  #keys: '1[414724.0.142347478]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide MacroPlan
+  {
+    #keys: '3[414724.0.142347480][414724.0.142347479][414724.0.142347481]'
+    Cardinality: '0to1'
+    ObjectDefinition: H_MaterialInfo
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide H_MaterialInfo
+  {
+    #keys: '3[414724.0.142347483][414724.0.142347482][414724.0.142347484]'
+    Cardinality: '1toN'
+    ObjectDefinition: MacroPlan
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_Division.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_Division.qbl
new file mode 100644
index 0000000..09c1ae9
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_Division.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Division
+{
+  #keys: '3[414702.0.340560478][414702.0.340560477][414702.0.340560479]'
+  Description: '浜嬩笟閮�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_ModuleBase.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_ModuleBase.qbl
new file mode 100644
index 0000000..ae1564e
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_ModuleBase.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ModuleBase
+{
+  #keys: '3[414702.0.340560468][414702.0.340560467][414702.0.340560469]'
+  Description: '妯$粍鍩哄湴'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_ModuleMaterialCode.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_ModuleMaterialCode.qbl
new file mode 100644
index 0000000..837fe5a
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_ModuleMaterialCode.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ModuleMaterialCode
+{
+  #keys: '3[414702.0.340560429][414702.0.340560428][414702.0.340560430]'
+  Description: '妯$粍鐗╂枡缂栫爜'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_ModuleMeasurementUnit.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_ModuleMeasurementUnit.qbl
new file mode 100644
index 0000000..bbaff01
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_ModuleMeasurementUnit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ModuleMeasurementUnit
+{
+  #keys: '3[414702.0.340560458][414702.0.340560457][414702.0.340560459]'
+  Description: '妯$粍鍗曚綅'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_NumberOfModules.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_NumberOfModules.qbl
new file mode 100644
index 0000000..efcf4e6
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_NumberOfModules.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute NumberOfModules
+{
+  #keys: '3[414702.0.340560442][414702.0.340560441][414702.0.340560443]'
+  Description: '妯$粍鏁伴噺'
+  ValueType: Real
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_NumberOfPanels.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_NumberOfPanels.qbl
new file mode 100644
index 0000000..ad4630f
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_NumberOfPanels.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute NumberOfPanels
+{
+  #keys: '3[414702.0.340560391][414702.0.340560390][414702.0.340560392]'
+  Description: '闈㈡澘鏁伴噺'
+  ValueType: Real
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_PanelBase.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_PanelBase.qbl
new file mode 100644
index 0000000..5feb094
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_PanelBase.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute PanelBase
+{
+  #keys: '3[414702.0.340560371][414702.0.340560370][414702.0.340560372]'
+  Description: '闈㈡澘鍩哄湴'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_PanelMaterialCode.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_PanelMaterialCode.qbl
new file mode 100644
index 0000000..883bd5c
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_PanelMaterialCode.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute PanelMaterialCode
+{
+  #keys: '3[414702.0.340560381][414702.0.340560380][414702.0.340560382]'
+  Description: '闈㈡澘鐗╂枡缂栫爜'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_PanelMeasurementUnit.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_PanelMeasurementUnit.qbl
new file mode 100644
index 0000000..d722862
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_PanelMeasurementUnit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute PanelMeasurementUnit
+{
+  #keys: '3[414702.0.340560404][414702.0.340560403][414702.0.340560405]'
+  Description: '闈㈡澘鍗曚綅'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_RequirementDate.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_RequirementDate.qbl
new file mode 100644
index 0000000..3d48677
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_RequirementDate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute RequirementDate
+{
+  #keys: '3[414702.0.340560506][414702.0.340560505][414702.0.340560507]'
+  Description: '闇�姹傛棩鏈�'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_VersionNumber.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_VersionNumber.qbl
new file mode 100644
index 0000000..490bfdf
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/Attribute_VersionNumber.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute VersionNumber
+{
+  #keys: '3[414702.0.340560355][414702.0.340560354][414702.0.340560356]'
+  Description: '鐗堟湰鍙�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
new file mode 100644
index 0000000..ef9782f
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
@@ -0,0 +1,28 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateDate (
+  GlobalOTDTable globalOTDTable,
+  MacroPlan macroPlan
+)
+{
+  TextBody:
+  [*
+    globalOTDTable.CapacityAllocationResults( relflush );
+    
+    finaleProduct_MPs := CapacityAllocationResults::ObtainTheFinalOutputProduct( macroPlan );
+    
+    period_MPS := null( Period_MPs );
+    traverse ( macroPlan, PeriodSpecification_MP, psmp, psmp.ID() = "Planning periods" ) {
+      period_MPS := selectsortedset( psmp, PeriodSpecificationPeriod.Period_MP, pmp, not pmp.IsHistorical(), pmp.StartDate() );
+    }
+    
+    traverse ( finaleProduct_MPs, Elements, fpmp/*, fpmp.ID() = "ProXOver 1 D2.6 A"*/ ) {
+      traverse ( fpmp, ProductInStockingPoint_MP, pisp, /*pisp.Name() = "ProXOver 1 D2.6 A in Finished Cars (France)" and*/ not pisp.IsSystem() ) {
+        traverse ( period_MPS, Elements, pmp ) {     
+          CapacityAllocationResults::IterativeGeneration( globalOTDTable, pisp, 1, null( NewSupply ), -1.0, pmp.StartDate() );
+        }
+    //    info( pisp.Name() );
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration.qbl
new file mode 100644
index 0000000..af2857c
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration.qbl
@@ -0,0 +1,55 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod IterativeGeneration (
+  GlobalOTDTable globalOTDTable,
+  ProductInStockingPoint_MP pisp,
+  Number numberOfLayers,
+  NewSupply finaleNewSupply,
+  Real finaleDependentDemand,
+  Date targetDate
+)
+{
+  TextBody:
+  [*
+    traverse ( pisp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, pispippl.Start().Date() = targetDate ) {
+      traverse ( pispippl, NewSupply, ns, ns.Quantity() > 0 ) {
+    //    info( "鐢熸垚鐨勪骇鍝侊細", pisp.ProductID(), "    浜у搧鍦ㄥ簱瀛樼偣锛�", pisp.Name(), "    灞傛暟锛�", numberOfLayers, "    鎬荤敓浜ч噺锛�", ns.Quantity(), "    鏈�缁堜緷璧栫墿鏂欐暟閲忥細", finaleDependentDemand );
+        if ( finaleDependentDemand < 0 ) {
+          finaleDependentDemand := ns.Quantity();
+        }
+        if ( isnull( finaleNewSupply ) ) {
+          finaleNewSupply := ns;
+        }
+        if ( guard( ns.PeriodTask_MP().astype( PeriodTaskOperation ).DependentDemand( relsize ) > 0, false ) ) {
+          numberOfLayers++;
+          traverse ( ns, PeriodTask_MP.astype( PeriodTaskOperation ).DependentDemand, dd ) {
+            oo := ns.ProcessOutput().astype( OperationOutput );
+            oi := dd.ProcessInput().astype( OperationInput );
+            finaleDependentDemand := finaleDependentDemand * oo.Quantity() * oi.Quantity();
+    //        info( "渚濊禆闇�姹備骇鍝両D锛�", dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(), "    渚濊禆鏁伴噺锛�", dd.Quantity(), "    褰撳墠鍛ㄦ湡浠诲姟Key锛�", dd.PeriodTask_MP().astype( PeriodTaskOperation ).Key() );
+            CapacityAllocationResults::IterativeGeneration( globalOTDTable, dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(), numberOfLayers, finaleNewSupply, finaleDependentDemand, targetDate );
+          }
+    //      info( "----------------------------------------------------" );
+        } else {
+    //      info( "鏃犱緷璧栭渶姹傦紝闇�瑕佺敓鎴愪骇鑳藉垎閰嶇粨鏋溿�傘�傘��" );
+    //      info( "======" );
+          pispPanel := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP();
+          pispModule := finaleNewSupply.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP();
+          globalOTDTable.CapacityAllocationResults( relnew,
+                                                    PanelBase             := pispPanel.StockingPointID(),
+                                                    PanelMaterialCode     := pispPanel.ProductID(),
+                                                    NumberOfPanels        := finaleDependentDemand,
+                                                    PanelMeasurementUnit  := pispPanel.UnitOfMeasure_MP().Name(),
+                                                    ModuleMaterialCode    := pispModule.ProductID(),
+                                                    NumberOfModules       := finaleNewSupply.Quantity(),
+                                                    ModuleMeasurementUnit := pispModule.UnitOfMeasure_MP().Name(),
+                                                    ModuleBase            := pispModule.StockingPointID(),
+                                                    RequirementDate       := finaleNewSupply.Start().Date()
+                                                   );
+        }
+        finaleNewSupply := null( NewSupply );
+      }
+      numberOfLayers := 1;
+    }
+  *]
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl
new file mode 100644
index 0000000..0db5a04
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ObtainTheFinalOutputProduct (
+  MacroPlan macroPlan
+) as owning Product_MPs
+{
+  TextBody:
+  [*
+    finaleProducts := construct( Product_MPs );
+    
+    traverse ( macroPlan, Product_MP, pmp, pmp.IsLeaf() ) {
+      flag := true;
+      traverse ( macroPlan, Routing.RoutingStep.Operation.OperationInput, oi, flag ) {
+        if ( pmp = oi.ProductInStockingPoint_MP().Product_MP() ) {
+          flag := false;
+        }
+      }
+      if ( flag ) {
+        finaleProducts.Add( pmp );
+      }
+    }
+    
+    return &finaleProducts;
+  *]
+}
diff --git a/_Main/BL/Type_CapacityAllocationResults/_ROOT_Type_CapacityAllocationResults.qbl b/_Main/BL/Type_CapacityAllocationResults/_ROOT_Type_CapacityAllocationResults.qbl
new file mode 100644
index 0000000..e6f475e
--- /dev/null
+++ b/_Main/BL/Type_CapacityAllocationResults/_ROOT_Type_CapacityAllocationResults.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type CapacityAllocationResults
+{
+  #keys: '5[414702.0.340560330][414702.0.340560328][0.0.0][414702.0.340560329][414702.0.340560331]'
+  BaseType: Object
+  Description: '浜ц兘鍒嗛厤缁撴灉鎶ヨ〃'
+  StructuredName: 'CapacityAllocationResultss'
+}
diff --git a/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl
index e885859..3ec5f41 100644
--- a/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl
+++ b/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl
@@ -62,9 +62,34 @@
                                priorityName, salesSegmentName, currencyId, unitOfMeasureName, 
                                false, customerName, customerId, orderId, orderLineId, true, true, true );
     } else {
-        result.Update( product, stockingPoint, orderDate, quantity, price, 
-                       priorityName, salesSegmentName, currencyId, unitOfMeasureName, 
-                       false, customerName, customerId, orderId, orderLineId, true, true, true );
+        if( result.ProductID() = productId 
+            and result.StockingPointID() = stockingPointId 
+            and result.StartDate() = orderDate 
+            and result.Quantity() = quantity 
+            and result.Price() = price 
+            and result.PriorityName() = priorityName 
+            and result.SalesSegmentName() = salesSegmentName 
+            and result.CurrencyID() = currencyId 
+            and result.UnitOfMeasureName() = unitOfMeasureName 
+            and result.CustomerName() = customerName 
+            and result.CustomerID() = customerId 
+            and result.OrderID() = orderId 
+            and result.OrderLineID() = orderLineId ){
+              info( "No need to update this order: " + id );
+              }else{
+                if( result.IsLocked() = true ){
+                  pispips := selectset( result, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true );
+                  pispipLeafs := selectset( pispips, 
+                                            Elements.astype( ProductInStockingPointInPeriodPlanningLeaf ), 
+                                            pispip, 
+                                            true );
+                  ProductInStockingPointInPeriod::LockUnlockPlanning( pispipLeafs, false, true );
+                }
+                result.Update( product, stockingPoint, orderDate, quantity, price, 
+                               priorityName, salesSegmentName, currencyId, unitOfMeasureName, 
+                               false, customerName, customerId, orderId, orderLineId, true, true, true );
+                result.IsLocked( false );
+                }
     }
     return result;
   *]
diff --git a/_Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl b/_Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl
index 755761e..3126a57 100644
--- a/_Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl
+++ b/_Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl
@@ -20,7 +20,7 @@
         owner.OrderLockLog( relnew, 
                             CustomerName := order.CustomerName(), 
                             End := order.First().AsPlanningBaseSalesDemandInPeriod().End().Date(), 
-                            EndDate := order.EndDate(), 
+                            EndDate := order.StartDate(), 
                             IsLocked := order.IsLocked(), 
                             LastModify := order.LastModify(), 
                             LastModifyTime := order.LastModifyTime(), 
@@ -41,7 +41,7 @@
           owner.OrderLockLog( relnew, 
                               CustomerName := order.CustomerName(), 
                               End := order.First().AsPlanningBaseSalesDemandInPeriod().End().Date(), 
-                              EndDate := order.EndDate(), 
+                              EndDate := order.StartDate(), 
                               IsLocked := order.IsLocked(), 
                               LastModify := order.LastModify(), 
                               LastModifyTime := order.LastModifyTime(), 
diff --git a/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl b/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl
index 08f1d13..5c58293 100644
--- a/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl
+++ b/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl
@@ -44,44 +44,18 @@
     
     replynvt := LibInt_MessageAccessor::CreateEmptyMessage();
     LibInt_MessageAccessor::SetHeaderProperty( replynvt, "Content-Type", "application/json" );
+    LibInt_MessageAccessor::SetHeaderProperty( replynvt, "path", "/panelMaterial/send" );
     
     rootNamedValue := replynvt.Root();
     bodyHandle := replynvt.GetHandle( "Body" );
-    petHandle := replynvt.GetHandle( "Pet" );
+    
+    //petHandle := replynvt.GetHandle( "Pet" );
     bodyNamedValue := rootNamedValue.Child( bodyHandle );
-    petNamedValue := bodyNamedValue.AddChild( petHandle );
-    categoryHandle := replynvt.GetHandle( "Category" );
-    categoryNamedValue := petNamedValue.AddChild( categoryHandle );
-    categoryIDHandle := replynvt.GetHandle( "Id" );
-    categoryIDNamedValue := categoryNamedValue.AddChild( categoryIDHandle );
-    categoryIDNamedValue.SetValue( 3 );
-    categoryNameHandle := replynvt.GetHandle( "Name" );
-    categoryNameNamedValue := categoryNamedValue.AddChild( categoryNameHandle );
-    categoryNameNamedValue.SetValue( "Cat" );
-    petNameHandle := replynvt.GetHandle( "Name" );
-    petNameValue := petNamedValue.AddChild( petNameHandle );
-    petNameValue.SetValue( "Pet1" );
-    petIdHandle := replynvt.GetHandle( "PetId" );
-    petIdNameValue := petNamedValue.AddChild( petIdHandle );
-    petIdNameValue.SetValue( 1 );
+    codeHandler := replynvt.GetHandle( "code" );
+    codeNamedValue := bodyNamedValue.AddChild( codeHandler );
+    codeNamedValue.SetValue( 200 );
     
-    photoUrlHandle := replynvt.GetHandle( "PhotoUrl" );
-    photoUrlNameValue := petNamedValue.AddChild( photoUrlHandle );
-    urlHandle := replynvt.GetHandle( "Url" );
-    photoUrlNameValue.AddChild( urlHandle, "url1" );
-    
-    statusHandle := replynvt.GetHandle( "Status" );
-    statusNameValue := petNamedValue.AddChild( statusHandle );
-    statusNameValue.SetValue( "available" );
-    
-    tagHandle := replynvt.GetHandle( "Tag" );
-    tagNameValue := petNamedValue.AddChild( tagHandle );
-    tagIdHandle := replynvt.GetHandle( "Id" );
-    tagNameValue.AddChild( tagIdHandle, 123 );
-    tagNameHandle := replynvt.GetHandle( "Name" );
-    tagNameValue.AddChild( tagNameHandle, "tag1" );
-    
-    
+    info( "鍝嶅簲------------------------------------------------------------" );
     info( replynvt.ToString() );
     
     
diff --git a/_Main/BL/Type_H_Forecast/Attribute_StockingPointID.qbl b/_Main/BL/Type_H_Forecast/Attribute_StockingPointID.qbl
new file mode 100644
index 0000000..62a27b5
--- /dev/null
+++ b/_Main/BL/Type_H_Forecast/Attribute_StockingPointID.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute StockingPointID
+{
+  #keys: '3[414724.0.149657552][414724.0.149657551][414724.0.149657553]'
+  Description: '搴撳瓨鐐�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl
new file mode 100644
index 0000000..5ab9f90
--- /dev/null
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl
@@ -0,0 +1,27 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SM_GetALlBOM (
+  MacroPlan Owner,
+  MappingBOM Material
+) as Number
+{
+  Description: '鏍规嵁SKU鑾峰彇鏈熸牴閮ㄦ墍鏈夋暟鎹�'
+  TextBody:
+  [*
+    AllMaterials := selectset( Owner,MappingBOM,Obj,Obj.ComponentCode()=Material.ProductCode())
+    if( AllMaterials.Size()>0) 
+    {
+          traverse( AllMaterials,Elements,Obj,not isnull( Obj))
+         {
+              H_FunctionClass::SM_GetALlBOM( Owner,Obj);
+         }   
+    }
+    else
+    {
+        Owner.H_MaterialInfo(relnew,ID := H_FunctionClass::SM_GenerateID( "BM")
+                                    ,MaterialName := Material.ComponentType()  );
+      
+    }
+    return 0;
+  *]
+}
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl
new file mode 100644
index 0000000..a10fbae
--- /dev/null
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SM_GetBOMBySKU (
+  MacroPlan Owner,
+  String SKU
+) as MappingBOM
+{
+  Description: '鏍规嵁SKU鑾峰彇BOM'
+  TextBody:
+  [*
+    Obj :=null( MappingBOM,constcontent );
+    if( not isnull( Owner) and SKU.Length()>0)
+    {
+      Obj := select( Owner,MappingBOM,ObjM,ObjM.ProductCode()=SKU);
+    }
+    return Obj;
+  *]
+}
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
new file mode 100644
index 0000000..3edc063
--- /dev/null
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
@@ -0,0 +1,104 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SM_GetMaterialData (
+  MacroPlan Owner,
+  String ParentSKU,
+  Number ProductQty,
+  String ForecastId,
+  String VCode,
+  Date NDate
+) as owning JSON
+{
+  Description: '鑾峰彇鐗╂枡淇℃伅'
+  TextBody:
+  [*
+    /**********************************鍒濆鍖栫墿鏂欎俊鎭�***************************************
+    *鍒涘缓浜猴細yunying
+    *鍒涘缓鏃ユ湡锛�2023-09-21 
+    *鎻忚堪锛氭牴鎹甋KU鑾峰彇涓嬩竴灞傜墿鏂欐暟鎹�,杩欓噷涓嶆槸閬嶅巻寰楀埌鎵�鏈夛紝鏃惰Е鍙戜竴娆″緱鍒颁竴灞傦紝骞剁疮璁�
+    *鍙傛暟锛�
+    *****************************************************************************************/
+    // 鍒濆鍖栫粨鏋�
+    bStatus := false;
+    strMsg :="";
+    
+    try{
+      if( Owner.MappingBOM(relsize )>0)
+      {
+        // 寰楀埌涓嬩竴绾ф暟鎹�
+        AllData:= selectset( Owner, MappingBOM,object,object.ComponentCode()=ParentSKU);
+        ObjProduct := null( MappingProduct,constcontent );
+        ObjUnit := null( Unit,constcontent );
+        MaterialType:="";
+        MaterialName:="-";
+        StockPoint := "";
+        NRate:=1.0;
+        NComponentsUsed :=0.0;
+        ObjBOM := H_FunctionClass::SM_GetBOMBySKU( Owner,ParentSKU);
+        if(not isnull( ObjBOM))
+        {
+          NRate := ObjBOM.ComponentOutputRate();
+          NComponentsUsed := ObjBOM.UnitUsageOfComponents();
+          // 浜у嚭姣斿紓甯告寜 100%浜у嚭璁$畻
+          if( NRate <=0.0)
+          {
+            NRate :=1.0;
+          }
+        }
+        if( AllData.Size()>0)
+        {
+          traverse( AllData,Elements,Obj,not isnull( Obj))
+          {
+            // 寰楀埌褰撳墠宸插瓨鍦ㄧ殑鐗╂枡淇℃伅锛堣鍗旾D + SKU锛�
+            ObjMaterial := select( Owner,H_MaterialInfo,ObjM,ObjM.ForecastID()=ForecastId and ObjM.SKU()=Obj.ProductCode());
+            if( isnull( ObjMaterial))
+            {
+              // 鐗╂枡绫诲瀷
+              MaterialType := Obj.ProductType();
+              // 寰楀埌鐗╂枡淇℃伅
+              ObjProduct:= H_FunctionClass::SM_GetProductInfo(Owner, Obj.ProductCode());
+              if( not isnull( ObjProduct))
+              {
+                MaterialType:= ObjProduct.ProductMajorType();
+                MaterialName:=ObjProduct.Name();
+              }
+              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ProductCode());
+              if( not isnull( ObjUnit))
+              {
+                StockPoint:= ObjUnit.Name();
+              }
+              Owner.H_MaterialInfo(relnew,ParentSKU := Obj.ComponentCode(),SKU := Obj.ProductCode(),ForecastID := ForecastId,OrgCode := Obj.OrganCode(),VCode := VCode
+                                    ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := MaterialType,NeedDate := NDate
+                                    ,NeedQty := [Number](ProductQty/NRate*NComponentsUsed).Round( 0),Unit := Obj.UnitOfMeasureName()
+                                    ,StockPoint :=StockPoint,MaterialName := MaterialName );
+            }
+            else
+            {
+              // 鑰冭檻鏄惁瑕佹洿鏂版暟鎹紝鏆備笉澶勭悊
+            }
+          }
+        }
+      }
+      // 娌℃湁BOM 娣诲姞娴嬭瘯鏁版嵁
+      else
+      {
+        nCount :=Owner.H_MaterialInfo(relsize );
+        Owner.H_MaterialInfo(relnew,ParentSKU := ParentSKU,SKU := "SKU"+ nCount.AsQUILL() ,ForecastID := ForecastId,OrgCode := "ORG_000",VCode := VCode
+                                    ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := "鍘熸潗鏂�",NeedDate := NDate
+                                    ,NeedQty := [Number](ProductQty*0.8).Round( 0),Unit := "PCS"
+                                    ,StockPoint :="娴嬭瘯",MaterialName := "娴嬭瘯鏁版嵁" );
+      }
+      bStatus := true;
+      strMsg :="";
+    }
+    onerror
+    {
+      strMsg :="鍔犺浇鐗╂枡澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛橈紒";
+      Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_InitialForcastData",
+                         DeveloperInformation :=  e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(),
+                         GeneralInformation := e.GeneralInformation());                
+    }
+    return JSON::Object().Add( "Status",bStatus)
+                         .Add( "Msg",strMsg).Build();
+  *]
+}
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetNextFriday.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetNextFriday.qbl
new file mode 100644
index 0000000..925d22a
--- /dev/null
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetNextFriday.qbl
@@ -0,0 +1,29 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SM_GetNextFriday () as Date
+{
+  Description: '鑾峰彇涓嬩竴涓槦鏈�5鐨勬棩鏈�'
+  TextBody:
+  [*
+    /**********************鑾峰彇涓嬩竴涓懆5鐨勬棩鏈�*******************
+    *鍒涘缓浜猴細yunying
+    *鍒涘缓鏃ユ湡锛�2023-09-21
+    *鎻忚堪锛氬緱鍒颁笅涓�涓槦鏈�5鐨勬棩鏈燂紝濡傛灉褰撳ぉ鏃舵槦鏈熶簲锛屽垯杩斿洖褰撳ぉ鏃ユ湡锛屽垱寤鸿鍗曚娇鐢�
+    **********************************************************/
+    //瀹氫箟涓嬩竴涓槦鏈�
+    nTargetWeenNum := 5;
+    nTodayWeekNum := Date::ActualDate().DayOfWeek();
+    // 鍚戝悗鍋忕Щ澶╂暟
+    nAddDays := 0;
+    if( nTodayWeekNum <= nTargetWeenNum)
+    {
+      nAddDays := nTargetWeenNum-nTodayWeekNum;
+    }
+    else
+    {
+      nAddDays := 7 - nTodayWeekNum+nTargetWeenNum;
+    }
+    // 涓嬩竴涓槦鏈熺殑鏃ユ湡
+    return Date::ActualDate() + nAddDays;
+  *]
+}
diff --git "a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo\0431.qbl" "b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo\0431.qbl"
new file mode 100644
index 0000000..2b1ed8f
--- /dev/null
+++ "b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo\0431.qbl"
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SM_GetProductInfo (
+  MacroPlan Owner,
+  String SKU
+) as MappingProduct
+{
+  Description: '鏍规嵁SKU鑾峰彇鐗╂枡淇℃伅'
+  TextBody:
+  [*
+    // 鏍规嵁SKU鑾峰彇鐗╂枡淇℃伅
+    Obj := null( MappingProduct,constcontent );
+    if( not isnull( Owner) and SKU.Length()>0)
+    {
+      Obj:= select( Owner,MappingProduct,ObjMP,ObjMP.ID()=SKU);
+    }
+    return Obj;
+  *]
+}
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl
new file mode 100644
index 0000000..cfa808a
--- /dev/null
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SM_GetUnitBySKU (
+  MacroPlan Owner,
+  String SKU
+) as Unit
+{
+  Description: '閫氳繃SKU鑾峰彇搴撳瓨鐐逛俊鎭�'
+  TextBody:
+  [*
+    Obj :=null( Unit,constcontent );
+    if( not isnull( Owner) and SKU.Length()>0)
+    {
+      OrgCode := select( Owner,MappingBOM,ObjM,ObjM.ProductCode()=SKU);
+      if( not isnull( OrgCode))
+      {
+        Obj := select( Owner,Unit,ObjU,ObjU.ID()=  OrgCode.OrganCode());
+      }
+    }
+    return Obj;
+  *]
+}
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl
new file mode 100644
index 0000000..edf6c16
--- /dev/null
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl
@@ -0,0 +1,111 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SM_InitialForcastData (
+  MacroPlan Owner
+) as owning JSON
+{
+  Description: '鍒濆鍖栬鍗曢娴嬩俊鎭�'
+  TextBody:
+  [*
+    /**********************************鍒濆鍖栬鍗曢娴嬩俊鎭�***************************************
+    *娉細鏈‘瀹氫笂娓搁娴嬭鍗曟洿鏂伴�昏緫鍜屾暟鎹湁鏁堟�э紝杩欓噷杩涜浜屾澶勭悊锛屾柊鐢熸垚涓�涓垪琛紝閬垮厤涓婃父淇℃伅鍙樺姩涓ラ噸
+    *    褰卞搷鍔熻兘
+    *
+    *****************************************************************************************/
+    // 鍒濆鍖栫粨鏋�
+    bStatus := false;
+    strMsg :="";
+    
+    try{
+      // 娓呴櫎鏃ф暟鎹紝閲嶆柊鎷夊彇
+      if(Owner.H_Forecast(relget ).Size()>0)
+      {
+        traverse( Owner,H_Forecast,Obj,not isnull( Obj))
+        {
+          Owner.H_Forecast(reldelete, Obj);
+        }
+      }
+      
+      // 鑾峰彇棰勬祴璁㈠崟锛氬綋鏈堝拰涔嬪悗鐨�3涓湀棰勬祴鏁版嵁 涓旈娴嬫暟閲�>0鐨�
+      AllData:= selectset( Owner, Product_MP.SalesDemand.astype( Forecast ),object,object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth() 
+                           and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth()
+                           and object.Quantity()>0 );
+      
+      CustomName:="";
+      DepartMent:="";
+      idx:=0;
+      strOrderCode:="";
+      RQty:=0;
+      ObjOrderRealQty:=null( H_OrderForecastRealQty,constcontent );
+    //  ObjPruduct :=null( MappingProduct,constcontent );
+      traverse( AllData,Elements,Obj,not isnull(Obj))
+      {
+        // 杩欓噷鐢ㄦ煡鎵惧悗鎴彇锛屽洜涓轰笉纭畾鏈夊嚑涓í绾匡紝浠ョ涓�涓负鍑�
+        idx:=Obj.SalesSegmentName().FindString( "-",0);
+        if(idx>0)
+        {
+          DepartMent:=Obj.SalesSegmentName().SubString( 0,idx);
+          CustomName := Obj.SalesSegmentName().SubString( idx+1, Obj.SalesSegmentName().Length() - (idx+1));
+        }
+        else
+        {
+          CustomName :=Obj.SalesSegmentName();
+          DepartMent := "閮ㄩ棬鏁版嵁鑾峰彇澶辫触锛�"
+        }
+    //    // 浠庣墿鏂欒〃鑾峰彇鐗╂枡淇℃伅
+    //    ObjPruduct := H_FunctionClass::SM_GetProductInfo( Owner,Obj.ProductID());
+    //    if( not isnull( ObjPruduct))
+    //    {
+    //      
+    //    }
+         // 鍐欏叆棰勬祴璁㈠崟淇℃伅琛�
+         strOrderCode:=H_FunctionClass::SM_GenerateID( "OF");
+         Owner.H_Forecast(relnew,OrderCode := strOrderCode,
+                                SKU := Obj.ProductID(),
+                               CustomCode := CustomName,
+                               CustomName := CustomName,
+                               Util:=Obj.UnitOfMeasureName(),
+                               NeedTime:=Obj.EndDate(),
+                               ForecastQty:=[Number]Obj.Quantity().Round( 0),
+                               StockingPointID := Obj.StockingPointID(),
+                               Department:=DepartMent);
+         // 鍐欏叆棰勬祴瀹炴椂淇℃伅
+         ObjOrderRealQty := select( Owner,H_OrderForecastRealQty,ObjO,ObjO.CustomID()=CustomName and ObjO.SKU()=Obj.ProductID() 
+                                    and ObjO.Month().StartOfMonth() = Obj.EndDate().StartOfMonth() )
+         if( isnull( ObjOrderRealQty))
+         {
+             Owner.H_OrderForecastRealQty(relnew,CustomID := CustomName,CustomName := CustomName,ForecatsQty := [Number]Obj.Quantity().Round( 0)
+                                           ,ForecatsRealQty := [Number]Obj.Quantity().Round( 0),ID := H_FunctionClass::SM_GenerateID( "OR")
+                                           ,Month := Obj.EndDate(),OrderCode := strOrderCode,SKU := Obj.ProductID(),Unit := Obj.UnitOfMeasureName());
+         }
+         else
+         {
+            if( [Number]Obj.Quantity().Round( 0)<> ObjOrderRealQty.ForecatsQty())
+            {
+                  RQty := [Number]Obj.Quantity().Round( 0) - ObjOrderRealQty.ForecatsQty();
+                  RQty := ObjOrderRealQty.ForecatsRealQty() + RQty;
+                  if( RQty<0)
+                  {
+                      RQty :=0;
+                  }
+                  ObjOrderRealQty.ForecatsQty([Number]Obj.Quantity().Round( 0));
+                  ObjOrderRealQty.ForecatsRealQty(RQty);
+            }
+         }
+      }
+     
+      
+      bStatus := true;
+      strMsg :="璁㈠崟棰勬祴鍒濆鍖栨垚鍔�!";
+    }
+    onerror
+    {
+      strMsg :="璁㈠崟棰勬祴鍒濆鍖栧け璐ワ紝鍙兘褰卞搷鍐插噺璁$畻锛岃鑱旂郴绯荤粺绠$悊鍛橈紒";
+      Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_InitialForcastData",
+                         DeveloperInformation :=  e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(),
+                         GeneralInformation := e.GeneralInformation());                
+    }
+    return JSON::Object().Add( "Status",bStatus)
+                         .Add( "Msg",strMsg).Build();
+  *]
+}
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl
new file mode 100644
index 0000000..524b723
--- /dev/null
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl
@@ -0,0 +1,120 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SM_InitialForcastDataEx (
+  MacroPlan Owner,
+  Boolean IsNew
+) as owning JSON
+{
+  Description: '鍒濆鍖栬鍗曢娴嬩俊鎭�'
+  TextBody:
+  [*
+    /**********************************鍒濆鍖栬鍗曢娴嬩俊鎭�***************************************
+    *娉細鏈‘瀹氫笂娓搁娴嬭鍗曟洿鏂伴�昏緫鍜屾暟鎹湁鏁堟�э紝杩欓噷杩涜浜屾澶勭悊锛屾柊鐢熸垚涓�涓垪琛紝閬垮厤涓婃父淇℃伅鍙樺姩涓ラ噸
+    *    褰卞搷鍔熻兘
+    *
+    *****************************************************************************************/
+    // 鍒濆鍖栫粨鏋�
+    bStatus := false;
+    strMsg :="";
+    
+    try{
+      // 娓呴櫎鏃ф暟鎹紝閲嶆柊鎷夊彇
+      if(Owner.H_Forecast(relget ).Size()>0)
+      {
+        traverse( Owner,H_Forecast,Obj,not isnull( Obj))
+        {
+          Owner.H_Forecast(reldelete, Obj);
+        }
+      }
+      
+      // 鑾峰彇棰勬祴璁㈠崟锛氬綋鏈堝拰涔嬪悗鐨�3涓湀棰勬祴鏁版嵁 涓旈娴嬫暟閲�>0鐨�
+      AllData:= selectset( Owner, Product_MP.SalesDemand.astype( Forecast ),object,object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth() 
+                           and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth()
+                           and object.Quantity()>0 );
+      
+      CustomName:="";
+      DepartMent:="";
+      idx:=0;
+      strOrderCode:="";
+      RQty:=0;
+      ObjOrderRealQty:=null( H_OrderForecastRealQty,constcontent );
+    //  ObjPruduct :=null( MappingProduct,constcontent );
+      traverse( AllData,Elements,Obj,not isnull(Obj))
+      {
+        // 杩欓噷鐢ㄦ煡鎵惧悗鎴彇锛屽洜涓轰笉纭畾鏈夊嚑涓í绾匡紝浠ョ涓�涓负鍑�
+        idx:=Obj.SalesSegmentName().FindString( "-",0);
+        if(idx>0)
+        {
+          DepartMent:=Obj.SalesSegmentName().SubString( 0,idx);
+          CustomName := Obj.SalesSegmentName().SubString( idx+1, Obj.SalesSegmentName().Length() - (idx+1));
+        }
+        else
+        {
+          CustomName :=Obj.SalesSegmentName();
+          DepartMent := "閮ㄩ棬鏁版嵁鑾峰彇澶辫触锛�"
+        }
+    //    // 浠庣墿鏂欒〃鑾峰彇鐗╂枡淇℃伅
+    //    ObjPruduct := H_FunctionClass::SM_GetProductInfo( Owner,Obj.ProductID());
+    //    if( not isnull( ObjPruduct))
+    //    {
+    //      
+    //    }
+         // 鍐欏叆棰勬祴璁㈠崟淇℃伅琛�
+         strOrderCode:=H_FunctionClass::SM_GenerateID( "OF");
+         Owner.H_Forecast(relnew,OrderCode := strOrderCode,
+                                SKU := Obj.ProductID(),
+                               CustomCode := CustomName,
+                               CustomName := CustomName,
+                               Util:=Obj.UnitOfMeasureName(),
+                               NeedTime:=Obj.EndDate(),
+                               ForecastQty:=[Number]Obj.Quantity().Round( 0),
+                               StockingPointID := Obj.StockingPointID(),
+                               Department:=DepartMent);
+         // 鍐欏叆棰勬祴瀹炴椂淇℃伅
+         ObjOrderRealQty := select( Owner,H_OrderForecastRealQty,ObjO,ObjO.CustomID()=CustomName and ObjO.SKU()=Obj.ProductID() 
+                                    and ObjO.Month().StartOfMonth() = Obj.EndDate().StartOfMonth() )
+         if( isnull( ObjOrderRealQty))
+         {
+             Owner.H_OrderForecastRealQty(relnew,CustomID := CustomName,CustomName := CustomName,ForecatsQty := [Number]Obj.Quantity().Round( 0)
+                                           ,ForecatsRealQty := [Number]Obj.Quantity().Round( 0),ID := H_FunctionClass::SM_GenerateID( "OR")
+                                           ,Month := Obj.EndDate(),OrderCode := strOrderCode,SKU := Obj.ProductID(),Unit := Obj.UnitOfMeasureName());
+         }
+         else
+         {
+           if( IsNew)
+           {
+              ObjOrderRealQty.ForecatsQty([Number]Obj.Quantity().Round( 0));
+              ObjOrderRealQty.ForecatsRealQty([Number]Obj.Quantity().Round( 0));
+           }
+           else
+           {
+              if( [Number]Obj.Quantity().Round( 0)<> ObjOrderRealQty.ForecatsQty())
+              {
+                    RQty := [Number]Obj.Quantity().Round( 0) - ObjOrderRealQty.ForecatsQty();
+                    RQty := ObjOrderRealQty.ForecatsRealQty() + RQty;
+                    if( RQty<0)
+                    {
+                        RQty :=0;
+                    }
+                    ObjOrderRealQty.ForecatsQty([Number]Obj.Quantity().Round( 0));
+                    ObjOrderRealQty.ForecatsRealQty(RQty);
+              }
+           }
+         }
+      }
+     
+      
+      bStatus := true;
+      strMsg :="璁㈠崟棰勬祴鍒濆鍖栨垚鍔�!";
+    }
+    onerror
+    {
+      strMsg :="璁㈠崟棰勬祴鍒濆鍖栧け璐ワ紝鍙兘褰卞搷鍐插噺璁$畻锛岃鑱旂郴绯荤粺绠$悊鍛橈紒";
+      Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_InitialForcastData",
+                         DeveloperInformation :=  e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(),
+                         GeneralInformation := e.GeneralInformation());                
+    }
+    return JSON::Object().Add( "Status",bStatus)
+                         .Add( "Msg",strMsg).Build();
+  *]
+}
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_MaterialReverse.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_MaterialReverse.qbl
index 52dcd9d..d096a87 100644
--- a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_MaterialReverse.qbl
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_MaterialReverse.qbl
@@ -40,7 +40,7 @@
         // 鑾峰彇棰勬祴鏁伴噺锛堝鎴�+SKU+鏈堜唤 鐞嗚鏄病鏈夌墿鏂欓娴嬶級
         OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = SKU 
                                               and Obj.CustomID() = CustomerCode 
-                                              and Obj.Month().Format( "YM2") = Date::ActualDate().Format( "YM2"));
+                                              and Obj.Month().Format( "YM2") = Date::ActualDate().Format( "YM2"));                                   
         if ( not isnull(OrderForecast))
         {
             nForecastQtyOld := OrderForecast.ForecatsRealQty();
@@ -93,6 +93,28 @@
             Owner.H_ReverseRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "RQ"),SKU := SKU,Unit := "閫氳繃SKU鑾峰彇",ReverseRealQty := nReverseQtyNew);
           } 
           
+          
+          MaterialResult := selectset( Owner,H_MaterialHedgingResult,Obj,Obj.SKU() = SKU);
+          if( MaterialResult.Size()=0)
+          {
+              Owner.H_MaterialHedgingResult(relnew,
+                                             ID := H_FunctionClass::SM_GenerateID( "MR"),
+                                             SKU:=SKU,
+                                             ForecastQty := nForecastQtyNew,
+                                             ReverseQty := nReverseQtyNew,
+                                             AuthorizeQty := 0,
+                                             CustomerCode := CustomerCode,
+                                             CustomerName := "",
+                                             Unit := "",
+                                             MType := "鐗╂枡/鍗婃垚鍝�");
+          }
+          else
+          {
+              traverse( MaterialResult,Elements,Obj,not isnull( Obj))
+              {
+                 Obj.ReverseQty(  nReverseQtyNew);
+              }
+          }
           // 閲婃斁閲囪喘
           Owner.H_MaterialPurchase(relnew,ID := H_FunctionClass::SM_GenerateID( "MP"),VCode:=VCode, DemandTime := DateTime::ActualTime(),
                                     H_HedgingRecord_ID := HRID,SKU := SKU,ProductSubclassType := "鐗╂枡绫诲瀷锛岀敤SKU鎶撶墿鏂欒〃寰楀埌",Qty := OperateQty,Unit := "閫氳繃SKU鎶�",
@@ -196,7 +218,46 @@
                                                                                             AuthorizeRealQty :=nAuthorizeQtyNew,
                                                                                             Unit := "SKU 鍒扮墿鏂欒〃鑾峰彇");
           } 
-          
+          //鏇存柊缁撴灉
+          MaterialResult := selectset( Owner,H_MaterialHedgingResult,Obj,Obj.SKU() = SKU);
+          if( MaterialResult.Size()=0)
+          {
+            // 娣诲姞涓�鏉″弽绛捐褰�
+            Owner.H_MaterialHedgingResult(relnew,
+                                   ID := H_FunctionClass::SM_GenerateID( "MR"),
+                                   SKU:=SKU,
+                                   ForecastQty := nForecastQtyNew,
+                                   ReverseQty := nReverseQtyNew,
+                                   AuthorizeQty := 0,
+                                   CustomerCode := CustomerCode,
+                                   CustomerName := "",
+                                   Unit := "",
+                                   MType := "鐗╂枡/鍗婃垚鍝�");
+            
+            // 娣诲姞涓�鏉℃巿鏉冭褰�
+            Owner.H_MaterialHedgingResult(relnew,
+                                           ID := H_FunctionClass::SM_GenerateID( "MR"),
+                                           SKU:=SKU,
+                                           ForecastQty := nForecastQtyNew,
+                                           ReverseQty := nReverseQtyNew,
+                                           AuthorizeQty := nAuthorizeQtyNew,
+                                           CustomerCode := CustomerCode,
+                                           Unit := "",MType := "鐗╂枡/鍗婃垚鍝�",
+                                           CustomerName := CustomerCode);
+          }
+          else
+          {
+              traverse( MaterialResult,Elements,Obj,not isnull( Obj))
+              {
+                Obj.ReverseQty(  nReverseQtyNew);
+                if( Obj.CustomerCode()= CustomerCode)
+                {
+                  Obj.AuthorizeQty(nAuthorizeQtyNew);
+                  Obj.ForecastQty(nForecastQtyNew);
+                }
+              }
+          }
+    
           // 閲婃斁閲囪喘
           nMid_R :=OperateQty - nReverseQtyOld;
           if( nMid_R > 0)
diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl
new file mode 100644
index 0000000..c4c2894
--- /dev/null
+++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl
@@ -0,0 +1,200 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SM_OrderHedging (
+  MacroPlan Owner,
+  Boolean IsNew,
+  String Operator,
+  String OperatorType
+) as owning JSON
+{
+  Description: '璁㈠崟鍐插噺璋冪敤鍑芥暟'
+  TextBody:
+  [*
+    /************************************璁㈠崟鍐插噺璋冪敤******************************
+    *鍑芥暟鍚嶏細SM_OrderHedging
+    *鍒涘缓浜猴細yunying
+    *鍒涘缓鏃堕棿锛�20230-09-24
+    *鎻忚堪锛氱郴缁熷唴璁㈠崟鍐插噺璋冪敤鍑芥暟锛孖sNew=true鏃讹紝閲嶆柊澶勭悊棰勬祴淇℃伅锛孖sNew=false鏃讹紝鐢ㄩ娴嬬疮璁′俊鎭��
+    *****************************************************************************/
+    // 鍒濆鍖栫粨鏋�
+    bStatus := false;
+    strMsg :="";
+    // 鑾峰彇鐗堟湰鍙�,杩欓噷鏄惁闇�瑕佸拰鐗堟湰鍙峰姛鑳藉鎺�
+    VCode :=H_FunctionClass::SM_GenerateID("VC");
+    
+    try{
+      if( not isnull( Owner))
+      {
+        // 鍒濆鍖栭娴嬩俊鎭�
+        JResult := H_FunctionClass::SM_InitialForcastDataEx( Owner,IsNew);
+        if( JResult.Get( "Status").GetBoolean())
+        {
+          traverse( Owner,SalesDemand.astype( CustomerOrder ),ObjOrder,not isnull( ObjOrder))
+          {
+            //----------------------------------------浠ヤ笅鍚庡幓棰勬祴 鍙嶇 鎺堟潈鏁版嵁淇℃伅----------------
+            nForecastQtyOld := 0; //鍘熼娴嬫暟閲�
+            nReverseQtyOld :=0;   //鍘熷弽绛炬暟閲�
+            nAuthorizeQtyOld :=0; //鍘熸巿鏉冩暟閲�
+            nForecastQtyNew :=0;  //璁$畻鍚庣殑棰勬祴鏁伴噺
+            nReverseQtyNew :=0;   //璁$畻鍚庣殑鍙嶇鏁伴噺
+            nAuthorizeQtyNew :=0; //璁$畻鍚庣殑鎺堟潈鏁伴噺
+            nHaveForecastQty :=0; //鏈夐娴嬫暟閲�
+            nNoHaveForecastQty:=0;//浜旈娴嬫暟閲�
+            OrderQuantity := 0;   //鍓╀綑璁㈠崟鏁伴噺
+           
+            // 鑾峰彇棰勬祴鏁伴噺锛堝鎴�+SKU+鏈堜唤 鐞嗚鏄病鏈夌墿鏂欓娴嬶級
+            OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = ObjOrder.ProductID() 
+                                                  and Obj.CustomID() = ObjOrder.CustomerName() 
+                                                  and Obj.Month().Format( "YM2") =ObjOrder.EndDate().Format( "YM2"));
+            if ( not isnull(OrderForecast))
+            {
+                nForecastQtyOld := OrderForecast.ForecatsRealQty();
+                nForecastQtyNew := nForecastQtyOld;
+            }
+            
+            // 鑾峰彇鍙嶇鏁伴噺锛堝彧鍒ゆ柇SKU锛�
+            ObjReverse := select(Owner, H_ReverseRealQty , Obj, Obj.SKU() = ObjOrder.ProductID());
+            if ( not isnull(ObjReverse))
+            {
+                nReverseQtyOld := ObjReverse.ReverseRealQty();
+                nReverseQtyNew := nReverseQtyOld;
+            }
+            
+            // 鑾峰彇鎺堟潈鏁伴噺锛堝鎴稩D+SKU锛�
+            ObjAuthorize := select(Owner, H_AuthorizeRealQty , Obj, Obj.SKU() = ObjOrder.ProductID() 
+                                                                    and Obj.CustomID() = ObjOrder.CustomerName());
+            if ( not isnull(ObjAuthorize))
+            {
+                nAuthorizeQtyOld := ObjAuthorize.AuthorizeRealQty();
+                nAuthorizeQtyNew :=nAuthorizeQtyOld;
+            }
+            //-----------------------------浠ヤ笅璁㈠崟鍐插噺--------------------
+            // 鎺堟潈璁板綍ID
+            AQID := H_FunctionClass::SM_GenerateID( "AQ");
+            // 璁㈠崟鍓╀綑鏁伴噺
+            OrderQuantity := [Number]ObjOrder.Quantity().Round( 0);
+            // 1 鍏堝啿鎺堟潈
+            if( OrderQuantity>0 and nAuthorizeQtyOld>0)
+            { 
+               OrderQuantity := OrderQuantity-nAuthorizeQtyOld;
+               nAuthorizeQtyNew :=0; 
+               if( OrderQuantity<0)
+               {
+                 nAuthorizeQtyNew := abs(OrderQuantity);
+                 OrderQuantity :=0;
+               }
+            }
+            // 2 鍐嶅啿鍙嶇
+            if( OrderQuantity>0 and nReverseQtyOld>0)
+            { 
+               OrderQuantity := OrderQuantity-nReverseQtyOld;
+               nReverseQtyNew :=0; 
+               if( OrderQuantity<0)
+               {
+                 nReverseQtyNew := abs(OrderQuantity);
+                 OrderQuantity :=0;
+               }
+            }
+            // 3 鏈�鍚庡啿棰勬祴
+            if( OrderQuantity>0 and nForecastQtyOld>0)
+            { 
+               //榛樿璁㈠崟鏁伴噺>棰勬祴鏁伴噺
+               OrderQuantity := OrderQuantity-nForecastQtyOld;
+               nForecastQtyNew :=0;
+               nHaveForecastQty := nForecastQtyOld;
+               nNoHaveForecastQty := OrderQuantity; 
+               if( OrderQuantity<0)
+               {
+                 nForecastQtyNew := abs(OrderQuantity);
+                 OrderQuantity :=0;
+                 nHaveForecastQty := nForecastQtyOld - nForecastQtyNew;
+                 nNoHaveForecastQty := 0;
+               }
+            }
+            // 璁板綍鍔ㄤ綔
+            Owner.H_OrderRecord(relnew,
+                                   ID := AQID,
+                                   VCode:=VCode,
+                                   SKU:=ObjOrder.ProductID(),
+                                   ReverseQty := nReverseQtyNew,
+                                   CustomerCode := ObjOrder.CustomerName(),
+                                   CustomerName := ObjOrder.CustomerName(),
+                                   ForecastQty := nForecastQtyNew,
+                                   OrderDateTime := ObjOrder.EndDate(),
+                                   OrderQty := [Number]ObjOrder.Quantity().Round( 0),
+                                   OrderCode:=ObjOrder.OrderID(),
+                                   AuthorizeQty := nAuthorizeQtyNew,
+                                   ReverseDeductQty := nReverseQtyOld - nReverseQtyNew,
+                                   AuthorizeDeductQty := 0,
+                                   ForecastHitQty :=nHaveForecastQty,
+                                   ForecastNoHitQty :=nNoHaveForecastQty,
+                                   OperateType := OperatorType,
+                                   Operator := Operator,
+                                   Unit := ObjOrder.UnitOfMeasureName(),
+                                   OperateQty := [Number]ObjOrder.Quantity().Round( 0),
+                                   OperateTime := DateTime::ActualTime());
+                                   
+            // 鏇存柊褰撳墠鍙嶇鏁伴噺
+            if( not isnull( ObjReverse))
+            {
+              ObjReverse.ReverseRealQty(nReverseQtyNew);
+            }
+            else
+            {
+              Owner.H_ReverseRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "RQ"),SKU := ObjOrder.ProductID(),Unit := ObjOrder.UnitOfMeasureName()
+                                      ,ReverseRealQty := nReverseQtyNew);
+            } 
+            // 鏇存柊鎺堟潈
+            if( not isnull( ObjAuthorize))
+            {
+              ObjAuthorize.AuthorizeRealQty(nAuthorizeQtyNew);
+            }
+            else
+            {
+              Owner.H_AuthorizeRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "AR"),SKU := ObjOrder.ProductID(),
+                                                                                              Month := ObjOrder.EndDate(),
+                                                                                              CustomID := ObjOrder.CustomerName(),
+                                                                                              CustomName := ObjOrder.CustomerName(),
+                                                                                              OrderCode := "-",
+                                                                                              AuthorizeRealQty :=nAuthorizeQtyNew,
+                                                                                              Unit := ObjOrder.UnitOfMeasureName());
+            } 
+            // 鏇存柊棰勬祴
+            if( not isnull( OrderForecast))
+            {
+              OrderForecast.ForecatsRealQty(nForecastQtyNew);
+            }
+            else
+            {
+              Owner.H_OrderForecastRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "OF"),SKU := ObjOrder.ProductID(),
+                                                                                              Month := ObjOrder.EndDate(),
+                                                                                              CustomID := ObjOrder.CustomerName(),
+                                                                                              CustomName := ObjOrder.CustomerName(),
+                                                                                              OrderCode := "-",
+                                                                                              ForecatsQty :=0,
+                                                                                              ForecatsRealQty :=nForecastQtyNew,
+                                                                                              Unit := ObjOrder.UnitOfMeasureName());
+            } 
+          }
+        }
+        else
+        {
+          strMsg:="棰勬祴璁㈠崟淇℃伅鍔犺浇澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛橈紒";
+        }    
+      }
+    }
+    onerror
+    {
+      strMsg :="璁㈠崟鍐插噺鍙戠敓閿欒锛岃鑱旂郴绯荤粺绠$悊鍛橈紒";
+      // 杩欓噷鏄惁瑕佸垹闄ゅ凡鍒涘缓鐨勬暟鎹紵寰呭畾锛屽鏋滄寜鐗堟湰鍙峰彲浠ヤ笉鍒犻櫎
+      
+      // 璁板綍閿欒鏃ュ織
+      Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_InitialForcastData",
+                         DeveloperInformation :=  e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(),
+                         GeneralInformation := e.GeneralInformation());                
+    }
+    return JSON::Object().Add( "Status",bStatus)
+                         .Add( "VersionCode",VCode)
+                         .Add( "Msg",strMsg).Build();
+  *]
+}
diff --git a/_Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl b/_Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl
index 6cb0560..b6727c8 100644
--- a/_Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl
+++ b/_Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl
@@ -5,6 +5,6 @@
 {
   #keys: '5[414724.0.53669729][414724.0.53669727][0.0.0][414724.0.53669728][414724.0.53669730]'
   BaseType: Object
-  Description: '鍐插噺鎿嶄綔绫�'
+  Description: '鍐插噺鎿嶄綔鍏敤绫�'
   StructuredName: 'H_FunctionClasss'
 }
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_AuthorizeQty.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_AuthorizeQty.qbl
new file mode 100644
index 0000000..c4c9f13
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_AuthorizeQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute AuthorizeQty
+{
+  #keys: '3[414724.0.133544641][414724.0.133544640][414724.0.133544642]'
+  Description: '鎺堟潈鍓╀綑鏁伴噺'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_CustomerCode.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_CustomerCode.qbl
new file mode 100644
index 0000000..24a04c3
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_CustomerCode.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute CustomerCode
+{
+  #keys: '3[414724.0.133544653][414724.0.133544652][414724.0.133544654]'
+  Description: '瀹㈡埛ID'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_CustomerName.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_CustomerName.qbl
new file mode 100644
index 0000000..13d3c7c
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_CustomerName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute CustomerName
+{
+  #keys: '3[414724.0.133544660][414724.0.133544659][414724.0.133544661]'
+  Description: '瀹㈡埛鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_ForecastQty.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_ForecastQty.qbl
new file mode 100644
index 0000000..04a979a
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_ForecastQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ForecastQty
+{
+  #keys: '3[414724.0.133544656][414724.0.133544655][414724.0.133544657]'
+  Description: '褰撴湀棰勬祴鍓╀綑鏁伴噺'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_ID.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_ID.qbl
new file mode 100644
index 0000000..badfad5
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_ID.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ID
+{
+  #keys: '3[414724.0.133544626][414724.0.133544625][414724.0.133544627]'
+  Description: 'KEY'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_MType.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_MType.qbl
new file mode 100644
index 0000000..b18e72d
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_MType.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute MType
+{
+  #keys: '3[414724.0.134572562][414724.0.134572561][414724.0.134572563]'
+  Description: ' 鐗╂枡绫诲瀷'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_ReverseQty.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_ReverseQty.qbl
new file mode 100644
index 0000000..a6dfa92
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_ReverseQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ReverseQty
+{
+  #keys: '3[414724.0.133544623][414724.0.133544622][414724.0.133544624]'
+  Description: '鍙嶇鍓╀綑鏁伴噺'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_SKU.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_SKU.qbl
new file mode 100644
index 0000000..4d2dc02
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_SKU.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute SKU
+{
+  #keys: '3[414724.0.133544644][414724.0.133544643][414724.0.133544645]'
+  Description: 'SKU缂栫爜'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_Serial.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_Serial.qbl
new file mode 100644
index 0000000..b0b49ec
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_Serial.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Serial
+{
+  #keys: '3[414724.0.133544647][414724.0.133544646][414724.0.133544648]'
+  Description: '搴忓彿锛屼笉涓�瀹氫娇鐢�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/Attribute_Unit.qbl b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_Unit.qbl
new file mode 100644
index 0000000..1b86054
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/Attribute_Unit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Unit
+{
+  #keys: '3[414724.0.133544673][414724.0.133544672][414724.0.133544674]'
+  Description: '鍗曚綅'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/DefaultValue_CustomerCode.qbl b/_Main/BL/Type_H_MaterialHedgingResult/DefaultValue_CustomerCode.qbl
new file mode 100644
index 0000000..cc729d8
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/DefaultValue_CustomerCode.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: CustomerCode
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/DefaultValue_ID.qbl b/_Main/BL/Type_H_MaterialHedgingResult/DefaultValue_ID.qbl
new file mode 100644
index 0000000..049abc0
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/DefaultValue_ID.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: ID
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/DefaultValue_SKU.qbl b/_Main/BL/Type_H_MaterialHedgingResult/DefaultValue_SKU.qbl
new file mode 100644
index 0000000..2aceb60
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/DefaultValue_SKU.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: SKU
+}
diff --git a/_Main/BL/Type_H_MaterialHedgingResult/_ROOT_Type_H_MaterialHedgingResult.qbl b/_Main/BL/Type_H_MaterialHedgingResult/_ROOT_Type_H_MaterialHedgingResult.qbl
new file mode 100644
index 0000000..518141a
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialHedgingResult/_ROOT_Type_H_MaterialHedgingResult.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type H_MaterialHedgingResult
+{
+  #keys: '5[414724.0.133544603][414724.0.133544601][0.0.0][414724.0.133544602][414724.0.133544604]'
+  BaseType: Object
+  Description: '鐗╂枡鍙嶇鎺堟潈缁撴灉'
+  StructuredName: 'H_MaterialHedgingResults'
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_ForecastID.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_ForecastID.qbl
new file mode 100644
index 0000000..5c39ed3
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_ForecastID.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ForecastID
+{
+  #keys: '3[414724.0.150662643][414724.0.150662642][414724.0.150662644]'
+  Description: '棰勬祴ID'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_ID.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_ID.qbl
new file mode 100644
index 0000000..4115813
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_ID.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ID
+{
+  #keys: '3[414724.0.142347495][414724.0.142347494][414724.0.142347496]'
+  Description: '涓婚敭ID'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialName.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialName.qbl
new file mode 100644
index 0000000..90613a7
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute MaterialName
+{
+  #keys: '3[414724.0.142347535][414724.0.142347534][414724.0.142347536]'
+  Description: '鐗╂枡鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialType.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialType.qbl
new file mode 100644
index 0000000..908d0f3
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialType.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute MaterialType
+{
+  #keys: '3[414724.0.142347525][414724.0.142347524][414724.0.142347526]'
+  Description: '鐗╂枡绫诲瀷锛氭垚鍝併�佸崐鎴愬搧銆佸師鏉愭枡锛燂紵锛燂紵'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_NeedDate.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_NeedDate.qbl
new file mode 100644
index 0000000..8be7117
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_NeedDate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute NeedDate
+{
+  #keys: '3[414724.0.143344655][414724.0.143344654][414724.0.143344656]'
+  Description: '闇�姹傛椂闂�'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_NeedQty.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_NeedQty.qbl
new file mode 100644
index 0000000..e0c3a06
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_NeedQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute NeedQty
+{
+  #keys: '3[414724.0.142347555][414724.0.142347554][414724.0.142347556]'
+  Description: '闇�姹傛暟閲�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_OrgCode.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_OrgCode.qbl
new file mode 100644
index 0000000..f8a06f0
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_OrgCode.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute OrgCode
+{
+  #keys: '3[414724.0.142347565][414724.0.142347564][414724.0.142347566]'
+  Description: '缁勭粐浠g爜'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_ParentSKU.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_ParentSKU.qbl
new file mode 100644
index 0000000..9c6d50d
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_ParentSKU.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ParentSKU
+{
+  #keys: '3[414724.0.142347515][414724.0.142347514][414724.0.142347516]'
+  Description: '鐖剁墿鏂橲KU'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_SKU.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_SKU.qbl
new file mode 100644
index 0000000..2299346
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_SKU.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute SKU
+{
+  #keys: '3[414724.0.142347505][414724.0.142347504][414724.0.142347506]'
+  Description: 'SKU(浜у搧銆佸崐鎴愬搧銆佺墿鏂欙級'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_StockPoint.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_StockPoint.qbl
new file mode 100644
index 0000000..1a3655c
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_StockPoint.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute StockPoint
+{
+  #keys: '3[414724.0.142347575][414724.0.142347574][414724.0.142347576]'
+  Description: '搴撳瓨鐐�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_Unit.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_Unit.qbl
new file mode 100644
index 0000000..2ec2674
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_Unit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Unit
+{
+  #keys: '3[414724.0.142347545][414724.0.142347544][414724.0.142347546]'
+  Description: '鍗曚綅'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_VCode.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_VCode.qbl
new file mode 100644
index 0000000..66f81ea
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/Attribute_VCode.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute VCode
+{
+  #keys: '3[414724.0.142347585][414724.0.142347584][414724.0.142347586]'
+  Description: '鐗堟湰鍙�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_H_MaterialInfo/_ROOT_Type_H_MaterialInfo.qbl b/_Main/BL/Type_H_MaterialInfo/_ROOT_Type_H_MaterialInfo.qbl
new file mode 100644
index 0000000..d2309be
--- /dev/null
+++ b/_Main/BL/Type_H_MaterialInfo/_ROOT_Type_H_MaterialInfo.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type H_MaterialInfo
+{
+  #keys: '5[414724.0.142347475][414724.0.142347473][0.0.0][414724.0.142347474][414724.0.142347476]'
+  BaseType: Object
+  Description: '鐗╂枡淇℃伅'
+  StructuredName: 'H_MaterialInfos'
+}
diff --git a/_Main/BL/Type_H_MessagePassing/Attribute_ValueJsonString.qbl b/_Main/BL/Type_H_MessagePassing/Attribute_ValueJsonString.qbl
new file mode 100644
index 0000000..aba7042
--- /dev/null
+++ b/_Main/BL/Type_H_MessagePassing/Attribute_ValueJsonString.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ValueJsonString
+{
+  #keys: '3[414724.0.138457270][414724.0.138457269][414724.0.138457271]'
+  Description: 'Json鏍煎紡瀛楃涓叉牸寮忕殑Value'
+  ValueType: String
+}
diff --git "a/_Main/BL/Type_MPSync/Method_RefreshCapacityAndSaleBudgeFilter\043323.qbl" "b/_Main/BL/Type_MPSync/Method_RefreshCapacityAndSaleBudgeFilter\043323.qbl"
new file mode 100644
index 0000000..5f2c716
--- /dev/null
+++ "b/_Main/BL/Type_MPSync/Method_RefreshCapacityAndSaleBudgeFilter\043323.qbl"
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: #root
+Method RefreshCapacityAndSaleBudgeFilter (
+  Boolean deleteBeforeCreate
+)
+{
+  TextBody:
+  [*
+    if( deleteBeforeCreate ) {
+      this.CapacityAndSaleBudgeFilterBusinessType( relflush );
+      this.CapacityAndSaleBudgeFilterPlaceOfProductionOfArray( relflush );  
+    }
+    this.RefreshCapacityAndSaleBudgeFilter();
+  *]
+}
diff --git a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl
index a441cd3..d5d4352 100644
--- a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl
+++ b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl
@@ -72,7 +72,9 @@
     info( "dealing 闈㈡澘鍒嗛厤閲�" )
     if( CapacityAndSaleBudgeFilterItem::Contains( items, "闈㈡澘鍒嗛厤閲�" ) ) {
       traverse( years, Elements, year ) {
+        info( "闈㈡澘鍒嗛厤閲�" + [String]year.YearNo() + "骞�" );
         // 鍘嗗彶鏁版嵁
+        info( "闈㈡澘鍒嗛厤閲�" + [String]year.YearNo() + "骞村巻鍙叉暟鎹�" );
         traverse( months, Elements, month ) {
           columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "闈㈡澘鍒嗛厤閲�-" + [String]year.YearNo() + "骞�-" + [String]month.MonthNo() + "鏈�-骞村害棰勭畻" );
           traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
@@ -87,6 +89,7 @@
           cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
           cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
         }
+        info( "闈㈡澘鍒嗛厤閲�" + [String]year.YearNo() + "骞碨&OP鏁版嵁" );
         // S&OP鏁版嵁
         traverse( macroPlans, Elements, macroPlan ) {
           traverse( months, Elements, month ) {
@@ -112,7 +115,9 @@
     info( "dealing 閿�鍞" )
     if( CapacityAndSaleBudgeFilterItem::Contains( items, "閿�鍞" ) ) {
       traverse( years, Elements, year ) {
+        info( "閿�鍞" + [String]year.YearNo() + "骞�" );
         // 鍘嗗彶鏁版嵁
+        info( "閿�鍞" + [String]year.YearNo() + "骞村巻鍙叉暟鎹�" );
         traverse( months, Elements, month ) {
           columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "瀵瑰閿�鍞-" + [String]year.YearNo() + "骞�-" + [String]month.MonthNo() + "鏈�-骞村害棰勭畻" );
           traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
@@ -127,6 +132,7 @@
           cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
           cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
         }
+        info( "閿�鍞" + [String]year.YearNo() + "骞村巻鍙叉暟鎹甋&OP鏁版嵁" );
         // S&OP鏁版嵁
         traverse( macroPlans, Elements, macroPlan ) {
           traverse( months, Elements, month ) {
@@ -151,7 +157,7 @@
     info( "dealing 澶у紶鐩堝埄棰�" )
     traverse( years, Elements, year ) {
       // 鍘嗗彶鏁版嵁
-      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "澶у紶鐩堝埄棰�-骞村害棰勭畻" );
+      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "澶у紶鐩堝埄棰�-" + [String]year.YearNo() + "骞�-骞村害棰勭畻" );
       traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
         // todo 
         // QID 23
@@ -160,7 +166,7 @@
       }
       // S&OP鏁版嵁
       traverse( macroPlans, Elements, macroPlan ) {
-        columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "澶у紶鐩堝埄棰�-" + [String]year.YearNo() + "骞�" );
+        columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "澶у紶鐩堝埄棰�-" + [String]year.YearNo() + "骞�-" + macroPlan.ScenarioName() );
         traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
           cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
           cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
@@ -171,16 +177,15 @@
     info( "dealing 浜у搧鐩堝埄棰�" )
     traverse( years, Elements, year ) {
       // 鍘嗗彶鏁版嵁
-      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "浜у搧鐩堝埄棰�-骞村害棰勭畻" );
+      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "浜у搧鐩堝埄棰�-" + [String]year.YearNo() + "骞�-骞村害棰勭畻" );
       traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
         // todo
-        // QID 23
         cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
         cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
       }
       // S&OP鏁版嵁
       traverse( macroPlans, Elements, macroPlan ) {
-        columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "浜у搧鐩堝埄棰�-" + [String]year.YearNo() + "骞�" );
+        columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "浜у搧鐩堝埄棰�-" + [String]year.YearNo() + "骞�-" + macroPlan.ScenarioName() );
         traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
           // todo
           cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
diff --git a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompareExport.qbl b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompareExport.qbl
new file mode 100644
index 0000000..44dab2e
--- /dev/null
+++ b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompareExport.qbl
@@ -0,0 +1,42 @@
+Quintiq file version 2.0
+#parent: #root
+Method CapacityAndSaleBudgeCompareExport () as BinaryValue
+{
+  Description: '瀵煎嚭姣旇緝缁撴灉'
+  TextBody:
+  [*
+    // yypsybs Sep-22-2023 (created)
+    tableName := "骞村害浜ч攢棰勭畻瀵规瘮";
+    
+    text:= '<?xml version="1.0" encoding="utf-8" standalone="yes"?><table><name>' + tableName + '</name>';
+    
+    // 澶勭悊column <column><name>鐗╂枡缂栫爜</name><type>String</type></column>
+    columnXml := ""
+    traverse( this, CapacityAndSaleBudgeCompareItemColumn, column ) {
+      info( "columnName : " + column.ColumnName() );
+      columnXml := columnXml + "<column><name>" + column.ColumnName() + "</name><type>String</type></column>";
+    }
+    text := text + columnXml + "</table>"
+    
+    // 濉炲唴瀹�
+    xmlDOMImplementation := XMLDOMImplementation::Create();
+    xmlDOMDocument := xmlDOMImplementation.CreateDocumentFromString( text );
+    tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 );
+    rows := selectsortedset( this, CapacityAndSaleBudgeCompareItemRow, row, row.PlaceOfProductionOfArray() + "_" + row.BusinessType() );
+    traverse ( rows, Elements, row ) {
+      info( "rowNo : " + [String]row.RowNo() );
+      traverse( row, CapacityAndSaleBudgeCompareItemCell, cell ) {
+        ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, cell.CellContent(), cell.CapacityAndSaleBudgeCompareItemColumn().ColumnName() );  
+      }
+    }
+    xmlDOMSerializer := xmlDOMImplementation.CreateSerializer();
+    xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument );
+    
+    tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) );
+    tableGroupHandle := TableGroupHandle::Create( tableName );
+    tableGroupHandle.Add( tableHandle );
+    tableBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
+    
+    return tableBinaryData.AsBinaryValue();
+  *]
+}
diff --git a/_Main/BL/Type_ScenarioManager/StaticMethod_GeneratesTheSpecifiedXMLColumn.qbl b/_Main/BL/Type_ScenarioManager/StaticMethod_GeneratesTheSpecifiedXMLColumn.qbl
new file mode 100644
index 0000000..f40c634
--- /dev/null
+++ b/_Main/BL/Type_ScenarioManager/StaticMethod_GeneratesTheSpecifiedXMLColumn.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GeneratesTheSpecifiedXMLColumn (
+  XMLDOMDocument xmlDOMDocument,
+  XMLDOMElement tableElement,
+  String value,
+  String columnName
+)
+{
+  TextBody:
+  [*
+    columnElements := tableElement.GetElementsByTagName( "column" );
+    
+    traverse ( columnElements, Elements, ce ) {
+      nameElement := ce.GetElementByTagName( "name", 0 );
+      if ( nameElement.TextContent() = columnName ) {
+        cell := xmlDOMDocument.CreateElement( "cell" );
+        cell.SetAttribute( "value", value );
+        ce.AppendChild( cell );
+      }
+    }
+  *]
+}
diff --git a/_Main/Sys/Integration/Brokers/PanelMaterialResponseResult1.xml b/_Main/Sys/Integration/Brokers/PanelMaterialResponseResult1.xml
new file mode 100644
index 0000000..e849218
--- /dev/null
+++ b/_Main/Sys/Integration/Brokers/PanelMaterialResponseResult1.xml
Binary files differ
diff --git a/_Main/Sys/Integration/Mapping/PanelMaterialResponseResult1.xml b/_Main/Sys/Integration/Mapping/PanelMaterialResponseResult1.xml
new file mode 100644
index 0000000..3017e20
--- /dev/null
+++ b/_Main/Sys/Integration/Mapping/PanelMaterialResponseResult1.xml
Binary files differ
diff --git a/_Main/Sys/Integration/Structure/PanelMaterialResponseResult1_from.xml b/_Main/Sys/Integration/Structure/PanelMaterialResponseResult1_from.xml
new file mode 100644
index 0000000..1e95e2a
--- /dev/null
+++ b/_Main/Sys/Integration/Structure/PanelMaterialResponseResult1_from.xml
Binary files differ
diff --git a/_Main/Sys/Integration/Structure/PanelMaterialResponseResult1_to.xml b/_Main/Sys/Integration/Structure/PanelMaterialResponseResult1_to.xml
new file mode 100644
index 0000000..c9bba0e
--- /dev/null
+++ b/_Main/Sys/Integration/Structure/PanelMaterialResponseResult1_to.xml
Binary files differ
diff --git a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
index 20ed0bd..7aa83c9 100644
--- a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
+++ b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
@@ -136,6 +136,8 @@
       [
         Component menuSeparator457 { #keys: '[414702.0.265704251]' BaseType: 'Menu' Properties: [ Separator: true ] }
         Component ComponentMenu666 { #keys: '[414702.0.265704260]' BaseType: 'ComponentMenu' Properties: [ ComponentType: 'FormBrokerExecuteLog' Text: '' ] }
+        Component menuSeparator822 { #keys: '[414702.0.340555024]' BaseType: 'Menu' Properties: [ Separator: true ] }
+        Component ComponentMenu783 { #keys: '[414702.0.340555035]' BaseType: 'ComponentMenu' Properties: [ ComponentType: 'FormTestButtonCollection' Text: '' ] }
       ]
       Properties:
       [
@@ -154,6 +156,8 @@
           c: menuExit
           c: menuSeparator457
           c: ComponentMenu666
+          c: menuSeparator822
+          c: ComponentMenu783
         }
       ]
     }
diff --git a/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def b/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def
new file mode 100644
index 0000000..7b1da32
--- /dev/null
+++ b/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: Button398
+Response OnClick () id:Response_FormTestButtonCollection_Button398_OnClick
+{
+  #keys: '[414702.0.340554926]'
+  Body:
+  [*
+    CapacityAllocationResults::CreateDate( GlobalOTDTable, MacroPlan );
+  *]
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
+}
diff --git a/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/_ROOT_Component_FormTestButtonCollection.def b/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/_ROOT_Component_FormTestButtonCollection.def
new file mode 100644
index 0000000..53a8703
--- /dev/null
+++ b/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/_ROOT_Component_FormTestButtonCollection.def
@@ -0,0 +1,50 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlanner
+OrphanComponent FormTestButtonCollection
+{
+  #keys: '[414702.0.340554698]'
+  BaseType: 'Form'
+  GBLayout
+  {
+    Type: 'internal[GBLayoutDefinition]'
+    Columns:
+    [
+      GBFlow.Column { grow: 0 id: 454 parent: 0 }
+    ]
+    Elements:
+    [
+      GBElement
+      {
+        Component => Button398
+        Position { startcolumn: 454 startrow: 649 endcolumn: 454 endrow: 649 }
+      }
+    ]
+    Gaps: [ left: 5 right: 5 top: 5 bottom: 5 inner: 5 ]
+    Rows:
+    [
+      GBFlow.Row { grow: 0 id: 649 parent: 0 }
+    ]
+  }
+  Children:
+  [
+    Component Button398
+    {
+      #keys: '[414702.0.340554799]'
+      BaseType: 'Button'
+      Properties:
+      [
+        Image: 'HARDHAT'
+        Text: '鐢熸垚浜ц兘鍒嗛厤缁撴灉鏁版嵁'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Height: 209
+    Image: 'PIPETTE_TEST'
+    IncludeInView: true
+    Title: '鍔熻兘娴嬭瘯鎸夐挳'
+    Width: 535
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def b/_Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def
index 66db189..4b16da7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"OrderCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderDateTime","title":"OrderDateTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderDateTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderQty","title":"OrderQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastHitQty","title":"ForecastHitQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastNoHitQty","title":"ForecastNoHitQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastNoHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerCode","title":"CustomerCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerCode"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"璁㈠崟缂栧彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderQty","title":"鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderDateTime","title":"闇�姹傛椂闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderDateTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastHitQty","title":"鏈夐娴�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastNoHitQty","title":"鏃犻娴�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastNoHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"瀹㈡埛鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerCode","title":"瀹㈡埛ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"CustomerCode"}}]'
         ContextMenu: 'listContextMenu108'
         SortCriteria: 'OperateTime'
         Taborder: 2
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_Form234/_ROOT_Component_FrmOrderResultEx\043234.def" "b/_Main/UI/MacroPlannerWebApp/Component_Form234/_ROOT_Component_FrmOrderResultEx\043234.def"
index 53c000e..c515238 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_Form234/_ROOT_Component_FrmOrderResultEx\043234.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_Form234/_ROOT_Component_FrmOrderResultEx\043234.def"
@@ -40,6 +40,7 @@
   Properties:
   [
     Description: '璁㈠崟鍐插噺鍚庡垪琛ㄥ睍绀�'
+    Image: 'NAV_REDO_LIGHT_BLUE'
     Title: '璁㈠崟鍐插噺鍚庡垪琛ㄥ睍绀�'
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def
new file mode 100644
index 0000000..c07b922
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def
@@ -0,0 +1,41 @@
+Quintiq file version 2.0
+Component ListCapacityAllocationResults
+{
+  #keys: '[414702.0.338762075]'
+  BaseType: 'WebList'
+  Children:
+  [
+    Component DataExtractorCapacityAllocationResults
+    {
+      #keys: '[414702.0.338762076]'
+      BaseType: 'WebDataExtractor'
+      Properties:
+      [
+        DataType: 'GlobalOTDTable'
+        Source: 'GlobalOTDTable'
+        Taborder: 0
+        Transformation: 'CapacityAllocationResults'
+      ]
+    }
+    #child: listActionBarPageCapacityAllocationResults
+    Component DataSetLevelCapacityAllocationResults
+    {
+      #keys: '[414702.0.338762081]'
+      BaseType: 'WebDataSetLevel'
+      Children:
+      [
+        #child: listContextMenuCapacityAllocationResults
+      ]
+      Properties:
+      [
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"VersionNumber","title":"VersionNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"VersionNumber"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PanelMeasurementUnit","title":"PanelMeasurementUnit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PanelMeasurementUnit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PanelMaterialCode","title":"PanelMaterialCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PanelMaterialCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfPanels","title":"NumberOfPanels","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NumberOfPanels"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PanelMeasurementUnit","title":"PanelMeasurementUnit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PanelMeasurementUnit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ModuleMaterialCode","title":"ModuleMaterialCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ModuleMaterialCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfModules","title":"NumberOfModules","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NumberOfModules"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ModuleMeasurementUnit","title":"ModuleMeasurementUnit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ModuleMeasurementUnit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ModuleMeasurementUnit","title":"ModuleMeasurementUnit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ModuleMeasurementUnit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Division","title":"Division","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Division"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"RequirementDate","title":"RequirementDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"RequirementDate"}}]'
+        ContextMenu: 'listContextMenuCapacityAllocationResults'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def
new file mode 100644
index 0000000..5384f4a
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component listActionBarPageCapacityAllocationResults
+{
+  #keys: '[414702.0.338762078]'
+  BaseType: 'listActionBarPage'
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def
new file mode 100644
index 0000000..62d4067
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component listContextMenuCapacityAllocationResults
+{
+  #keys: '[414702.0.338762083]'
+  BaseType: 'listContextMenu'
+  Properties:
+  [
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_ButtonGenerateCapacityAllocationResults_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_ButtonGenerateCapacityAllocationResults_OnClick.def
new file mode 100644
index 0000000..2d97d02
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_ButtonGenerateCapacityAllocationResults_OnClick.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ButtonGenerateCapacityAllocationResults
+Response OnClick () id:Response_FormCapacityAllocationResults_ButtonGenerateCapacityAllocationResults_OnClick
+{
+  #keys: '[414702.0.340111671]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      CapacityAllocationResults::CreateDate( GlobalOTDTable, MacroPlan );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def
new file mode 100644
index 0000000..432fdfa
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def
@@ -0,0 +1,28 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent FormCapacityAllocationResults
+{
+  #keys: '[414702.0.338731526]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: ListCapacityAllocationResults
+    Component ButtonGenerateCapacityAllocationResults
+    {
+      #keys: '[414702.0.340677556]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'PROCESS'
+        Label: '鐢熸垚鏁版嵁'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Image: 'PUMPKIN_HALLOWEEN'
+    Title: '浜ц兘鍒嗛厤缁撴灉'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def
index db394b0..cbfdc2b 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def
@@ -93,6 +93,6 @@
     ContextMenu: 'matrixeditorContextMenuCapacityAndSaleBudgeCompare'
     Editable: false
     Rows: 'MatrixEditorRowsCapacityAndSaleBudgeCompare'
-    Taborder: 1
+    Taborder: 2
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonExportCompare_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonExportCompare_OnClick.def
new file mode 100644
index 0000000..97cea9d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonExportCompare_OnClick.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: ButtonExportCompare
+Response OnClick () id:Response_FormCapacityAndSaleBudgeCompare_ButtonExportCompare_OnClick
+{
+  #keys: '[414384.0.881345276]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( GlobalOTDTable );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      tableBinaryData := ScenarioManager.CapacityAndSaleBudgeCompareExport().AsBinaryData();
+      Application.Download( "骞村害浜ч攢棰勭畻瀵规瘮.xlsx", tableBinaryData );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def
index 9602b8e..d44643f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def
@@ -18,6 +18,17 @@
         Taborder: 0
       ]
     }
+    Component ButtonExportCompare
+    {
+      #keys: '[414384.0.881345277]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'EXPORT1'
+        Label: '瀵煎嚭'
+        Taborder: 1
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterBusinessType/Component_ListCapacityAndSaleBudgeFilterBusinessType.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterBusinessType/Component_ListCapacityAndSaleBudgeFilterBusinessType.def
index 9d8acf7..712bf75 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterBusinessType/Component_ListCapacityAndSaleBudgeFilterBusinessType.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterBusinessType/Component_ListCapacityAndSaleBudgeFilterBusinessType.def
@@ -30,7 +30,7 @@
       [
         Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"BusinessType","title":"BusinessType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"BusinessType"}}]'
         ContextMenu: 'listContextMenuCapacityAndSaleBudgeFilterYear'
-        SortCriteria: 'YearNo'
+        SortCriteria: 'BusinessType'
         Taborder: 2
       ]
     }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterPlaceOfProductionOfArray/Component_ListCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterPlaceOfProductionOfArray/Component_ListCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.def
index 76e4e36..0d881d5 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterPlaceOfProductionOfArray/Component_ListCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeFilterPlaceOfProductionOfArray/Component_ListCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.def
@@ -30,7 +30,7 @@
       [
         Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlaceOfProductionOfArray","title":"PlaceOfProductionOfArray","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlaceOfProductionOfArray"}}]'
         ContextMenu: 'listContextMenuCapacityAndSaleBudgeFilterYear'
-        SortCriteria: 'YearNo'
+        SortCriteria: 'PlaceOfProductionOfArray'
         Taborder: 2
       ]
     }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def
index 6795199..c7d0922 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Serial","title":"Serial","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Serial"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"ForecastQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"ReverseQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"AuthorizeQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateQty","title":"OperateQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateType","title":"OperateType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Operator","title":"Operator","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Operator"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateTime","title":"OperateTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateTime"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Serial","title":"搴忓彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Serial"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU缂栧彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"棰勬祴鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"鍙嶇鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"鎺堟潈鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateQty","title":"鍔ㄤ綔鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateType","title":"鍔ㄤ綔绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Operator","title":"鎿嶄綔浜�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Operator"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateTime","title":"鎿嶄綔鏃堕棿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateTime"}}]'
         ContextMenu: 'listContextMenuHedgingOfLog'
         Taborder: 2
       ]
@@ -36,6 +36,6 @@
   ]
   Properties:
   [
-    Taborder: 3
+    Taborder: 1
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def
index ed7d295..b86fdcd 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def
@@ -27,15 +27,13 @@
       ]
       Properties:
       [
-        Taborder: 2
+        Taborder: 0
       ]
     }
     #child: ListHedgingOfLog
-    #child: PanelHedgingOfLog761
-    #child: PanelHedgingOfLog593
   ]
   Properties:
   [
-    Taborder: 0
+    Taborder: 2
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog221.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog221.def
new file mode 100644
index 0000000..655b205
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog221.def
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+Component PanelHedgingOfLog221
+{
+  #keys: '[414724.0.149787927]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component LabelHedgingOfLog id:LabelHedgingOfLog_298
+    {
+      #keys: '[414724.0.149788086]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        FixedSize: false
+        Taborder: 0
+        Text: '鏃ュ織椤甸潰'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Border: true
+    FixedSize: true
+    Taborder: 0
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593\04393.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593\04393.def"
new file mode 100644
index 0000000..e38df06
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593\04393.def"
@@ -0,0 +1,38 @@
+Quintiq file version 2.0
+Component PanelHedgingOfLog593 id:PanelHedgingOfLog593_93
+{
+  #keys: '[414724.0.152989129]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component txt_QueryContent_FHO
+    {
+      #keys: '[414724.0.152989222]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        PlaceHolder: '妯$硦鎼滅储'
+        Taborder: 0
+      ]
+    }
+    Component btn_Query_FHO
+    {
+      #keys: '[414724.0.152920619]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        ButtonSize: 'compact'
+        Image: 'VIEW'
+        Label: '鏌ヨ'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593.def
deleted file mode 100644
index 58cf03b..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593.def
+++ /dev/null
@@ -1,24 +0,0 @@
-Quintiq file version 2.0
-Component PanelHedgingOfLog593
-{
-  #keys: '[414724.0.32210907]'
-  BaseType: 'WebPanel'
-  Children:
-  [
-    Component lb_SKUCode
-    {
-      #keys: '[414724.0.32210935]'
-      BaseType: 'WebLabel'
-      Properties:
-      [
-        Taborder: 0
-        Text: 'SKU缂栫爜锛欰AAAAAAAA'
-      ]
-    }
-  ]
-  Properties:
-  [
-    FixedSize: true
-    Taborder: 1
-  ]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog761.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog761.def
deleted file mode 100644
index dded053..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog761.def
+++ /dev/null
@@ -1,28 +0,0 @@
-Quintiq file version 2.0
-Component PanelHedgingOfLog761
-{
-  #keys: '[414724.0.26973497]'
-  BaseType: 'WebPanel'
-  Children:
-  [
-    Component LabelHedgingOfLog
-    {
-      #keys: '[414724.0.26973515]'
-      BaseType: 'WebLabel'
-      Properties:
-      [
-        FixedSize: false
-        Taborder: 0
-        Text: '鏃ュ織椤甸潰'
-      ]
-    }
-  ]
-  Properties:
-  [
-    FixedSize: true
-    Orientation: 'horizontal'
-    Padding: 'true'
-    Style: 'content'
-    Taborder: 0
-  ]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick.def
new file mode 100644
index 0000000..4bc548f
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelHedgingOfLog593_93/btn_Query_FHO
+Response OnClick () id:Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick
+{
+  #keys: '[414724.0.152920798]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      DataExtractorHedgingOfLog.FixedFilter(  "object.SKU().LikeUserLocale( " + txt_QueryContent_FHO.Text().AsQUILL() + " )" 
+                                               + " or " + "object.OperateType().LikeUserLocale( " + txt_QueryContent_FHO.Text().AsQUILL() + " )" 
+                                               + " or " + "object.Operator().LikeUserLocale( " + txt_QueryContent_FHO.Text().AsQUILL() + " )" 
+                                           );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def
index 2b5e9aa..f7142b9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def
@@ -8,21 +8,13 @@
   Children:
   [
     #child: PanelHedgingOfLog
-    Component lb_ForecastQty
-    {
-      #keys: '[414724.0.31031550]'
-      BaseType: 'WebLabel'
-      Properties:
-      [
-        Taborder: 1
-        Text: '鍘熸潗鏂欑殑棰勬祴鏁伴噺锛�0'
-      ]
-    }
+    #child: PanelHedgingOfLog221
+    #child: PanelHedgingOfLog593_93
   ]
   Properties:
   [
     Description: '鍐插噺缁撴灉-鏃ュ織'
-    Image: 'DOCUMENT_REFRESH'
-    Title: '鍙嶇鎺堟潈鍒楄〃鏄庣粏椤�'
+    Image: 'NAV_REDO_LIGHT_BLUE'
+    Title: '鏃ュ織椤甸潰'
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def
index a9fc454..2d1eebd 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def
@@ -12,6 +12,7 @@
       Properties:
       [
         DataType: 'structured[H_MaterialPurchase]'
+        FixedFilter: 'object.Status()="鏈彂甯�"'
         Source: 'DataHolderMaterialPurchase'
         Taborder: 0
         Transformation: 'Elements'
@@ -28,7 +29,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSubclassType","title":"ProductSubclassType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductSubclassType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Qty","title":"Qty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Qty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"OrgCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WarehouseCode","title":"WarehouseCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WarehouseCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DemandTime","title":"DemandTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DemandTime"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSubclassType","title":"绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductSubclassType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Qty","title":"鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Qty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"缁勭粐浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WarehouseCode","title":"浠撳簱浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WarehouseCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DemandTime","title":"闇�姹傛椂闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DemandTime"}}]'
         ContextMenu: 'listContextMenuMaterialPurchase'
         Taborder: 2
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def
index 228bfb8..5e51ffa 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def
@@ -11,15 +11,17 @@
       BaseType: 'WebLabel'
       Properties:
       [
-        NumberOfColumns: 50
+        NumberOfColumns: 30
         Taborder: 0
         Text: '寮�濮嬫椂闂达細2023-03-26 12:24:46'
+        Visible: false
       ]
     }
     #child: PanelMaterialPurchase613
   ]
   Properties:
   [
+    Alignment: 'trailing'
     FixedSize: true
     Orientation: 'horizontal'
     Taborder: 1
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase354.def b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase354.def
new file mode 100644
index 0000000..043567d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase354.def
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+Component PanelMaterialPurchase354
+{
+  #keys: '[414724.0.149784759]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component lb_Title208
+    {
+      #keys: '[414724.0.149784840]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        Description: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁'
+        Taborder: 0
+        Text: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Border: true
+    FixedSize: true
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def
index 9c8ca6c..a2af624 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def
@@ -7,17 +7,6 @@
   BaseType: 'WebForm'
   Children:
   [
-    Component lb_Title
-    {
-      #keys: '[414724.0.32644779]'
-      BaseType: 'WebLabel'
-      Properties:
-      [
-        Description: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁'
-        Taborder: 0
-        Text: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁'
-      ]
-    }
     #child: PanelMaterialPurchase
     Component DataHolderMaterialPurchase
     {
@@ -45,11 +34,12 @@
       ]
     }
     #child: ListMaterialPurchase
+    #child: PanelMaterialPurchase354
   ]
   Properties:
   [
     Description: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁'
-    Image: 'DOG'
+    Image: 'NAV_REDO_LIGHT_BLUE'
     Title: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁'
   ]
 }
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock\043844.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock\043844.def"
index 899294d..4aa7065 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock\043844.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock\043844.def"
@@ -29,7 +29,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderID","title":"OrderID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegmentName","title":"SalesSegmentName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SalesSegmentName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsLocked","title":"IsLocked","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsLocked"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"First.AsPlanningBaseSalesDemandInPeriod.End","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"First.AsPlanningBaseSalesDemandInPeriod.End"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModify","title":"LastModify","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModify"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModifyTime","title":"LastModifyTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModifyTime"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderID","title":"OrderID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegmentName","title":"SalesSegmentName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SalesSegmentName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsLocked","title":"IsLocked","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsLocked"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"First.AsPlanningBaseSalesDemandInPeriod.End","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"First.AsPlanningBaseSalesDemandInPeriod.End"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModify","title":"LastModify","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModify"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModifyTime","title":"LastModifyTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModifyTime"}}]'
         ContextMenu: 'listContextMenuOrderLock'
         Taborder: 2
       ]
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader\043545.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader\043545.def"
index 4ff0600..26dee9c 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader\043545.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader\043545.def"
@@ -87,7 +87,7 @@
         ButtonSize: 'compact'
         Description: '璁㈠崟閿佸畾'
         Label: '閿佸畾'
-        Taborder: 7
+        Taborder: 8
       ]
     }
     Component ButtonOrderLockHeaderUnlock
@@ -99,7 +99,7 @@
         ButtonSize: 'compact'
         Description: '璁㈠崟瑙i攣'
         Label: '瑙i攣'
-        Taborder: 8
+        Taborder: 9
       ]
     }
     Component ButtonOrderLockHeaderClear
@@ -114,6 +114,18 @@
         Taborder: 6
       ]
     }
+    Component ButtonOrderLockHeaderFresh
+    {
+      #keys: '[412960.0.259721852]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        ButtonSize: 'compact'
+        Description: '浠庢暟鎹簮鍒锋柊璁㈠崟鏁版嵁'
+        Label: '閲嶆柊鑾峰彇璁㈠崟'
+        Taborder: 7
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick.def
new file mode 100644
index 0000000..b6057a9
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: PanelOrderLockHeader_545/ButtonOrderLockHeaderFresh
+Response OnClick () id:Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick
+{
+  #keys: '[412960.0.259721886]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      macroplan := MacroPlan;
+      businesstypes := DataHolderOrderLockGlobal.Data().BusinessType().Tokenize( ',' );
+      CustomerOrder::DoSync( macroplan, businesstypes );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def
index 5fa0f71..bef1aa1 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def
@@ -19,11 +19,11 @@
       newfilter := "";
       findcount := 0;
       traverse( existfilterlist, Elements, filter ){
-        if( filter.FindString( "EndDate()", 0 ) >= 0 ){
+        if( filter.FindString( "StartDate()", 0 ) >= 0 ){
           if( newfilter = "" ){
-            newfilter := "( object.EndDate() = " + this.Date().AsQUILL() + " )";
+            newfilter := "( object.StartDate() = " + this.Date().AsQUILL() + " )";
             }else{
-              newfilter := newfilter + " and " + "( object.EndDate() = " + this.Date().AsQUILL() + " )";
+              newfilter := newfilter + " and " + "( object.StartDate() = " + this.Date().AsQUILL() + " )";
               }
           findcount := 1;
           }else{
@@ -37,9 +37,9 @@
       
       if( findcount = 0 ){
         if( newfilter = "" ){
-          newfilter := "( object.EndDate() = " + this.Date().AsQUILL() + " )";
+          newfilter := "( object.StartDate() = " + this.Date().AsQUILL() + " )";
           }else{
-            newfilter := newfilter + " and " + "( object.EndDate() = " + this.Date().AsQUILL() + " )";
+            newfilter := newfilter + " and " + "( object.StartDate() = " + this.Date().AsQUILL() + " )";
             }
         }
       
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def
index a5fda9c..4680617 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def
@@ -19,7 +19,7 @@
       newfilter := "";
       findcount := 0;
       traverse( existfilterlist, Elements, filter ){
-        if( filter.FindString( "End()", 0 ) >= 0 and filter.FindString( "EndDate()", 0 ) < 0 ){
+        if( filter.FindString( "End()", 0 ) >= 0 ){
           if( newfilter = "" ){
             newfilter := "( object.First().AsPlanningBaseSalesDemandInPeriod().End().Date() = " + this.Date().AsQUILL() + " )";
             }else{
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def
index fbb5054..ab6d309 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Issuer","title":"Issuer","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Issuer"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IssuingDate","title":"IssuingDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IssuingDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FinishDate","title":"FinishDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FinishDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Status","title":"Status","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Status"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"VCode","title":"VCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"VCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Serial","title":"Serial","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Serial"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Serial","title":"搴忓彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Serial"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IssuingDate","title":"鍙戝竷鏃堕棿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IssuingDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FinishDate","title":"缁撴潫鏃堕棿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FinishDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Issuer","title":"鍙戝竷浜�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Issuer"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Status","title":"鐘舵��","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Status"}}]'
         ContextMenu: 'listContextMenuReleaseRecord'
         Taborder: 2
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def
index 6ef25a7..4f4cedb 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"H_ReleaseRecord_ID","title":"H_ReleaseRecord_ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"H_ReleaseRecord_ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"H_HedgingRecord_ID","title":"H_HedgingRecord_ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"H_HedgingRecord_ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Qty","title":"Qty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Qty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Status","title":"Status","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Status"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IssuingDate","title":"IssuingDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IssuingDate"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"鐗╂枡缂栧彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSubclassType","title":"绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductSubclassType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Qty","title":"鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Qty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"缁勭粐浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WarehouseCode","title":"浠撳簱浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WarehouseCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DemandTime","title":"闇�姹傛椂闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DemandTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IssuingDate","title":"鍙戝竷鏃堕棿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IssuingDate"}}]'
         ContextMenu: 'listContextMenuReleaseRecord690'
         Taborder: 2
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_PanelReleaseRecord423.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_PanelReleaseRecord423.def
new file mode 100644
index 0000000..6d2fc94
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_PanelReleaseRecord423.def
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+Component PanelReleaseRecord423
+{
+  #keys: '[414724.0.149784904]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component LabelReleaseRecord id:LabelReleaseRecord_296
+    {
+      #keys: '[414724.0.149784974]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        NumberOfColumns: 20
+        Taborder: 0
+        Text: '鍙嶇/鎺堟潈鐗╂枡鍙戝竷鐗堟湰鏄庣粏'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Border: true
+    FixedSize: true
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def
index f4cc29c..9e293a9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def
@@ -11,7 +11,15 @@
   {
     Body:
     [*
-      DataExtractorReleaseRecord661.FixedFilter( "object.H_ReleaseRecord_ID() = " + selection.ID().AsQUILL());
+      // 鍙戝竷ID
+      H_ReleaseRecord_ID := "-1";
+      H_Status:="宸插彂甯�";
+      if( not isnull( selection))
+      {
+        H_ReleaseRecord_ID :=  selection.ID();
+      }
+      DataExtractorReleaseRecord661.FixedFilter( "object.H_ReleaseRecord_ID() = " + H_ReleaseRecord_ID.AsQUILL()
+                                                 + " and " + "object.Status() = " + H_Status.AsQUILL());
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def
index 5fc1173..75b080a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def
@@ -5,12 +5,12 @@
   #keys: '[414724.0.37110847]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebComponent_OnCreated'
-  GroupServerCalls: true
   QuillAction
   {
     Body:
     [*
       dtMonth.Date(Date::Today());
     *]
+    GroupServerCalls: false
   }
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def
index 28f9120..675a452 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def
@@ -7,25 +7,15 @@
   BaseType: 'WebForm'
   Children:
   [
-    Component LabelReleaseRecord
-    {
-      #keys: '[414724.0.36933216]'
-      BaseType: 'WebLabel'
-      Properties:
-      [
-        NumberOfColumns: 20
-        Taborder: 0
-        Text: '鍙嶇/鎺堟潈鐗╂枡鍙戝竷鐗堟湰鏄庣粏'
-      ]
-    }
     #child: PanelReleaseRecord
     #child: PanelReleaseRecord108
     #child: PanelReleaseRecord527
+    #child: PanelReleaseRecord423
   ]
   Properties:
   [
     Description: '鍙嶇/鎺堟潈鐗╂枡鍙戝竷鐗堟湰鏄庣粏'
-    Image: 'BULL'
+    Image: 'NAV_REDO_LIGHT_BLUE'
     Title: '鍙嶇/鎺堟潈鐗╂枡鍙戝竷鐗堟湰鏄庣粏'
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelOptimizerGeneral718.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelOptimizerGeneral718.def
deleted file mode 100644
index f043a99..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelOptimizerGeneral718.def
+++ /dev/null
@@ -1,39 +0,0 @@
-Quintiq file version 2.0
-Component PanelOptimizerGeneral718
-{
-  #keys: '[414724.0.43041017]'
-  BaseType => //PanelOptimizerGeneral
-  Children:
-  [
-    Component CheckboxRunPeggingAfterOptRun
-    {
-      #keys: '[144528.1.1789128457]'
-      BaseType => //PanelOptimizerGeneral/CheckboxRunPeggingAfterOptRun
-      IsDerived: true
-      Properties:
-      [
-        Visible: false
-      ]
-    }
-    Component EditFieldMinSalesDemandQtyThreshold
-    {
-      #keys: '[144528.1.1789128515]'
-      BaseType => //PanelOptimizerGeneral/EditFieldMinSalesDemandQtyThreshold
-      IsDerived: true
-      Properties:
-      [
-        Visible: false
-      ]
-    }
-    Component EditFieldUsagePercentTripCleanup
-    {
-      #keys: '[144528.1.1789128517]'
-      BaseType => //PanelOptimizerGeneral/EditFieldUsagePercentTripCleanup
-      IsDerived: true
-      Properties:
-      [
-        Visible: false
-      ]
-    }
-  ]
-}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop0001\043655.def" "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop0001\043655.def"
deleted file mode 100644
index 9d296a3..0000000
--- "a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop0001\043655.def"
+++ /dev/null
@@ -1,24 +0,0 @@
-Quintiq file version 2.0
-Component PanelTop0001
-{
-  #keys: '[414724.0.43233506]'
-  BaseType: 'WebPanel'
-  Children:
-  [
-    #child: PanelTop
-    #child: PanelTop612
-    #child: PanelTop264
-    #child: PanelTop597
-    #child: PanelTop846
-    #child: PanelTop104
-    #child: PanelTop360
-    #child: PanelTop744
-    #child: PanelTop820
-  ]
-  Properties:
-  [
-    Border: true
-    Style: 'content'
-    Taborder: 1
-  ]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop820.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop820.def
deleted file mode 100644
index 8d132dd..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop820.def
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-Component PanelTop820
-{
-  #keys: '[414724.0.79122768]'
-  BaseType: 'WebPanel'
-  Children:
-  [
-    Component ds_NeedDate
-    {
-      #keys: '[414724.0.79122804]'
-      BaseType: 'WebDateSelector'
-      Properties:
-      [
-        Label: '闇�姹傛棩鏈�'
-        Taborder: 0
-      ]
-    }
-  ]
-  Properties:
-  [
-    Taborder: 0
-  ]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Response_OnCreated.def
deleted file mode 100644
index e01820f..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Response_OnCreated.def
+++ /dev/null
@@ -1,46 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Response OnCreated () id:Response_FrmAuthorizeAndCountersign_OnCreated
-{
-  #keys: '[414724.0.80341563]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebComponent_OnCreated'
-  QuillAction
-  {
-    Body:
-    [*
-      /**********************鑾峰彇涓嬩竴涓懆5鐨勬棩鏈�*******************/
-      //瀹氫箟涓嬩竴涓槦鏈�
-      nTargetWeenNum := 5;
-      nTodayWeekNum := Date::ActualDate().DayOfWeek();
-      nAddDays := 0;
-      if( nTodayWeekNum <= nTargetWeenNum)
-      {
-        nAddDays := nTargetWeenNum-nTodayWeekNum;
-      }
-      else
-      {
-        nAddDays := 7 - nTodayWeekNum+nTargetWeenNum;
-      }
-      // 涓嬩竴涓槦鏈熺殑鏃ユ湡
-      dtNeedDate := Date::ActualDate() + nAddDays;
-      /******************************鑾峰彇涓嬩竴涓懆5鐨勬棩鏈� 缁撴潫***********************/
-      ds_NeedDate.Date(dtNeedDate);
-      
-      // 鑾峰彇閫夋嫨鍚庣殑SKU
-      SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
-      if(not isnull( SelectItem) and SelectItem.Value().Length()>0)
-      {
-        StrValue := SelectItem.Value().Tokenize( ";");
-        lb_SKUCode_FAAC.Text(StrValue.Element( 0));
-        lb_SKUName_FAAC.Text("浜у搧");
-        lb_Operator_FAAC.Text("");
-        lb_Util_FAAC.Text(StrValue.Element( 1));
-        txt_CustomID_FAAC.Text(StrValue.Element( 2));
-        txt_CustomName_FAAC.Text(StrValue.Element( 3));
-        lb_Operator_FAAC.Text(ApplicationMacroPlanner.GetUserName());
-      }
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Response_Panel261_btn_Cancel_FAAC_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Response_Panel261_btn_Cancel_FAAC_OnClick.def
deleted file mode 100644
index 353774e..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Response_Panel261_btn_Cancel_FAAC_OnClick.def
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: Panel261/btn_Cancel_FAAC
-Response OnClick () id:Response_Panel261_btn_Cancel_FAAC_OnClick
-{
-  #keys: '[414724.0.90212874]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  GroupServerCalls: true
-  QuillAction
-  {
-    Body:
-    [*
-      FrmAuthorizeAndCountersign.Close();
-    *]
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Response_Panel261_btn_OK_FAAC_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Response_Panel261_btn_OK_FAAC_OnClick.def
deleted file mode 100644
index c34f055..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Response_Panel261_btn_OK_FAAC_OnClick.def
+++ /dev/null
@@ -1,44 +0,0 @@
-Quintiq file version 2.0
-#parent: Panel261/btn_OK_FAAC
-Response OnClick () id:Response_Panel261_btn_OK_FAAC_OnClick
-{
-  #keys: '[414724.0.56302031]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  Precondition:
-  [*
-    return not isnull( MacroPlan);
-  *]
-  QuillAction
-  {
-    Body:
-    [*
-      strQty := np_Qty_FAAC.Number().AsQUILL();
-      Qty := 0;
-      if( strQty.FindString( ".",0)>0)
-      {
-        Qty := [Number]strQty.SubString( 0,strQty.FindString( ".",0));
-      }
-      else
-      {
-        Qty := [Number]strQty;
-      }
-      OperateMsg :="";
-      OperateResult := H_FunctionClass::SM_OrderReverseOrAuthorize(  MacroPlan,lb_Util_FAAC.Text() ,"-",ds_NeedDate.Date() ,txt_CustomID_FAAC.Text(),lb_SKUCode_FAAC.Text(),Qty,
-                                                            lb_Operator_FAAC.Text(),txt_CustomName_FAAC.Text(),OperateMsg,ddsl_OperateType_FAAC.Text());
-      
-      if( OperateMsg.Length()>0)
-      {
-        if( OperateResult)
-        {
-          WebMessageBox::Success( OperateMsg);
-        }
-        else
-        {
-          WebMessageBox::Warning( OperateMsg);
-        }
-      }
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/_ROOT_Component_FrmAuthorizeAndCountersign.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/_ROOT_Component_FrmAuthorizeAndCountersign.def
deleted file mode 100644
index 69e5e49..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/_ROOT_Component_FrmAuthorizeAndCountersign.def
+++ /dev/null
@@ -1,30 +0,0 @@
-Quintiq file version 2.0
-#root
-#parent: MacroPlannerWebApp
-OrphanComponent FrmAuthorizeAndCountersign
-{
-  #keys: '[414724.0.41821648]'
-  BaseType: 'WebForm'
-  Children:
-  [
-    Component lb_Title_FRMAAC
-    {
-      #keys: '[414724.0.41841127]'
-      BaseType: 'WebLabel'
-      Properties:
-      [
-        Description: '璁㈠崟鍙嶆綔鎺堟潈鏂板椤�'
-        Taborder: 0
-        Text: '璁㈠崟鍙嶇鎺堟潈鏂板椤�'
-      ]
-    }
-    #child: PanelTop0001
-    #child: Panel261
-  ]
-  Properties:
-  [
-    Description: '璁㈠崟鎺堟潈鍜屽弽绛�'
-    Image: 'DOCUMENTS_NEW'
-    Title: '璁㈠崟鍙嶇鎺堟潈鏂板椤�'
-  ]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def
index c03f661..1b87aa1 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def
@@ -15,21 +15,18 @@
     [*
       // 鑾峰彇閫夋嫨鍚庣殑SKU
       SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmMaterial" and Obj.ItemKey()="ListSelect");
-      if(not isnull( SelectItem) and SelectItem.Value().Length()>0)
+      if(not isnull( SelectItem))
       {
-        StrValue := SelectItem.Value().Tokenize( ";");
-        lb_SUK_FAACM.Text(StrValue.Element( 0));
-        lb_MaterialCode_FAACM.Text(StrValue.Element( 1));
-        lb_Unit_FAACM.Text(StrValue.Element( 2));
-        lb_Operator_FAACM.Text(ApplicationMacroPlanner.GetUserName());
-      }
-      // 鑾峰彇閫夋嫨鍚庣殑SKU
-      SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
-      if(not isnull( SelectItem) and SelectItem.Value().Length()>0)
-      {
-        StrValue := SelectItem.Value().Tokenize( ";");
-        txt_CustomID_FAACM.Text(StrValue.Element( 2));
-        txt_CustomName_FAACM.Text(StrValue.Element( 3));
+        if(SelectItem.ValueJsonString().Length()>0)
+        {
+          JInfo := JSON::Parse( SelectItem.ValueJsonString());
+          lb_SUK_FAACM.Text(JInfo.Get( "ParentSKU").GetString());
+          lb_MaterialCode_FAACM.Text(JInfo.Get( "SKU").GetString());
+          lb_Unit_FAACM.Text(JInfo.Get( "Unit").GetString());
+          lb_Operator_FAACM.Text(ApplicationMacroPlanner.GetUserName());
+          txt_CustomID_FAACM.Text(JInfo.Get( "CustomCode").GetString());
+          txt_CustomName_FAACM.Text(JInfo.Get( "CustomName").GetString());
+        }
       }
     *]
     GroupServerCalls: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/_ROOT_Component_FrmAuthorizeAndCountersign_Material.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/_ROOT_Component_FrmAuthorizeAndCountersign_Material.def
index 748bae7..97ec858 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/_ROOT_Component_FrmAuthorizeAndCountersign_Material.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/_ROOT_Component_FrmAuthorizeAndCountersign_Material.def
@@ -24,6 +24,7 @@
   Properties:
   [
     Description: '鍘熸潗鏂欏崐鎴愬搧鍙嶇鎺堟潈鏂板椤�'
+    Image: 'NAV_REDO_LIGHT_BLUE'
     Title: '鍘熸潗鏂欏崐鎴愬搧鍙嶇鎺堟潈鏂板椤�'
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_Panel261.def "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel261\043223.def"
similarity index 76%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_Panel261.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel261\043223.def"
index a826c6e..265489a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_Panel261.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel261\043223.def"
@@ -1,13 +1,13 @@
 Quintiq file version 2.0
-Component Panel261
+Component Panel261 id:Panel261_223
 {
-  #keys: '[414724.0.44249978]'
+  #keys: '[414724.0.117732107]'
   BaseType: 'WebPanel'
   Children:
   [
     Component btn_OK_FAAC
     {
-      #keys: '[414724.0.44279077]'
+      #keys: '[414724.0.117732108]'
       BaseType: 'WebButton'
       Properties:
       [
@@ -18,7 +18,7 @@
     }
     Component btn_Cancel_FAAC
     {
-      #keys: '[414724.0.44279090]'
+      #keys: '[414724.0.117732109]'
       BaseType: 'WebButton'
       Properties:
       [
@@ -34,6 +34,6 @@
     Border: true
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 2
+    Taborder: 10
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel796.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel796.def
new file mode 100644
index 0000000..c14c1c2
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel796.def
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+Component Panel796
+{
+  #keys: '[414724.0.116871632]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component Label417
+    {
+      #keys: '[414724.0.115502113]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        Description: '璁㈠崟鍙嶆綔鎺堟潈鏂板椤�'
+        Taborder: 0
+        Text: '璁㈠崟鍙嶆綔鎺堟潈鏂板椤�'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Border: true
+    FixedSize: true
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel989.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel989.def
new file mode 100644
index 0000000..843fb81
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_Panel989.def
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+Component Panel989
+{
+  #keys: '[414724.0.115531444]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ds_NeedDate id:ds_NeedDate_456
+    {
+      #keys: '[414724.0.117731536]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        Label: '闇�姹傛棩鏈�'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop.def "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop\043217.def"
similarity index 74%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop\043217.def"
index 49964fc..430b7a1 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop\043217.def"
@@ -1,13 +1,13 @@
 Quintiq file version 2.0
-Component PanelTop
+Component PanelTop id:PanelTop_217
 {
-  #keys: '[414724.0.43072496]'
+  #keys: '[414724.0.117731595]'
   BaseType: 'WebPanel'
   Children:
   [
     Component lb_SKUCode_FAAC
     {
-      #keys: '[414724.0.43602743]'
+      #keys: '[414724.0.117731596]'
       BaseType: 'WebLabel'
       Properties:
       [
@@ -22,6 +22,6 @@
   [
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 1
+    Taborder: 2
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop104.def "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop104\043150.def"
similarity index 69%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop104.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop104\043150.def"
index 2d52f9c..d4b262c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop104.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop104\043150.def"
@@ -1,20 +1,22 @@
 Quintiq file version 2.0
-Component PanelTop104
+Component PanelTop104 id:PanelTop104_150
 {
-  #keys: '[414724.0.43764561]'
+  #keys: '[414724.0.117731993]'
   BaseType: 'WebPanel'
   Children:
   [
     Component txt_CustomName_FAAC
     {
-      #keys: '[414724.0.43764592]'
+      #keys: '[414724.0.117731994]'
       BaseType: 'WebEditField'
       Properties:
       [
         Description: '瀹㈡埛鍚嶇О'
+        Enabled: false
         Label: '瀹㈡埛鍚嶇О'
         NumberOfColumns: 30
         PlaceHolder: '璇疯緭鍏�'
+        ReadOnly: true
         Taborder: 0
       ]
     }
@@ -23,6 +25,6 @@
   [
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 7
+    Taborder: 8
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop264.def "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop264\04319.def"
similarity index 74%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop264.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop264\04319.def"
index 9d587c8..5867a16 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop264.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop264\04319.def"
@@ -1,13 +1,13 @@
 Quintiq file version 2.0
-Component PanelTop264
+Component PanelTop264 id:PanelTop264_19
 {
-  #keys: '[414724.0.43764392]'
+  #keys: '[414724.0.117731831]'
   BaseType: 'WebPanel'
   Children:
   [
     Component lb_Util_FAAC
     {
-      #keys: '[414724.0.43764416]'
+      #keys: '[414724.0.117731832]'
       BaseType: 'WebLabel'
       Properties:
       [
@@ -23,6 +23,6 @@
   [
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 4
+    Taborder: 5
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop360.def "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop360\043136.def"
similarity index 74%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop360.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop360\043136.def"
index 6e7e7dc..c090ecc 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop360.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop360\043136.def"
@@ -1,13 +1,13 @@
 Quintiq file version 2.0
-Component PanelTop360
+Component PanelTop360 id:PanelTop360_136
 {
-  #keys: '[414724.0.43764343]'
+  #keys: '[414724.0.117731775]'
   BaseType: 'WebPanel'
   Children:
   [
     Component np_Qty_FAAC
     {
-      #keys: '[414724.0.43764374]'
+      #keys: '[414724.0.117731776]'
       BaseType: 'WebNumberPicker'
       Properties:
       [
@@ -24,6 +24,6 @@
   [
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 3
+    Taborder: 4
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop597.def "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop597\043324.def"
similarity index 76%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop597.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop597\043324.def"
index 861f761..9a7965f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop597.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop597\043324.def"
@@ -1,13 +1,13 @@
 Quintiq file version 2.0
-Component PanelTop597
+Component PanelTop597 id:PanelTop597_324
 {
-  #keys: '[414724.0.43764439]'
+  #keys: '[414724.0.117731885]'
   BaseType: 'WebPanel'
   Children:
   [
     Component ddsl_OperateType_FAAC
     {
-      #keys: '[414724.0.44398642]'
+      #keys: '[414724.0.117731886]'
       BaseType: 'WebDropDownStringList'
       Properties:
       [
@@ -23,6 +23,6 @@
   [
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 5
+    Taborder: 6
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop612.def "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop612\043612.def"
similarity index 74%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop612.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop612\043612.def"
index 855b473..8b3d242 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop612.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop612\043612.def"
@@ -1,13 +1,13 @@
 Quintiq file version 2.0
-Component PanelTop612
+Component PanelTop612 id:PanelTop612_612
 {
-  #keys: '[414724.0.43764662]'
+  #keys: '[414724.0.117732047]'
   BaseType: 'WebPanel'
   Children:
   [
     Component lb_Operator_FAAC
     {
-      #keys: '[414724.0.43764687]'
+      #keys: '[414724.0.117732048]'
       BaseType: 'WebLabel'
       Properties:
       [
@@ -23,6 +23,6 @@
   [
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 8
+    Taborder: 9
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop744.def "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop744\043568.def"
similarity index 73%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop744.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop744\043568.def"
index 6408506..586a39f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop744.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop744\043568.def"
@@ -1,13 +1,13 @@
 Quintiq file version 2.0
-Component PanelTop744
+Component PanelTop744 id:PanelTop744_568
 {
-  #keys: '[414724.0.43764285]'
+  #keys: '[414724.0.117731719]'
   BaseType: 'WebPanel'
   Children:
   [
     Component lb_SKUName_FAAC
     {
-      #keys: '[414724.0.43764315]'
+      #keys: '[414724.0.117731720]'
       BaseType: 'WebLabel'
       Properties:
       [
@@ -22,6 +22,6 @@
   [
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 2
+    Taborder: 3
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop846.def "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop846\043618.def"
similarity index 68%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop846.def
rename to "_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop846\043618.def"
index 07e3ec6..ae982c7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign/Component_PanelTop846.def
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Component_PanelTop846\043618.def"
@@ -1,19 +1,21 @@
 Quintiq file version 2.0
-Component PanelTop846
+Component PanelTop846 id:PanelTop846_618
 {
-  #keys: '[414724.0.43764508]'
+  #keys: '[414724.0.117731939]'
   BaseType: 'WebPanel'
   Children:
   [
     Component txt_CustomID_FAAC
     {
-      #keys: '[414724.0.43764542]'
+      #keys: '[414724.0.117731940]'
       BaseType: 'WebEditField'
       Properties:
       [
+        Enabled: false
         Label: '瀹㈡埛ID'
         NumberOfColumns: 30
         PlaceHolder: '璇疯緭鍏�'
+        ReadOnly: true
         Taborder: 0
       ]
     }
@@ -22,7 +24,7 @@
   [
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 6
+    Taborder: 7
     Visible: false
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_OnCreated.def
new file mode 100644
index 0000000..7c4d5f5
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_OnCreated.def
@@ -0,0 +1,43 @@
+Quintiq file version 2.0
+#parent: #root
+Response OnCreated () id:Response_FrmAuthorizeAndCountersign_Order_OnCreated
+{
+  #keys: '[414724.0.117762728]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      // 闇�姹傛棩鏈燂紝榛樿涓嬩竴涓槦鏈熶簲
+      ds_NeedDate.Date(H_FunctionClass::SM_GetNextFriday());
+      
+      // 鑾峰彇閫夋嫨鍚庣殑SKU
+      SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
+      if(not isnull( SelectItem))
+      {
+        if(SelectItem.ValueJsonString().Length()>0)
+        {
+          // 寰楀埌閫変腑鐨勯娴嬭鍗�
+          SelForecast := JSON::Parse( SelectItem.ValueJsonString());
+          lb_SKUCode_FAAC.Text(SelForecast.Get( "SKU").GetString());
+          lb_SKUName_FAAC.Text("浜у搧");
+          lb_Util_FAAC.Text(SelForecast.Get( "Util").GetString());
+          txt_CustomID_FAAC.Text(SelForecast.Get( "CustomCode").GetString());
+          txt_CustomName_FAAC.Text(SelForecast.Get( "CustomName").GetString());
+          lb_Operator_FAAC.Text(ApplicationMacroPlanner.GetUserName());
+          
+      //    StrValue := SelectItem.Value().Tokenize( ";");
+      //    lb_SKUCode_FAAC.Text(StrValue.Element( 0));
+      //    lb_SKUName_FAAC.Text("浜у搧");
+      //    lb_Operator_FAAC.Text("");
+      //    lb_Util_FAAC.Text(StrValue.Element( 1));
+      //    txt_CustomID_FAAC.Text(StrValue.Element( 2));
+      //    txt_CustomName_FAAC.Text(StrValue.Element( 3));
+      //    lb_Operator_FAAC.Text(ApplicationMacroPlanner.GetUserName());
+        }
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_Panel261_223_btn_Cancel_FAAC_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_Panel261_223_btn_Cancel_FAAC_OnClick.def
new file mode 100644
index 0000000..f6e1d12
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_Panel261_223_btn_Cancel_FAAC_OnClick.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: Panel261_223/btn_Cancel_FAAC
+Response OnClick () id:Response_Panel261_223_btn_Cancel_FAAC_OnClick
+{
+  #keys: '[414724.0.117732105]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      FrmAuthorizeAndCountersign_Order.Close();
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_Panel261_223_btn_OK_FAAC_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_Panel261_223_btn_OK_FAAC_OnClick.def
new file mode 100644
index 0000000..fbcc28f
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/Response_Panel261_223_btn_OK_FAAC_OnClick.def
@@ -0,0 +1,37 @@
+Quintiq file version 2.0
+#parent: Panel261_223/btn_OK_FAAC
+Response OnClick () id:Response_Panel261_223_btn_OK_FAAC_OnClick
+{
+  #keys: '[414724.0.117732106]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan);
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      // 鏁伴噺
+      Qty := [Number]np_Qty_FAAC.Number().Round( 0);
+      OperateMsg :="";
+      OperateResult := H_FunctionClass::SM_OrderReverseOrAuthorize(  MacroPlan,lb_Util_FAAC.Text() ,"-",ds_NeedDate.Date() ,txt_CustomID_FAAC.Text(),lb_SKUCode_FAAC.Text(),Qty,
+                                                            lb_Operator_FAAC.Text(),txt_CustomName_FAAC.Text(),OperateMsg,ddsl_OperateType_FAAC.Text());
+      
+      if( OperateResult)
+      {
+        FrmAuthorizeAndCountersign_Order.Close();
+        if( OperateMsg.Length()>0)
+        {
+            WebMessageBox::Success( OperateMsg);
+        }
+      }
+      else
+      {
+        WebMessageBox::Warning( OperateMsg);
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/_ROOT_Component_FrmAuthorizeAndCountersign_Order.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/_ROOT_Component_FrmAuthorizeAndCountersign_Order.def
new file mode 100644
index 0000000..83cde43
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Order/_ROOT_Component_FrmAuthorizeAndCountersign_Order.def
@@ -0,0 +1,28 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent FrmAuthorizeAndCountersign_Order
+{
+  #keys: '[414724.0.115523082]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: Panel796
+    #child: Panel989
+    #child: PanelTop_217
+    #child: PanelTop744_568
+    #child: PanelTop360_136
+    #child: PanelTop264_19
+    #child: PanelTop597_324
+    #child: PanelTop846_618
+    #child: PanelTop104_150
+    #child: PanelTop612_612
+    #child: Panel261_223
+  ]
+  Properties:
+  [
+    Description: '鍘熸潗鏂欏崐鎴愬搧鍙嶇鎺堟潈鏂板椤�'
+    Image: 'NAV_REDO_LIGHT_BLUE'
+    Title: '璁㈠崟鍙嶇鎺堟潈鏂板椤�'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def
index f24ffbd..f4e6b0e 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def
@@ -11,7 +11,7 @@
       BaseType: 'WebDataExtractor'
       Properties:
       [
-        DataType: 'structured[Product_MP]'
+        DataType: 'structured[H_MaterialInfo]'
         Source: 'dh_FM_PruductMP'
         Taborder: 0
         Transformation: 'Elements'
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"TotalInventoryLevels","title":"TotalInventoryLevels","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"TotalInventoryLevels"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Level","title":"Level","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Level"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsProductCategory","title":"IsProductCategory","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsProductCategory"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"鐗╂枡缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaterialType","title":"鐗╂枡绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaterialType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaterialName","title":"鐗╂枡鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaterialName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NeedQty","title":"闇�姹傛暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NeedQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NeedDate","title":"闇�姹傛椂闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NeedDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"缁勭粐浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockPoint","title":"搴撳瓨鐐�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockPoint"}}]'
         ContextMenu: 'listContextMenu892'
         Taborder: 2
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def
index 987148b..a9de040 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def
@@ -24,7 +24,7 @@
       [
         NumberOfColumns: 15
         PlaceHolder: '妯$硦鎼滅储'
-        Taborder: 1
+        Taborder: 2
       ]
     }
     Component btn_Query_FM
@@ -35,7 +35,7 @@
       [
         Image: 'VIEW'
         Label: '鏌ヨ'
-        Taborder: 2
+        Taborder: 3
       ]
     }
     Component btn_Add_FM
@@ -46,7 +46,34 @@
       [
         Image: 'ADD2'
         Label: '鏂板鍙嶇/鎺堟潈'
-        Taborder: 3
+        Taborder: 4
+      ]
+      ResponseDefinitions:
+      [
+        ResponseDefinition OnClick id:Responsedef_Panel418_btn_Add_FM_OnClick
+        {
+          #keys: '[414724.0.145266825]'
+          IsInherited: false
+          ResponseType: 'OnClick'
+          Arguments:
+          [
+            ResponseDefinitionArgument selection
+            {
+              #keys: '[271.0.74853915]'
+              Binding: 'List832.Selection()'
+            }
+          ]
+        }
+      ]
+    }
+    Component ds_Month_FM
+    {
+      #keys: '[414724.0.148121614]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        DateFormat: 'YMM'
+        Taborder: 1
       ]
     }
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def
new file mode 100644
index 0000000..b04f7cf
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def
@@ -0,0 +1,44 @@
+Quintiq file version 2.0
+#parent: List832
+Response OnDoubleClick (
+  H_MaterialInfo selection
+) id:Response_List832_OnDoubleClick
+{
+  #keys: '[414724.0.160542461]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebList_OnDoubleClick'
+  QuillAction
+  {
+    Body:
+    [*
+      if( not isnull( selection))
+      {
+        if(selection.MaterialType()="鍗婃垚鍝�")
+        {
+          OrderCode:="";
+          if( txtSaveForecastData_FM.Text().Length()>0)
+          {
+            JForecast := JSON::Parse( txtSaveForecastData_FM.Text());
+            OrderCode := JForecast.Get( "OrderCode").GetString();
+          }
+         jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.NeedQty(), OrderCode,"-",selection.NeedDate());
+          if(jResult.Get( "Status").GetBoolean())
+          {
+                de_dh_FM_ProductMP.FixedFilter( "object.ParentSKU() = " +  selection.SKU().AsQUILL()
+                                                + " and object.ForecastID() = " + OrderCode.AsQUILL()
+                                                );
+          }
+          else
+          {
+            WebMessageBox::Warning( jResult.Get( "Msg").GetString());
+          }
+        }
+        else
+        {
+            // 寮瑰嚭鐗╂枡鍙嶇鎺堟潈
+        }
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnSelectionChanged.def
deleted file mode 100644
index 4b24dec..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnSelectionChanged.def
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: List832
-Response OnSelectionChanged (
-  Product_MP selection
-) id:Response_List832_OnSelectionChanged
-{
-  #keys: '[414724.0.113297034]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebList_OnSelectionChanged'
-  QuillAction
-  {
-    Body:
-    [*
-      SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmMaterial" and Obj.ItemKey()="ListSelect");
-      if( isnull( SelectItem))
-      {
-         MacroPlan.H_MessagePassing(relnew,FKey :="FrmMaterial",ItemKey := "ListSelect",Value := "");
-      }
-      SelectItem.Value(lb_SUK_FM.Text()+";"+ selection.ID() +";"+selection.UnitOfMeasureName()+";");
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def
index 1704689..c3a42c1 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def
@@ -2,20 +2,28 @@
 #parent: #root
 Response OnCreated () id:Response_FrmMaterial_OnCreated
 {
-  #keys: '[414724.0.93205703]'
+  #keys: '[414724.0.118802220]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebComponent_OnCreated'
   QuillAction
   {
     Body:
     [*
+      ds_Month_FM.Date(Date::ActualDate());
+      txtSaveForecastData_FM.Text("");
       // 鑾峰彇閫夋嫨鍚庣殑SKU
       SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
-      if(not isnull( SelectItem) and SelectItem.Value().Length()>0)
+      if(not isnull( SelectItem))
       {
-        StrValue := SelectItem.Value().Tokenize( ";");
-        lb_SUK_FM.Text(StrValue.Element( 0));
-        de_dh_FM_ProductMP.FixedFilter( "object.ParentID()="+lb_SUK_FM.Text());
+        if( SelectItem.ValueJsonString().Length()>0)
+        {
+          txtSaveForecastData_FM.Text(  SelectItem.ValueJsonString());
+          JSelect := JSON::Parse( SelectItem.ValueJsonString());
+          lb_SUK_FM.Text(JSelect.Get( "SKU").GetString());
+          de_dh_FM_ProductMP.FixedFilter( "object.ParentSKU() = " + JSelect.Get( "SKU").GetString().AsQUILL()
+                                          + " and object.ForecastID() = " + JSelect.Get( "OrderCode").GetString().AsQUILL()
+                                          );
+        }
       }
     *]
     GroupServerCalls: false
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick\043975.def" "b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick\043975.def"
new file mode 100644
index 0000000..dd32915
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick\043975.def"
@@ -0,0 +1,54 @@
+Quintiq file version 2.0
+#parent: Panel418/btn_Add_FM
+Response OnClick (
+  H_MaterialInfo selection
+) id:Response_Panel418_btn_Add_FM_OnClick_975
+{
+  #keys: '[414724.0.145238844]'
+  CanBindMultiple: false
+  DefinitionID => /Panel418/Responsedef_Panel418_btn_Add_FM_OnClick
+  Precondition:
+  [*
+    return not isnull( MacroPlan);
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmMaterial" and Obj.ItemKey()="ListSelect");
+      CustomCode:="";
+      CustomName:="";
+      SValue:="";
+      SValueJsonString:="";
+      // 鑾峰彇瀹㈡埛鍚嶇О鍜屽鎴稩D
+      if(txtSaveForecastData_FM.Text().Length()>0)
+      {
+         jForecast := JSON::Parse( txtSaveForecastData_FM.Text());
+         CustomCode := jForecast.Get( "CustomCode").GetString();
+         CustomName := jForecast.Get( "CustomName").GetString();
+      }
+      if(not isnull(selection))
+      {
+        SValueJsonString:= JSON::Object().Add( "SKU",selection.SKU())
+                    .Add( "MaterialName",selection.MaterialName())
+                    .Add( "MaterialType",selection.MaterialType())
+                    .Add( "OrgCode",selection.OrgCode())
+                    .Add( "Unit",selection.Unit())
+                    .Add( "CustomCode",CustomCode)
+                    .Add( "ParentSKU",lb_SUK_FM.Text())
+                    .Add( "CustomName",CustomName).Build().AsString();
+      }
+      if( isnull( SelectItem))
+      {
+        MacroPlan.H_MessagePassing(relnew,FKey := "FrmMaterial",ItemKey := "ListSelect", Value:=SValue,ValueJsonString:=SValueJsonString);
+      }
+      else
+      {
+        SelectItem.Value(SValue);
+        SelectItem.ValueJsonString( SValueJsonString);
+      }
+      Application.OpenForm( "FrmAuthorizeAndCountersign_Material","modal");
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick.def
deleted file mode 100644
index 6d50114..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick.def
+++ /dev/null
@@ -1,20 +0,0 @@
-Quintiq file version 2.0
-#parent: Panel418/btn_Add_FM
-Response OnClick () id:Response_Panel418_btn_Add_FM_OnClick
-{
-  #keys: '[414724.0.93205915]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  Precondition:
-  [*
-    return not isnull( MacroPlan);
-  *]
-  QuillAction
-  {
-    Body:
-    [*
-      Application.OpenForm( "FrmAuthorizeAndCountersign_Material","popout");
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def
index 822a47c..d0ec30d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def
@@ -9,10 +9,17 @@
   {
     Body:
     [*
-      de_dh_FM_ProductMP.FixedFilter( "object.ID().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" );
-      //                                             + " or " + "object.SKU().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )"  
-      //                                             + " or " + "object.CustomerCode().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" 
-      //                                             + " or " + "object.CustomerName().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" );
+      de_dh_FM_ProductMP.FixedFilter( "( object.SKU().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )"
+                                                   + " or " + "object.MaterialType().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )"  
+                                                   + " or " + "object.MaterialName().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" 
+                                                   + " or " + "object.Unit().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" 
+                                                   + " or " + "object.OrgCode().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" 
+                                                   + " or " + "object.StockPoint().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" 
+                                                   + " or " + "object.Unit().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " ))" 
+                                                   + " and " + "( object.NeedDate() < " + ds_Month_FM.Date().StartOfNextMonth().AsQUILL()  
+                                                   + " and " + "object.NeedDate() >= " + ds_Month_FM.Date().StartOfMonth().AsQUILL() + " )"
+                                      
+                                      );
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def
index 899892b..d1b24d6 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def
@@ -14,7 +14,7 @@
     {
       #keys: '[414724.0.53475285]'
       BaseType: 'WebDataHolder'
-      Databinding: 'structured[Product_MP]*'
+      Databinding: 'structured[H_MaterialInfo]*'
       Children:
       [
         Component de_dh_FM_ProductMP
@@ -26,7 +26,7 @@
             DataType: 'MacroPlan'
             Source: 'MacroPlan'
             Taborder: 0
-            Transformation: 'Product_MP'
+            Transformation: 'H_MaterialInfo'
           ]
         }
       ]
@@ -35,10 +35,26 @@
         Taborder: 2
       ]
     }
+    Component txtSaveForecastData_FM
+    {
+      #keys: '[414724.0.143737386]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Description: '瀛樺偍鎵�閫夌墿鏂欎俊鎭�'
+        Enabled: false
+        ReadOnly: true
+        Taborder: 4
+        Visible: false
+      ]
+    }
   ]
   Properties:
   [
     Description: '鍘熸枡鍒楄〃椤�'
+    Image: 'NAV_REDO_LIGHT_BLUE'
+    MinimumColumns: 80
+    MinimumRows: 40
     Title: '鍘熸枡鍒楄〃椤�'
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def
new file mode 100644
index 0000000..c6fbad5
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def
@@ -0,0 +1,96 @@
+Quintiq file version 2.0
+Component Panel351
+{
+  #keys: '[414724.0.115504403]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component btn_Add_Order_FOF449
+    {
+      #keys: '[414724.0.115504404]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Description: '璁㈠崟鏂板鍙嶇/鎺堟潈'
+        Label: '璁㈠崟鏂板鍙嶇/鎺堟潈'
+        Taborder: 1
+      ]
+      ResponseDefinitions:
+      [
+        ResponseDefinition OnClick id:Responsedef_Panel351_btn_Add_Order_FOF449_OnClick
+        {
+          #keys: '[414724.0.141224456]'
+          IsInherited: false
+          ResponseType: 'OnClick'
+          Arguments:
+          [
+            ResponseDefinitionArgument selection
+            {
+              #keys: '[271.0.41037309]'
+              Binding: 'liH_Forecast.Selection()'
+            }
+          ]
+        }
+      ]
+    }
+    Component btn_Add_Material_FOF503
+    {
+      #keys: '[414724.0.115504405]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Description: '鍘熸枡鏂板鍙嶇/鎺堟潈'
+        Label: '鍘熸枡鏂板鍙嶇/鎺堟潈'
+        Taborder: 2
+      ]
+      ResponseDefinitions:
+      [
+        ResponseDefinition OnClick id:Responsedef_Panel351_btn_Add_Material_FOF503_OnClick
+        {
+          #keys: '[414724.0.145304022]'
+          IsInherited: false
+          ResponseType: 'OnClick'
+          Arguments:
+          [
+            ResponseDefinitionArgument selection
+            {
+              #keys: '[271.0.68431130]'
+              Binding: 'liH_Forecast.Selection()'
+            }
+          ]
+        }
+      ]
+    }
+    Component btn_InitialData778
+    {
+      #keys: '[414724.0.115504406]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Description: '鍔犺浇鏁版嵁锛堝亣鐨勶紝鍚庣画闇�瑕佸鎺ユ暟鎹級'
+        Label: '鍔犺浇棰勬祴璁㈠崟鏁版嵁'
+        Taborder: 0
+        Visible: false
+      ]
+    }
+    Component btn_OrderH_FOF
+    {
+      #keys: '[414724.0.165490408]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Description: 'ERO璁㈠崟鍐插噺'
+        Image: 'AMMUNITION_BOX_CLOSED'
+        Label: 'ERP璁㈠崟鍐插噺'
+        Taborder: 3
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel383.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel383.def
index a5ffa10..ff6b8ad 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel383.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel383.def
@@ -48,5 +48,6 @@
     MinimumColumns: 80
     Orientation: 'horizontal'
     Taborder: 0
+    Visible: false
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel647.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel647.def
index 9fb6eb2..7b147ac 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel647.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel647.def
@@ -36,6 +36,7 @@
         Description: '鍔犺浇鏁版嵁锛堝亣鐨勶紝鍚庣画闇�瑕佸鎺ユ暟鎹級'
         Label: '鍔犺浇棰勬祴璁㈠崟鏁版嵁'
         Taborder: 0
+        Visible: false
       ]
     }
   ]
@@ -43,7 +44,6 @@
   [
     Alignment: 'trailing'
     FixedSize: true
-    MinimumColumns: 20
     Orientation: 'horizontal'
     Taborder: 1
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel849.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel849.def
index 46d28e9..35b07f6 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel849.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel849.def
@@ -10,8 +10,10 @@
   ]
   Properties:
   [
+    Description: '宸茬粡闅愯棌锛屾殏鏈娇鐢�'
     FixedSize: true
     Orientation: 'horizontal'
-    Taborder: 1
+    Taborder: 2
+    Visible: false
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_liH_Forecast.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_liH_Forecast.def
index bc95d75..e056848 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_liH_Forecast.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_liH_Forecast.def
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"OrderCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"ForecastQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NeedTime","title":"NeedTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NeedTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Util","title":"Util","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Util"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomName","title":"CustomName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Department","title":"Department","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Department"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"璁㈠崟缂栧彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"棰勬祴鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NeedTime","title":"闇�姹傛椂闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NeedTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Util","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Util"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomName","title":"瀹㈡埛鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Department","title":"閿�鍞儴闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Department"}}]'
         ContextMenu: 'listContextMenu367'
         Taborder: 2
       ]
@@ -36,6 +36,6 @@
   ]
   Properties:
   [
-    Taborder: 6
+    Taborder: 7
   ]
 }
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_list_ForecastView_FOF\043670.def" "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_list_ForecastView_FOF\043670.def"
index 4104d43..0c21175 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_list_ForecastView_FOF\043670.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_list_ForecastView_FOF\043670.def"
@@ -37,7 +37,7 @@
   ]
   Properties:
   [
-    Taborder: 4
+    Taborder: 5
     Visible: false
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnClose.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnClose.def
index 9800a96..29988bb 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnClose.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnClose.def
@@ -13,7 +13,8 @@
       SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
       if( not isnull( SelectItem))
       {
-        SelectItem.Value("");  
+        SelectItem.Value(""); 
+        SelectItem.ValueJsonString("");
       }
     *]
     GroupServerCalls: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def
index 4991801..5cb899a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def
@@ -11,41 +11,12 @@
     [*
       // 鍒濆鍖栨煡璇㈠弬鏁版湀浠�
       ds_Month_FOF.Date(Date::ActualDate());
-      // 棰勬祴鏁版嵁2姝ゅ鐞嗭紙绛涢��+瀹㈡埛鍚嶇О鎻愬彇锛�
-      if( MacroPlan.H_Forecast(relget ).Size()>0)
+      // 鍒濆鍖栭娴嬫暟鎹�
+      JResult := H_FunctionClass::SM_InitialForcastData( MacroPlan);
+      if(not JResult.Get( "Status").GetBoolean())
       {
-        MacroPlan.H_Forecast(relget ).Delete( 0,MacroPlan.H_Forecast(relget ).Size()-1);
+          WebMessageBox::Warning( JResult.Get( "Msg").GetString());
       }
-      //AllData:= selectset( MacroPlan, Product_MP.SalesDemand.astype( Forecast ),object,object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth() 
-      //                     and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth()
-      //                     and object.Quantity()>0 );
-      //
-      //CustomName:="";
-      //DepartMent:="";
-      //idx:=0;
-      //traverse( AllData,Elements,Obj,not isnull(Obj))
-      //{
-      //  idx:=Obj.SalesSegmentName().FindString( "_",0);
-      //  if(idx>0)
-      //  {
-      //    DepartMent:=Obj.SalesSegmentName().SubString( 0,idx+1);
-      //    CustomName := Obj.SalesSegmentName().SubString( idx+1, Obj.SalesSegmentName().Length() - (idx+1));
-      //  }
-      //  else
-      //  {
-      //    CustomName :=Obj.SalesSegmentName();
-      //  }
-      //  
-      //   ArrayData:=Obj.SalesSegmentName().SubString( 0,Obj.SalesSegmentName().FindString( "_",0)+1);
-      //   MacroPlan.H_Forecast(relnew,OrderCode := H_FunctionClass::SM_GenerateID( "OF"),
-      //                          SKU := Obj.ProductID(),
-      //                          CustomCode := CustomName,
-      //                         CustomName := CustomName,
-      //                         Util:=Obj.UnitOfMeasureName(),
-      //                         NeedTime:=Obj.EndDate(),
-      //                         ForecastQty:=[Number]Obj.Quantity().Round( 0),
-      //                         Department:=DepartMent);
-      //}
     *]
     GroupServerCalls: false
   }
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick\043222.def" "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick\043222.def"
new file mode 100644
index 0000000..0f50e1f
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick\043222.def"
@@ -0,0 +1,58 @@
+Quintiq file version 2.0
+#parent: Panel351/btn_Add_Material_FOF503
+Response OnClick (
+  H_Forecast selection
+) id:Response_Panel351_btn_Add_Material_FOF503_OnClick_222
+{
+  #keys: '[414724.0.145178766]'
+  CanBindMultiple: false
+  DefinitionID => /Panel351/Responsedef_Panel351_btn_Add_Material_FOF503_OnClick
+  QuillAction
+  {
+    Body:
+    [*
+      if( not isnull( selection))
+      {
+        SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
+        if( isnull( SelectItem))
+        {
+           MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",
+                                       Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(),
+                                       ValueJsonString := JSON::Object().Add( "SKU",selection.SKU())
+                                                                         .Add( "Util",selection.Util())
+                                                                         .Add( "CustomCode",selection.CustomCode())
+                                                                         .Add( "CustomName",selection.CustomName())
+                                                                         .Add( "ForecastQty",selection.ForecastQty())
+                                                                         .Add( "NeedTime",selection.NeedTime().AsQUILL())
+                                                                         .Add( "OrderCode",selection.OrderCode()).Build().AsString());
+        }
+        else
+        {
+          SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName());
+          SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU())
+                                   .Add( "Util",selection.Util())
+                                   .Add( "CustomCode",selection.CustomCode())
+                                   .Add( "CustomName",selection.CustomName())
+                                   .Add( "ForecastQty",selection.ForecastQty())
+                                   .Add( "NeedTime",selection.NeedTime().AsQUILL())
+                                   .Add( "OrderCode",selection.OrderCode()).Build().AsString());
+        }
+        
+        jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.OrderCode(),"-",selection.NeedTime());
+        if(jResult.Get( "Status").GetBoolean())
+        {
+            Application.OpenForm( "FrmMaterial","popout");
+        }
+        else
+        {
+          WebMessageBox::Warning( jResult.Get( "Msg").GetString());
+        }
+      }
+      else
+      {
+        WebMessageBox::Information( "璇烽�夋嫨涓�椤归娴嬪悗鍐嶇偣鍑绘寜閽紒");  
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Order_FOF449_OnClick\043880.def" "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Order_FOF449_OnClick\043880.def"
new file mode 100644
index 0000000..bf1f99c
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Order_FOF449_OnClick\043880.def"
@@ -0,0 +1,43 @@
+Quintiq file version 2.0
+#parent: Panel351/btn_Add_Order_FOF449
+Response OnClick (
+  H_Forecast selection
+) id:Response_Panel351_btn_Add_Order_FOF449_OnClick_880
+{
+  #keys: '[414724.0.141244111]'
+  CanBindMultiple: false
+  DefinitionID => /Panel351/Responsedef_Panel351_btn_Add_Order_FOF449_OnClick
+  QuillAction
+  {
+    Body:
+    [*
+      if( not isnull( selection))
+      {
+        SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
+        if( isnull( SelectItem))
+        {
+           MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",
+                                       Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(),
+                                       ValueJsonString := JSON::Object().Add( "SKU",selection.SKU())
+                                                                         .Add( "Util",selection.Util())
+                                                                         .Add( "CustomCode",selection.CustomCode())
+                                                                         .Add( "CustomName",selection.CustomName()).Build().AsString());
+        }
+        else
+        {
+          SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName());
+          SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU())
+                                   .Add( "Util",selection.Util())
+                                   .Add( "CustomCode",selection.CustomCode())
+                                   .Add( "CustomName",selection.CustomName()).Build().AsString());
+        }
+        Application.OpenForm( "FrmAuthorizeAndCountersign_Order","modal");  
+      }
+      else
+      {
+        WebMessageBox::Information( "璇烽�夋嫨涓�椤归娴嬪悗鍐嶇偣鍑绘寜閽紒");  
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_InitialData778_OnClick\043971.def" "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_InitialData778_OnClick\043971.def"
new file mode 100644
index 0000000..7ec4937
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_InitialData778_OnClick\043971.def"
@@ -0,0 +1,35 @@
+Quintiq file version 2.0
+#parent: Panel351/btn_InitialData778
+Response OnClick () id:Response_Panel351_btn_InitialData778_OnClick_971
+{
+  #keys: '[414724.0.141222418]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      //// 娌℃湁鐢ㄧ殑鎸夐挳鍜屽嚱鏁帮紝鍙负浜嗘祴璇曠敓鎴愬亣鏁版嵁銆�
+      //StrCustoms:="XM_2023,灏忕背;HW_2023,鍗庝负;OV_2023,VIVO;OP_2023,OPPO;HX_2023,娴蜂俊;YJ_2023,涓�鍔�;HE_2023,娴峰皵;GL_2023,鏍煎姏;";
+      //ArrayCustom := StrCustoms.Tokenize( ";"); //8涓鎴�
+      //idx :=0;
+      //for( i:=0;i<20;i:=i+1)
+      //{
+      //  idx :=Number::Random( 0,7);
+      //  arrCustomInfo := ArrayCustom.Element( idx).Tokenize( ",");
+      //  MacroPlan.H_Forecast(relnew, CustomName := arrCustomInfo.Element( 1),CustomCode := arrCustomInfo.Element( 0),ForecastQty := Number::Random( 100,5000),
+      //                        Department := "閿�鍞�1閮�",NeedTime := Date::ActualDate(),OrderCode := H_FunctionClass::SM_GenerateID( "OF") ,SKU := "SKU-CP-2023-N"+(Number::Random( 1000,9999)).AsQUILL(),Util := "PCS");  
+      //  
+      //}
+      //// 鐢熸垚棰勬祴 瀹炴椂鏁版嵁锛屽弽绛炬暟鎹紝鎺堟潈鏁版嵁锛堝弽绛� 鎺堟潈榛樿涓�0锛屽鑷姩鍒涘缓锛岃繖閲屼笉鍐嶆坊鍔狅級
+      // traverse(MacroPlan,H_Forecast ,Obj,not isnull(Obj) )
+      //{
+      //  MacroPlan.H_OrderForecastRealQty(relnew,CustomID := Obj.CustomCode(),CustomName := Obj.CustomName(),ForecatsQty := Obj.ForecastQty(),
+      //                                    ForecatsRealQty := Obj.ForecastQty(),ID := H_FunctionClass::SM_GenerateID( "OF"),Month := Date::ActualDate(),
+      //                                    OrderCode := Obj.OrderCode(),SKU := Obj.SKU(),Unit := Obj.Util());
+      //                                    
+      //}
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_OrderH_FOF_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_OrderH_FOF_OnClick.def
new file mode 100644
index 0000000..4aa4c40
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_OrderH_FOF_OnClick.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: Panel351/btn_OrderH_FOF
+Response OnClick () id:Response_Panel351_btn_OrderH_FOF_OnClick
+{
+  #keys: '[414724.0.166610329]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      H_FunctionClass::SM_OrderHedging( MacroPlan,true,"System","ERP璁㈠崟");
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_Add_Order_FOF_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_Add_Order_FOF_OnClick.def
index dae89b3..82c16f5 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_Add_Order_FOF_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_Add_Order_FOF_OnClick.def
@@ -16,7 +16,7 @@
       SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
       if(not isnull( SelectItem) and SelectItem.Value().Length()>0)
       {
-        Application.OpenForm( "FrmAuthorizeAndCountersign","popout");
+        Application.OpenForm( "FrmAuthorizeAndCountersign_Order","popout");
       }
       else
       {
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def
index 0fbfea6..991029e 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def
@@ -14,10 +14,37 @@
       SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
       if( isnull( SelectItem))
       {
-         MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",Value := "");
+         MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",
+                                     Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(),
+                                     ValueJsonString := JSON::Object().Add( "SKU",selection.SKU())
+                                                                       .Add( "Util",selection.Util())
+                                                                       .Add( "CustomCode",selection.CustomCode())
+                                                                       .Add( "CustomName",selection.CustomName())
+                                                                       .Add( "ForecastQty",selection.ForecastQty())
+                                                                       .Add( "NeedTime",selection.NeedTime().AsQUILL())
+                                                                       .Add( "OrderCode",selection.OrderCode()).Build().AsString());
       }
-      SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName());
-      Application.OpenForm( "FrmMaterial","popout");
+      else
+      {
+        SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName());
+        SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU())
+                                 .Add( "Util",selection.Util())
+                                 .Add( "CustomCode",selection.CustomCode())
+                                 .Add( "CustomName",selection.CustomName())
+                                 .Add( "ForecastQty",selection.ForecastQty())
+                                 .Add( "NeedTime",selection.NeedTime().AsQUILL())
+                                 .Add( "OrderCode",selection.OrderCode()).Build().AsString());
+      }
+      
+      jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.OrderCode(),"-",selection.NeedTime());
+      if(jResult.Get( "Status").GetBoolean())
+      {
+        Application.OpenForm( "FrmMaterial","popout");
+      }
+      else
+      {
+        WebMessageBox::Warning( jResult.Get( "Msg").GetString());
+      }
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnSelectionChanged.def
deleted file mode 100644
index 7f12e18..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnSelectionChanged.def
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: liH_Forecast
-Response OnSelectionChanged (
-  H_Forecast selection
-) id:Response_liH_Forecast_OnSelectionChanged
-{
-  #keys: '[414724.0.111760968]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebList_OnSelectionChanged'
-  QuillAction
-  {
-    Body:
-    [*
-      SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
-      if( isnull( SelectItem))
-      {
-         MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",Value := "");
-      }
-      SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName());
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/_ROOT_Component_FrmOrderForecast.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/_ROOT_Component_FrmOrderForecast.def
index 17a5ad7..d6e1cad 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/_ROOT_Component_FrmOrderForecast.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/_ROOT_Component_FrmOrderForecast.def
@@ -43,7 +43,7 @@
       ]
       Properties:
       [
-        Taborder: 3
+        Taborder: 4
       ]
     }
     #child: Panel961
@@ -93,7 +93,7 @@
       ]
       Properties:
       [
-        Taborder: 2
+        Taborder: 3
       ]
     }
     Component dh_FOF_H_Forecast
@@ -118,15 +118,16 @@
       ]
       Properties:
       [
-        Taborder: 5
+        Taborder: 6
       ]
     }
     #child: liH_Forecast
+    #child: Panel351
   ]
   Properties:
   [
     Description: '璁㈠崟棰勬祴椤甸潰'
-    Image: 'GOLDFISH'
+    Image: 'NAV_REDO_LIGHT_BLUE'
     Title: '棰勬祴鍒楄〃椤�'
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def
index 8a9e630..915ae2c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"OrderCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderQty","title":"OrderQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"ReverseQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"AuthorizeQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"ForecastQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastHitQty","title":"ForecastHitQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastNoHitQty","title":"ForecastNoHitQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastNoHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerCode","title":"CustomerCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerCode"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"璁㈠崟缂栧彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderQty","title":"鏂板璁㈠崟","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"鍙嶇","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"鎺堟潈","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"棰勬祴","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastHitQty","title":"鏈夐娴�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastNoHitQty","title":"鏃犻娴�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastNoHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"瀹㈡埛鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerCode","title":"瀹㈡埛ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"CustomerCode"}}]'
         ContextMenu: 'listContextMenu526'
         Taborder: 2
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/_ROOT_Component_FrmOrderResult.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/_ROOT_Component_FrmOrderResult.def
index 8dfdddb..800dab9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/_ROOT_Component_FrmOrderResult.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/_ROOT_Component_FrmOrderResult.def
@@ -39,6 +39,7 @@
   Properties:
   [
     Description: '璁㈠崟鍐插噺杩囩▼鍙婅鍗曟爣绛惧睍绀�'
+    Image: 'NAV_REDO_LIGHT_BLUE'
     Title: '璁㈠崟鍐插噺杩囩▼鍙婅鍗曟爣绛惧睍绀�'
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_List696.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_List696.def
new file mode 100644
index 0000000..efcc861
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_List696.def
@@ -0,0 +1,41 @@
+Quintiq file version 2.0
+Component List696
+{
+  #keys: '[414724.0.118276730]'
+  BaseType: 'WebList'
+  Children:
+  [
+    Component DataExtractor838
+    {
+      #keys: '[414724.0.118276731]'
+      BaseType: 'WebDataExtractor'
+      Properties:
+      [
+        DataType: 'structured[H_MaterialHedgingResult]'
+        Source: 'dh_FRAS'
+        Taborder: 0
+        Transformation: 'Elements'
+      ]
+    }
+    #child: listActionBarPage112
+    Component DataSetLevel187
+    {
+      #keys: '[414724.0.118276736]'
+      BaseType: 'WebDataSetLevel'
+      Children:
+      [
+        #child: listContextMenu660
+      ]
+      Properties:
+      [
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MType","title":"绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"棰勬祴鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"鎺堟潈鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"瀹㈡埛鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}}]'
+        ContextMenu: 'listContextMenu660'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 3
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel224.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel224.def
new file mode 100644
index 0000000..f95c042
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel224.def
@@ -0,0 +1,49 @@
+Quintiq file version 2.0
+Component Panel224
+{
+  #keys: '[414724.0.132480968]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ds_Month_FRAS
+    {
+      #keys: '[414724.0.132481008]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        Enabled: false
+        Taborder: 0
+        Visible: false
+      ]
+    }
+    Component txt_QueryContent_FRAS
+    {
+      #keys: '[414724.0.132481038]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        PlaceHolder: '妯$硦鎼滅储'
+        Taborder: 1
+      ]
+    }
+    Component btn_Query_FRAS
+    {
+      #keys: '[414724.0.132481089]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        ButtonSize: 'compact'
+        Image: 'VIEW'
+        Label: '鏌ヨ'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel950.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel950.def
new file mode 100644
index 0000000..462c772
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel950.def
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+Component Panel950
+{
+  #keys: '[414724.0.133671405]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component Label782
+    {
+      #keys: '[414724.0.133671432]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        Taborder: 0
+        Text: '鍙嶇鍜屾巿鏉冨垪琛ㄥ睍绀洪〉'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Border: true
+    FixedSize: true
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listActionBarPage748.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_listActionBarPage112.def
similarity index 60%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listActionBarPage748.def
rename to _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_listActionBarPage112.def
index 20c42d7..87cb9f4 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listActionBarPage748.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_listActionBarPage112.def
@@ -1,7 +1,7 @@
 Quintiq file version 2.0
-Component listActionBarPage748
+Component listActionBarPage112
 {
-  #keys: '[414724.0.58710450]'
+  #keys: '[414724.0.118276733]'
   BaseType: 'listActionBarPage'
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listContextMenu623.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_listContextMenu660.def
similarity index 61%
rename from _Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listContextMenu623.def
rename to _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_listContextMenu660.def
index 5042401..2e47e11 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listContextMenu623.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_listContextMenu660.def
@@ -1,7 +1,7 @@
 Quintiq file version 2.0
-Component listContextMenu623
+Component listContextMenu660
 {
-  #keys: '[414724.0.58710455]'
+  #keys: '[414724.0.118276738]'
   BaseType: 'listContextMenu'
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Response_OnCreated.def
new file mode 100644
index 0000000..d06421f
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Response_OnCreated.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Response OnCreated () id:Response_FrmRAShow_OnCreated
+{
+  #keys: '[414724.0.134602766]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      ds_Month_FRAS.Date(Date::ActualDate());
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Response_Panel224_btn_Query_FRAS_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Response_Panel224_btn_Query_FRAS_OnClick.def
new file mode 100644
index 0000000..98c1c99
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Response_Panel224_btn_Query_FRAS_OnClick.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: Panel224/btn_Query_FRAS
+Response OnClick () id:Response_Panel224_btn_Query_FRAS_OnClick
+{
+  #keys: '[414724.0.135920812]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      de_dh_FRAS.FixedFilter( "object.ID().LikeUserLocale( " + txt_QueryContent_FRAS.Text().AsQUILL() + " )" 
+                                                   + " or " + "object.SKU().LikeUserLocale( " + txt_QueryContent_FRAS.Text().AsQUILL() + " )"  
+                                                   + " or " + "object.CustomerCode().LikeUserLocale( " + txt_QueryContent_FRAS.Text().AsQUILL() + " )" 
+                                                   + " or " + "object.CustomerName().LikeUserLocale( " + txt_QueryContent_FRAS.Text().AsQUILL() + " )" 
+                                                   );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/_ROOT_Component_FrmRAShow.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/_ROOT_Component_FrmRAShow.def
index 47bbf7d..5ccc42c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/_ROOT_Component_FrmRAShow.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/_ROOT_Component_FrmRAShow.def
@@ -5,8 +5,41 @@
 {
   #keys: '[414724.0.87341476]'
   BaseType: 'WebForm'
+  Children:
+  [
+    #child: List696
+    Component dh_FRAS
+    {
+      #keys: '[414724.0.118276696]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'structured[H_MaterialHedgingResult]*'
+      Children:
+      [
+        Component de_dh_FRAS
+        {
+          #keys: '[414724.0.118276712]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'H_MaterialHedgingResult'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Taborder: 2
+      ]
+    }
+    #child: Panel950
+    #child: Panel224
+  ]
   Properties:
   [
     Description: '鍘熸枡鍙嶇鍜屾巿鏉冨睍绀�'
+    Image: 'NAV_REDO_LIGHT_BLUE'
+    Title: '鍙嶇鍜屾巿鏉冨垪琛ㄥ睍绀洪〉'
   ]
 }
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_ListData_FT\043710.def" "b/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_ListData_FT\043710.def"
deleted file mode 100644
index a540a2e..0000000
--- "a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_ListData_FT\043710.def"
+++ /dev/null
@@ -1,41 +0,0 @@
-Quintiq file version 2.0
-Component ListData_FT
-{
-  #keys: '[414724.0.58710447]'
-  BaseType: 'WebList'
-  Children:
-  [
-    Component DataExtractor206
-    {
-      #keys: '[414724.0.58710448]'
-      BaseType: 'WebDataExtractor'
-      Properties:
-      [
-        DataType: 'structured[Product_MP]'
-        Source: 'DataHolder623'
-        Taborder: 0
-        Transformation: 'Elements'
-      ]
-    }
-    #child: listActionBarPage748
-    Component DataSetLevel675
-    {
-      #keys: '[414724.0.58710453]'
-      BaseType: 'WebDataSetLevel'
-      Children:
-      [
-        #child: listContextMenu623
-      ]
-      Properties:
-      [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CanBeExported","title":"CanBeExported","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"CanBeExported"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayIndex","title":"DisplayIndex","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DisplayIndex"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"HasMaturation","title":"HasMaturation","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"HasMaturation"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"HasConversionFactor","title":"HasConversionFactor","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"HasConversionFactor"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ExpiredInPeriodShelfLifeSupplyQuantityInDefaultUOM","title":"ExpiredInPeriodShelfLifeSupplyQuantityInDefaultUOM","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ExpiredInPeriodShelfLifeSupplyQuantityInDefaultUOM"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"HasParent","title":"HasParent","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"HasParent"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"HasPlanning","title":"HasPlanning","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"HasPlanning"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"HasProductLevel","title":"HasProductLevel","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"HasProductLevel"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"HasRecipe","title":"HasRecipe","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"HasRecipe"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"HasShelfLife","title":"HasShelfLife","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"HasShelfLife"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"HasShelfLifeOrMaturation","title":"HasShelfLifeOrMaturation","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"HasShelfLifeOrMaturation"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"HasValidProductLevel","title":"HasValidProductLevel","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"HasValidProductLevel"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IconName","title":"IconName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IconName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImgHasSalesDemand","title":"ImgHasSalesDemand","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImgHasSalesDemand"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImgIsActive","title":"ImgIsActive","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImgIsActive"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IndentationSymbol","title":"IndentationSymbol","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IndentationSymbol"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsByProduct","title":"IsByProduct","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsByProduct"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsDerivedByProduct","title":"IsDerivedByProduct","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsDerivedByProduct"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsDerivedExcludeFromFulfillmentKPI","title":"IsDerivedExcludeFromFulfillmentKPI","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsDerivedExcludeFromFulfillmentKPI"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsExcludedFromFulfillmentKPI","title":"IsExcludedFromFulfillmentKPI","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsExcludedFromFulfillmentKPI"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsExcludedFromOptimization","title":"IsExcludedFromOptimization","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsExcludedFromOptimization"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsImbalance","title":"IsImbalance","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsImbalance"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsIncludedInBalancing","title":"IsIncludedInBalancing","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsIncludedInBalancing"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsLeaf","title":"IsLeaf","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsLeaf"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsManuallyConfigured","title":"IsManuallyConfigured","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsManuallyConfigured"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsPlannedAfterOptimization","title":"IsPlannedAfterOptimization","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsPlannedAfterOptimization"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsProductCategory","title":"IsProductCategory","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsProductCategory"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsSoftDeleted","title":"IsSoftDeleted","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsSoftDeleted"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsSystem","title":"IsSystem","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsSystem"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsUsed","title":"IsUsed","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsUsed"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsUsedInProcess","title":"IsUsedInProcess","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsUsedInProcess"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsValidData","title":"IsValidData","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsValidData"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"KPIBalanceViolationMeta","title":"KPIBalanceViolationMeta","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"KPIBalanceViolationMeta"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"KPIMaximumInventory","title":"KPIMaximumInventory","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"KPIMaximumInventory"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"KPIMinimumInventory","title":"KPIMinimumInventory","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"KPIMinimumInventory"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"KPITargetInventory","title":"KPITargetInventory","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"KPITargetInventory"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Level","title":"Level","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Level"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaturationDays","title":"MaturationDays","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaturationDays"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MinSalesDemandQuantity","title":"MinSalesDemandQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"MinSalesDemandQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaxSalesDemandQuantity","title":"MaxSalesDemandQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"MaxSalesDemandQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Name","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Notes","title":"Notes","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Notes"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfProductInStockingPoint","title":"NumberOfProductInStockingPoint","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"NumberOfProductInStockingPoint"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfShelfLifeViolations","title":"NumberOfShelfLifeViolations","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"NumberOfShelfLifeViolations"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ParentID","title":"ParentID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ParentID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SanityCheckDataMostSevere","title":"SanityCheckDataMostSevere","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"SanityCheckDataMostSevere"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SanityCheckDataMostSevereCount","title":"SanityCheckDataMostSevereCount","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"SanityCheckDataMostSevereCount"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SanityCheckDataTotalViolationCount","title":"SanityCheckDataTotalViolationCount","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"SanityCheckDataTotalViolationCount"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShelfLife","title":"ShelfLife","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShelfLife"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"TotalInventoryLevels","title":"TotalInventoryLevels","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"TotalInventoryLevels"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"TotalInventorySupply","title":"TotalInventorySupply","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"TotalInventorySupply"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"TotalSalesDemand","title":"TotalSalesDemand","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"TotalSalesDemand"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Type","title":"Type","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Type"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}}]'
-        ContextMenu: 'listContextMenu623'
-        Taborder: 2
-      ]
-    }
-  ]
-  Properties:
-  [
-    Taborder: 2
-  ]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_Panel675.def b/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_Panel675.def
deleted file mode 100644
index a7dc33b..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_Panel675.def
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-Component Panel675
-{
-  #keys: '[414724.0.58893964]'
-  BaseType: 'WebPanel'
-  Children:
-  [
-    Component ButtonClear
-    {
-      #keys: '[414724.0.58893989]'
-      BaseType: 'WebButton'
-      Properties:
-      [
-        Label: 'ClearDtaa'
-        Taborder: 0
-      ]
-    }
-  ]
-  Properties:
-  [
-    Taborder: 0
-  ]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Response_Panel675_ButtonClear_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Response_Panel675_ButtonClear_OnClick.def
deleted file mode 100644
index 8ea5738..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Response_Panel675_ButtonClear_OnClick.def
+++ /dev/null
@@ -1,36 +0,0 @@
-Quintiq file version 2.0
-#parent: Panel675/ButtonClear
-Response OnClick () id:Response_Panel675_ButtonClear_OnClick
-{
-  #keys: '[414724.0.58894009]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  GroupServerCalls: true
-  Precondition:
-  [*
-    return not isnull( MacroPlan);
-  *]
-  QuillAction
-  {
-    Body:
-    [*
-      try{
-        H_FunctionClass::UpdateAuthorizeRealQty( MacroPlan);
-        /*
-        ExecuteCount :=0;
-        while(not isnull(MacroPlan.H_ReverseRealQty(relget ).First())  and ExecuteCount<20)
-        {
-          MacroPlan.H_ErrorLogs(relnew,EClassName := "1",EDateTime := DateTime::ActualGMTTime(),EFunctionName := ExecuteCount.AsQUILL());
-          ExecuteCount:=ExecuteCount+1;
-          MacroPlan.H_ReverseRealQty(relget ).First().Delete();
-        }
-        */
-      }
-      onerror{
-        MacroPlan.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "UpdateMaterialItems",
-                             DeveloperInformation :=  e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(),
-                             GeneralInformation := e.GeneralInformation());
-      }
-    *]
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/_ROOT_Component_FrmTEST.def b/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/_ROOT_Component_FrmTEST.def
deleted file mode 100644
index 77d883c..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/_ROOT_Component_FrmTEST.def
+++ /dev/null
@@ -1,42 +0,0 @@
-Quintiq file version 2.0
-#root
-#parent: MacroPlannerWebApp
-OrphanComponent FrmTEST
-{
-  #keys: '[414724.0.57640752]'
-  BaseType: 'WebForm'
-  Children:
-  [
-    #child: ListData_FT
-    Component DataHolder623
-    {
-      #keys: '[414724.0.57601078]'
-      BaseType: 'WebDataHolder'
-      Databinding: 'structured[Product_MP]*'
-      Children:
-      [
-        Component DataExtractor391
-        {
-          #keys: '[414724.0.58771962]'
-          BaseType: 'WebDataExtractor'
-          Properties:
-          [
-            DataType: 'MacroPlan'
-            Source: 'MacroPlan'
-            Taborder: 0
-            Transformation: 'Product_MP'
-          ]
-        }
-      ]
-      Properties:
-      [
-        Taborder: 1
-      ]
-    }
-    #child: Panel675
-  ]
-  Properties:
-  [
-    Description: '娴嬭瘯绐椾綋锛屾煡鐪嬫暟鎹娇鐢�'
-  ]
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def
new file mode 100644
index 0000000..d04a4cb
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def
@@ -0,0 +1,41 @@
+Quintiq file version 2.0
+Component List212
+{
+  #keys: '[414724.0.153225431]'
+  BaseType: 'WebList'
+  Children:
+  [
+    Component DataExtractor924
+    {
+      #keys: '[414724.0.153225432]'
+      BaseType: 'WebDataExtractor'
+      Properties:
+      [
+        DataType: 'MacroPlan'
+        Source: 'MacroPlan'
+        Taborder: 0
+        Transformation: 'MappingProduct'
+      ]
+    }
+    #child: listActionBarPage441
+    Component DataSetLevel622
+    {
+      #keys: '[414724.0.153225437]'
+      BaseType: 'WebDataSetLevel'
+      Children:
+      [
+        #child: listContextMenu182
+      ]
+      Properties:
+      [
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"BusinessType","title":"BusinessType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"BusinessType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CommonBusiness","title":"CommonBusiness","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CommonBusiness"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsCommon","title":"IsCommon","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsCommon"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"KeyProduct","title":"KeyProduct","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"KeyProduct"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Name","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Notes","title":"Notes","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Notes"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductMajorType","title":"ProductMajorType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductMajorType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSubclassType","title":"ProductSubclassType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductSubclassType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShelfLife","title":"ShelfLife","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShelfLife"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}}]'
+        ContextMenu: 'listContextMenu182'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listActionBarPage748.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def
similarity index 60%
copy from _Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listActionBarPage748.def
copy to _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def
index 20c42d7..bb08f37 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listActionBarPage748.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def
@@ -1,7 +1,7 @@
 Quintiq file version 2.0
-Component listActionBarPage748
+Component listActionBarPage441
 {
-  #keys: '[414724.0.58710450]'
+  #keys: '[414724.0.153225434]'
   BaseType: 'listActionBarPage'
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listContextMenu623.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def
similarity index 61%
copy from _Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listContextMenu623.def
copy to _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def
index 5042401..e5e38ee 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FrmTEST/Component_listContextMenu623.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def
@@ -1,7 +1,7 @@
 Quintiq file version 2.0
-Component listContextMenu623
+Component listContextMenu182
 {
-  #keys: '[414724.0.58710455]'
+  #keys: '[414724.0.153225439]'
   BaseType: 'listContextMenu'
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def
new file mode 100644
index 0000000..d37a96f
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+#parent: Button593
+Response OnClick () id:Response_Frm_TEST_Button593_OnClick
+{
+  #keys: '[414724.0.153411735]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      HObj := H_FunctionClass::SM_GetProductInfo( MacroPlan,"");
+      if( not isnull( HObj))
+      {
+        WebMessageBox::Information( HObj.BusinessType());  
+      }
+      else
+      {
+        WebMessageBox::Information( "寰楀埌鐨勭┖鍊�");  
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button687_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button687_OnClick.def
new file mode 100644
index 0000000..6698b0e
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button687_OnClick.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: Button687
+Response OnClick () id:Response_Frm_TEST_Button687_OnClick
+{
+  #keys: '[414724.0.164341791]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      H_FunctionClass::SM_OrderHedging( MacroPlan,true,"System","ERP璁㈠崟");
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def
new file mode 100644
index 0000000..7f726bf
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def
@@ -0,0 +1,61 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent Frm_TEST
+{
+  #keys: '[414724.0.153225415]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: List212
+    Component DataHolder417
+    {
+      #keys: '[414724.0.153253171]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'structured[MappingProduct]*'
+      Children:
+      [
+        Component DataExtractor742
+        {
+          #keys: '[414724.0.153253184]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'MappingProduct'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Taborder: 2
+      ]
+    }
+    Component Button593
+    {
+      #keys: '[414724.0.153411711]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'MONITOR_RGB'
+        Label: '娴嬭瘯'
+        Taborder: 0
+      ]
+    }
+    Component Button687
+    {
+      #keys: '[414724.0.164341716]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Taborder: 3
+      ]
+    }
+  ]
+  Properties:
+  [
+    Title: '娴嬭瘯椤甸潰'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/OrderLock.vw b/_Main/UI/MacroPlannerWebApp/Views/OrderLock.vw
index 0cae0ba..a309668 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/OrderLock.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/OrderLock.vw
@@ -4,204 +4,403 @@
   {
     forms
     {
-      form_legacy_1
+      form_FormOrderLockLog
       {
-        title: 'Scenario manager'
+        title: 'QTIANMA_JITUAN::FormOrderLockLog'
         shown: true
-        componentID: 'FormScenarioManager'
+        componentID: 'QTIANMA_JITUAN::FormOrderLockLog'
         layout
         {
           mode: 'open'
-          rowPosition: 1
+          rowPosition: 14
           rowSpan: 8
           columnPosition: 1
-          columnSpan: 5
+          columnSpan: 12
         }
         components
         {
-          FormScenarioManager_ListScenario
+          FormOrderLockLog_PanelOrderLockLog
+          {
+            sizeRatio: 1
+          }
+          FormOrderLockLog_ListOrderLockLog
           {
           }
-          FormScenarioManager_DataSetLevelScenario
+          FormOrderLockLog_DataSetLevelOrderLockLog
           {
             groupDepth: -1
-            column_All_constraints
+            sort: 'DESC:Notes'
+            column_OrderID
             {
-              columnId: 'All constraints'
-              dataPath: 'All constraints'
+              columnId: 'OrderID'
+              dataPath: 'OrderID'
               dataType: 'string'
-              title: 'All constraints'
+              title: '璁㈠崟鍙�'
               index: 0
               subtotals: ''
-              width: 90
+              width: 150
             }
-            column_Name
+            column_ProductID
             {
-              columnId: 'Name'
-              dataPath: 'Name'
+              columnId: 'ProductID'
+              dataPath: 'ProductID'
               dataType: 'string'
-              title: '鍚嶇О'
+              title: '鐗╂枡鍙�'
               index: 1
               subtotals: ''
-              width: 277
+              width: 150
             }
-            column_ChangedBy
+            column_SalesSegmentName
             {
-              columnId: 'ChangedBy'
-              dataPath: 'ChangedBy'
+              columnId: 'SalesSegmentName'
+              dataPath: 'SalesSegmentName'
               dataType: 'string'
-              title: 'Changed by'
+              title: '閿�鍞儴闂�'
               index: 2
               subtotals: ''
-              width: 106
+              width: 150
             }
-            column_ChangedOn
+            column_StockingPointID
             {
-              columnId: 'ChangedOn'
-              dataPath: 'ChangedOn'
-              dataType: 'datetime'
-              title: 'Changed on'
-              index: 3
-              subtotals: ''
-              width: 99
-            }
-            column_StorageMode
-            {
-              columnId: 'StorageMode'
-              dataPath: 'StorageMode'
+              columnId: 'StockingPointID'
+              dataPath: 'StockingPointID'
               dataType: 'string'
-              title: 'StorageMode'
-              index: 4
-              subtotals: ''
-              width: 40
-            }
-          }
-        }
-      }
-      form_legacy_2
-      {
-        title: 'Assumptions'
-        shown: true
-        componentID: 'FormAssumptions'
-        layout
-        {
-          mode: 'open'
-          rowPosition: 9
-          rowSpan: 8
-          columnPosition: 1
-          columnSpan: 5
-        }
-        components
-        {
-          FormAssumptions_ListAssumptions
-          {
-          }
-          FormAssumptions_DataSetLevelAssumptions
-          {
-            groupDepth: -1
-            column_All_constraints
-            {
-              columnId: 'All constraints'
-              dataPath: 'All constraints'
-              dataType: 'string'
-              title: 'All constraints'
-              index: 0
-              subtotals: ''
-              width: 32
-            }
-            column_Category
-            {
-              columnId: 'Category'
-              dataPath: 'Category'
-              dataType: 'string'
-              title: '绫诲埆'
-              index: 1
-              subtotals: ''
-              width: 108
-            }
-            column_Importance
-            {
-              columnId: 'Importance'
-              dataPath: 'Importance'
-              dataType: 'string'
-              title: '閲嶈鎬�'
-              index: 2
-              subtotals: ''
-              width: 110
-            }
-            column_Title
-            {
-              columnId: 'Title'
-              dataPath: 'Title'
-              dataType: 'string'
-              title: '鏍囬'
+              title: '搴撳瓨鐐�'
               index: 3
               subtotals: ''
               width: 150
             }
-            column_ChangedBy
+            column_CustomerName
             {
-              columnId: 'ChangedBy'
-              dataPath: 'ChangedBy'
+              columnId: 'CustomerName'
+              dataPath: 'CustomerName'
               dataType: 'string'
-              title: 'Changed by'
+              title: '瀹㈡埛鍚嶇О'
               index: 4
               subtotals: ''
               width: 150
             }
-            column_CreatedOn
+            column_Quantity
             {
-              columnId: 'CreatedOn'
-              dataPath: 'CreatedOn'
-              dataType: 'datetime'
-              title: 'Created on'
+              columnId: 'Quantity'
+              dataPath: 'Quantity'
+              dataType: 'real'
               index: 5
               subtotals: ''
               width: 150
             }
+            column_UnitOfMeasureName
+            {
+              columnId: 'UnitOfMeasureName'
+              dataPath: 'UnitOfMeasureName'
+              dataType: 'string'
+              title: '鍗曚綅'
+              index: 6
+              subtotals: ''
+              width: 150
+            }
+            column_Price
+            {
+              columnId: 'Price'
+              dataPath: 'Price'
+              dataType: 'real'
+              title: '閿�鍞'
+              index: 7
+              subtotals: ''
+              width: 150
+            }
+            column_EndDate
+            {
+              columnId: 'EndDate'
+              dataPath: 'EndDate'
+              dataType: 'date'
+              title: '瀹㈡埛闇�姹傛椂闂�'
+              index: 8
+              subtotals: ''
+              width: 150
+            }
+            column_IsLocked
+            {
+              columnId: 'IsLocked'
+              dataPath: 'IsLocked'
+              dataType: 'boolean'
+              title: '鐘舵��'
+              index: 9
+              subtotals: ''
+              width: 150
+            }
+            column_End
+            {
+              columnId: 'End'
+              dataPath: 'End'
+              dataType: 'date'
+              title: '璁″垝浜や粯鏃堕棿'
+              index: 10
+              subtotals: ''
+              width: 150
+            }
+            column_LastModify
+            {
+              columnId: 'LastModify'
+              dataPath: 'LastModify'
+              dataType: 'string'
+              title: '鏈�鍚庢搷浣滀汉'
+              index: 11
+              subtotals: ''
+              width: 150
+            }
+            column_LastModifyTime
+            {
+              columnId: 'LastModifyTime'
+              dataPath: 'LastModifyTime'
+              dataType: 'datetime'
+              title: '鏈�鍚庢搷浣滄椂闂�'
+              index: 12
+              subtotals: ''
+              width: 145
+            }
+            column_Notes
+            {
+              columnId: 'Notes'
+              dataPath: 'Notes'
+              dataType: 'string'
+              title: '鎿嶄綔璇︽儏'
+              index: 13
+              subtotals: ''
+              width: 150
+            }
           }
         }
       }
-      form_FormScenariosKPIsComparison
+      form_FormOrderLock
       {
-        title: 'QLibMacroPlannerWebUI::FormScenariosKPIsComparison'
+        title: 'QTIANMA_JITUAN::FormOrderLock'
         shown: true
-        componentID: 'QLibMacroPlannerWebUI::FormScenariosKPIsComparison'
+        componentID: 'QTIANMA_JITUAN::FormOrderLock'
         layout
         {
           mode: 'open'
           rowPosition: 1
-          rowSpan: 16
-          columnPosition: 6
-          columnSpan: 7
+          rowSpan: 13
+          columnPosition: 1
+          columnSpan: 12
         }
         components
         {
-          FormScenariosKPIsComparison_MatrixEditorFinancialKPIs
+          FormOrderLock_PanelOrderLock
+          {
+            sizeRatio: 1
+          }
+          FormOrderLock_PanelOrderLockHeader
+          {
+            sizeRatio: 1
+          }
+          FormOrderLock_PanelOrderLockOrder
+          {
+            sizeRatio: 1
+          }
+          FormOrderLock_ListOrderLock
+          {
+          }
+          FormOrderLock_DataSetLevelOrderLock
+          {
+            groupDepth: -1
+            sort: 'StartDate'
+            column_OrderID
+            {
+              columnId: 'OrderID'
+              dataPath: 'OrderID'
+              dataType: 'string'
+              title: '璁㈠崟鍙�'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_ProductID
+            {
+              columnId: 'ProductID'
+              dataPath: 'ProductID'
+              dataType: 'string'
+              title: '鐗╂枡鍙�'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_SalesSegmentName
+            {
+              columnId: 'SalesSegmentName'
+              dataPath: 'SalesSegmentName'
+              dataType: 'string'
+              title: '閿�鍞儴闂�'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+            column_StockingPointID
+            {
+              columnId: 'StockingPointID'
+              dataPath: 'StockingPointID'
+              dataType: 'string'
+              title: '搴撳瓨鐐�'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+            column_CustomerName
+            {
+              columnId: 'CustomerName'
+              dataPath: 'CustomerName'
+              dataType: 'string'
+              title: '瀹㈡埛鍚嶇О'
+              index: 4
+              subtotals: ''
+              width: 150
+            }
+            column_Quantity
+            {
+              columnId: 'Quantity'
+              dataPath: 'Quantity'
+              dataType: 'real'
+              index: 5
+              subtotals: ''
+              width: 150
+            }
+            column_UnitOfMeasureName
+            {
+              columnId: 'UnitOfMeasureName'
+              dataPath: 'UnitOfMeasureName'
+              dataType: 'string'
+              title: '鍗曚綅'
+              index: 6
+              subtotals: ''
+              width: 150
+            }
+            column_Price
+            {
+              columnId: 'Price'
+              dataPath: 'Price'
+              dataType: 'real'
+              title: '閿�鍞'
+              index: 7
+              subtotals: ''
+              width: 150
+            }
+            column_StartDate
+            {
+              columnId: 'StartDate'
+              dataPath: 'StartDate'
+              dataType: 'date'
+              title: '瀹㈡埛闇�姹傛椂闂�'
+              index: 8
+              subtotals: ''
+              width: 150
+            }
+            column_IsLocked
+            {
+              columnId: 'IsLocked'
+              dataPath: 'IsLocked'
+              dataType: 'boolean'
+              title: '鐘舵��'
+              index: 9
+              subtotals: ''
+              width: 150
+            }
+            column_First_AsPlanningBaseSalesDemandInPeriod_End
+            {
+              columnId: 'First.AsPlanningBaseSalesDemandInPeriod.End'
+              dataPath: 'First.AsPlanningBaseSalesDemandInPeriod.End'
+              dataType: 'datetime'
+              title: '璁″垝浜や粯鏃堕棿'
+              index: 10
+              subtotals: ''
+              width: 150
+            }
+            column_LastModify
+            {
+              columnId: 'LastModify'
+              dataPath: 'LastModify'
+              dataType: 'string'
+              title: '鏈�鍚庢搷浣滀汉'
+              index: 11
+              subtotals: ''
+              width: 150
+            }
+            column_LastModifyTime
+            {
+              columnId: 'LastModifyTime'
+              dataPath: 'LastModifyTime'
+              dataType: 'datetime'
+              title: '鏈�鍚庢搷浣滄椂闂�'
+              index: 12
+              subtotals: ''
+              width: 150
+            }
+          }
+          FormOrderLock_PanelOrderLockPlanning
+          {
+            sizeRatio: 1
+          }
+          FormOrderLock_PanelMatrix
+          {
+            sizeRatio: 1
+          }
+          FormOrderLock_MatrixEditorProductPlanning
           {
             gridColor: '#c4c4c4'
-            totalHeaderWidth: 200
-            attributeHeaderWidthRatio: 0.6
-            nameHeaderWidthRatio: 0.4
+            totalHeaderWidth: 427
+            attributeHeaderWidthRatio: 0.325989701966572
+            nameHeaderWidthRatio: 0.674010298033429
             columnWidth: 100
             horizontalGrid: true
             verticalGrid: true
             backendState
             {
-              componentId: 'QLibMacroPlannerWebUI::FormScenariosKPIsComparison.MatrixEditorFinancialKPIs'
+              componentId: 'QTIANMA_JITUAN::FormOrderLock.MatrixEditorProductPlanning'
               state
               {
                 cells
                 {
                   attributes
                   {
-                    attribute_DisplayValue
+                    attribute_DisplaySupplyQuantity
                     {
                       type: 'MatrixEditorWebApiCellDataModelInterest'
                       index: 0
                       rowsubtotal: ''
                       columnsubtotal: ''
-                      attribute: 'DisplayValue'
+                      attribute: 'DisplaySupplyQuantity'
+                    }
+                    attribute_DependentDemandAndSalesDemandQuantity
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 1
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'DependentDemandAndSalesDemandQuantity'
+                    }
+                    attribute_TargetInventoryLevel
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 2
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'TargetInventoryLevel'
+                    }
+                    attribute_InventoryLevelEnd
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 3
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'InventoryLevelEnd'
+                    }
+                    attribute_StockLevelInDays
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 4
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'StockLevelInDays'
                     }
                   }
                 }
@@ -209,14 +408,14 @@
                 {
                   sorting
                   {
-                    criteria: ''
+                    criteria: "datamember:'Start'"
                   }
                 }
                 rows
                 {
                   sorting
                   {
-                    criteria: "datamember:'KPISetting.DisplayIndex'"
+                    criteria: "datamember:'Product_MP.DisplayIndex';datamember:'Name'"
                   }
                 }
               }
@@ -337,10 +536,10 @@
     userconfigurableinformation
     {
     }
-    index: 2
-    image: 'DOCUMENT_LOCK'
     page: 'applicationDevelopmentActionBarPageDef'
     group: ''
+    index: 2
+    image: 'DOCUMENT_LOCK'
     description: ''
   }
   formatversion: 2
diff --git a/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp b/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp
index 74c8fca..cb94597 100644
--- a/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp
+++ b/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp
@@ -5,7 +5,7 @@
   ProjectProperties
   {
     ApplicationComponentName: 'ApplicationMacroPlanner'
-    BuildVersion: '2022.3.0.113'
+    BuildVersion: '2022.3.0.32'
     Description: 'Quintiq Macro Planner'
     ProjectKind: 'WebClient'
   }
diff --git a/_var/_Main/ProjSettings/MacroPlannerWebApp/TypeConfigs/CustomerOrder.qtc b/_var/_Main/ProjSettings/MacroPlannerWebApp/TypeConfigs/CustomerOrder.qtc
new file mode 100644
index 0000000..9fe1031
--- /dev/null
+++ b/_var/_Main/ProjSettings/MacroPlannerWebApp/TypeConfigs/CustomerOrder.qtc
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+{
+  SelectableAttributes
+  {
+    ID
+    {
+      attribute: 'ID'
+      isactive: true
+    }
+    IsLocked
+    {
+      attribute: 'IsLocked'
+      isactive: true
+    }
+  }
+  meta_
+  {
+    type: 'CustomerOrder'
+  }
+}

--
Gitblit v1.9.3