From 2f0418a875e0d7ab9b190d30b820389a79cefada Mon Sep 17 00:00:00 2001
From: yypsybs <yypsybs@foxmail.com>
Date: 星期三, 20 九月 2023 09:31:07 +0800
Subject: [PATCH] PR导出

---
 _Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonExportPR_OnClick.def                          |   21 +
 _Main/BL/Type_PRData/StaticMethod_ExportTheFileStream#595.qbl                                                                |   12 +
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_chartActionBarPageCapacityAndSaleBudge.def     |   10 
 _Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_Quantity.qbl                                                        |    7 
 _Main/BL/Type_GlobalDTOTable/Method_CapacityAndSaleBudgeBusinessTypeString.qbl                                               |   11 +
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_OnCreated.def                                   |   20 +
 _Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_BusinessTypeOrOrgCode.qbl                                           |    8 
 _Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream.qbl                                                             |   72 ++++++
 _Main/BL/Type_CapacityAndSaleBudgeChartElement/StaticMethod_TestData.qbl                                                     |   30 ++
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def |   27 ++
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def                        |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def        |   94 ++++++++
 _Main/BL/Type_GlobalDTOTable/Method_InitTestData.qbl                                                                         |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick.def      |   21 +
 _var/_Main/ProjSettings/MacroPlanner/Views/Empty__dialog_initialization__[124808.0.140900041].vw                             |    2 
 _Main/UI/MacroPlannerWebApp/Component_Form633/_ROOT_Component_FormPRData#633.def                                             |    1 
 _Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning#662.qbl                                                                 |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonCapacityAndSaleBudgeCompare_OnClick.def |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def    |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_ChartCapacityAndSaleBudgeChart.def             |   85 +++++++
 _Main/UI/MacroPlannerWebApp/Component_Form633/Component_PanelPRDataButton.def                                                |   11 +
 _Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonResendPR_OnClick.def             |    4 
 _Main/BL/Type_PRData/Attribute_IsPanelMaterial.qbl                                                                           |    2 
 _Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream#45.qbl                                                          |   12 +
 _Main/BL/Type_CapacityAndSaleBudgeChartElement/_ROOT_Type_CapacityAndSaleBudgeChartElement.qbl                               |   10 
 _Main/BL/Type_GlobalDTOTable/Method_CapacityAndSaleBudgePlaceOfProductionOfArrayString.qbl                                   |   11 +
 _Main/BL/Type_PRData/StaticMethod_ExportTheFileStream.qbl                                                                    |   78 +++++++
 _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl                                                           |   29 ++
 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_chartContextMenuCapacityAndSaleBudge.def       |   10 
 _Main/BL/Type_GlobalDTOTable/StaticMethod_CapacityAndSaleBudgeYearsString.qbl                                                |   14 +
 _Main/BL/Relations/Relation_CapacityAndSaleBudgeChartElement_ScenarioManager_ScenarioManager_Ca.qbl                          |   23 ++
 _Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_PanelPRHistoryButton.def                                   |   13 +
 _Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp                                                              |    2 
 _Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_TimeStringAndScenarioName.qbl                                       |    7 
 34 files changed, 649 insertions(+), 10 deletions(-)

diff --git a/_Main/BL/Relations/Relation_CapacityAndSaleBudgeChartElement_ScenarioManager_ScenarioManager_Ca.qbl b/_Main/BL/Relations/Relation_CapacityAndSaleBudgeChartElement_ScenarioManager_ScenarioManager_Ca.qbl
new file mode 100644
index 0000000..fcd971b
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CapacityAndSaleBudgeChartElement_ScenarioManager_ScenarioManager_Ca.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CapacityAndSaleBudgeChartElement_ScenarioManager_ScenarioManager_CapacityAndSaleBudgeChartElement
+{
+  #keys: '1[414384.0.852466576]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide ScenarioManager
+  {
+    #keys: '3[414384.0.852466578][414384.0.852466577][414384.0.852466579]'
+    Cardinality: '0to1'
+    ObjectDefinition: CapacityAndSaleBudgeChartElement
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide CapacityAndSaleBudgeChartElement
+  {
+    #keys: '3[414384.0.852466581][414384.0.852466580][414384.0.852466582]'
+    Cardinality: '1toN'
+    ObjectDefinition: ScenarioManager
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_BusinessTypeOrOrgCode.qbl b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_BusinessTypeOrOrgCode.qbl
new file mode 100644
index 0000000..bd447f7
--- /dev/null
+++ b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_BusinessTypeOrOrgCode.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute BusinessTypeOrOrgCode
+{
+  #keys: '3[414384.0.852466562][414384.0.852466561][414384.0.852466563]'
+  Description: '浜嬩笟閮�/闈㈡澘鍩哄湴'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_Quantity.qbl b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_Quantity.qbl
new file mode 100644
index 0000000..69947cf
--- /dev/null
+++ b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_Quantity.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Quantity
+{
+  #keys: '3[414384.0.852466539][414384.0.852466538][414384.0.852466540]'
+  ValueType: Real
+}
diff --git a/_Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_TimeStringAndScenarioName.qbl b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_TimeStringAndScenarioName.qbl
new file mode 100644
index 0000000..2bcb37e
--- /dev/null
+++ b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/Attribute_TimeStringAndScenarioName.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute TimeStringAndScenarioName
+{
+  #keys: '3[414384.0.852466529][414384.0.852466528][414384.0.852466530]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CapacityAndSaleBudgeChartElement/StaticMethod_TestData.qbl b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/StaticMethod_TestData.qbl
new file mode 100644
index 0000000..0f370d3
--- /dev/null
+++ b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/StaticMethod_TestData.qbl
@@ -0,0 +1,30 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod TestData (
+  ScenarioManager scenarioManager
+)
+{
+  Description: '鐢熸垚娴嬭瘯鏁版嵁'
+  TextBody:
+  [*
+    // yypsybs Sep-19-2023 (created)
+    
+    info( "鐢熸垚骞村害浜ч攢棰勭畻鎶ヨ〃娴嬭瘯鏁版嵁" )
+    
+    scenarioManager.CapacityAndSaleBudgeChartElement( relflush );
+    
+    for( sc := 0; sc < 4; sc := sc + 1 ) {
+      scenarioName := "SC" + [String]sc;
+      for( i := 0; i < 4; i := i + 1 ) {
+        businessTypeString := "BT" + [String]i;
+        for( j := 1; j <= 12; j := j + 1 ) {
+          monthString := "MONTH" + ifexpr( j < 10, "0" + [String]j, [String]j );
+          scenarioManager.CapacityAndSaleBudgeChartElement( relnew, 
+                                                            BusinessTypeOrOrgCode := businessTypeString, 
+                                                            TimeStringAndScenarioName := monthString + " - " + scenarioName, 
+                                                            Quantity := Real::Random( 20.0, 30.0 ) );
+        }
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_CapacityAndSaleBudgeChartElement/_ROOT_Type_CapacityAndSaleBudgeChartElement.qbl b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/_ROOT_Type_CapacityAndSaleBudgeChartElement.qbl
new file mode 100644
index 0000000..fb4319c
--- /dev/null
+++ b/_Main/BL/Type_CapacityAndSaleBudgeChartElement/_ROOT_Type_CapacityAndSaleBudgeChartElement.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type CapacityAndSaleBudgeChartElement
+{
+  #keys: '5[414384.0.852466525][414384.0.852466523][0.0.0][414384.0.852466524][414384.0.852466526]'
+  BaseType: Object
+  Description: '骞村害浜ч攢棰勭畻澶嶇洏鍥炬爣鍏冪礌'
+  StructuredName: 'CapacityAndSaleBudgeChartElements'
+}
diff --git a/_Main/BL/Type_GlobalDTOTable/Method_CapacityAndSaleBudgeBusinessTypeString.qbl b/_Main/BL/Type_GlobalDTOTable/Method_CapacityAndSaleBudgeBusinessTypeString.qbl
new file mode 100644
index 0000000..a9f779b
--- /dev/null
+++ b/_Main/BL/Type_GlobalDTOTable/Method_CapacityAndSaleBudgeBusinessTypeString.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+Method CapacityAndSaleBudgeBusinessTypeString () as owning String
+{
+  TextBody:
+  [*
+    // yypsybs Sep-19-2023 (created)
+    result := selectuniquevalues( this, CapacityAndSaleBudge, item, true, item.BusinessType() );
+    return result.Concatenate( ";" ) ;
+  *]
+}
diff --git a/_Main/BL/Type_GlobalDTOTable/Method_CapacityAndSaleBudgePlaceOfProductionOfArrayString.qbl b/_Main/BL/Type_GlobalDTOTable/Method_CapacityAndSaleBudgePlaceOfProductionOfArrayString.qbl
new file mode 100644
index 0000000..753ff1b
--- /dev/null
+++ b/_Main/BL/Type_GlobalDTOTable/Method_CapacityAndSaleBudgePlaceOfProductionOfArrayString.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+Method CapacityAndSaleBudgePlaceOfProductionOfArrayString () as owning String
+{
+  TextBody:
+  [*
+    // yypsybs Sep-19-2023 (created)
+    result := selectuniquevalues( this, CapacityAndSaleBudge, item, true, item.PlaceOfProductionOfArray() );
+    return result.Concatenate( ";" ) ;
+  *]
+}
diff --git a/_Main/BL/Type_GlobalDTOTable/Method_InitTestData.qbl b/_Main/BL/Type_GlobalDTOTable/Method_InitTestData.qbl
index 4c169d3..db96b72 100644
--- a/_Main/BL/Type_GlobalDTOTable/Method_InitTestData.qbl
+++ b/_Main/BL/Type_GlobalDTOTable/Method_InitTestData.qbl
@@ -24,7 +24,7 @@
     for( i := 1; i < 100; i := i + 1 ) {
       this.CapacityAndSaleBudge( relnew, 
                                  PlaceOfProductionOfArray := "闈㈡澘鍩哄湴" + [String]Number::Random( 1, 10 ), 
-                                 OrgCode := "浜嬩笟閮�" + [String]Number::Random( 1, 10 ), 
+                                 BusinessType := "浜嬩笟閮�" + [String]Number::Random( 1, 10 ), 
                                  CapacityInPCSInMonth1 := Number::Random( 1, 10000 ),  
                                  CapacityInPCSInMonth2 := Number::Random( 1, 10000 ),  
                                  CapacityInPCSInMonth3 := Number::Random( 1, 10000 ),  
diff --git a/_Main/BL/Type_GlobalDTOTable/StaticMethod_CapacityAndSaleBudgeYearsString.qbl b/_Main/BL/Type_GlobalDTOTable/StaticMethod_CapacityAndSaleBudgeYearsString.qbl
new file mode 100644
index 0000000..d59f61d
--- /dev/null
+++ b/_Main/BL/Type_GlobalDTOTable/StaticMethod_CapacityAndSaleBudgeYearsString.qbl
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CapacityAndSaleBudgeYearsString () as String
+{
+  TextBody:
+  [*
+    // yypsybs Sep-19-2023 (created)
+    years := construct( Strings );;
+    for( i := Date::ActualDate().Year(); i < Date::ActualDate().Year() + 10; i := i + 1 ) {
+      years.Add( [String]i );
+    }
+    return ifexpr( years.Size() > 0, years.Concatenate( ";" ), "" );
+  *]
+}
diff --git a/_Main/BL/Type_PRData/Attribute_IsPannelMaterial.qbl b/_Main/BL/Type_PRData/Attribute_IsPanelMaterial.qbl
similarity index 86%
rename from _Main/BL/Type_PRData/Attribute_IsPannelMaterial.qbl
rename to _Main/BL/Type_PRData/Attribute_IsPanelMaterial.qbl
index 07d9041..b74f153 100644
--- a/_Main/BL/Type_PRData/Attribute_IsPannelMaterial.qbl
+++ b/_Main/BL/Type_PRData/Attribute_IsPanelMaterial.qbl
@@ -1,6 +1,6 @@
 Quintiq file version 2.0
 #parent: #root
-Attribute IsPannelMaterial
+Attribute IsPanelMaterial
 {
   #keys: '3[414384.0.847354618][414384.0.847354617][414384.0.847354619]'
   Description: '闈㈡澘鐗╂枡鏍囪瘑'
diff --git "a/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream\043595.qbl" "b/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream\043595.qbl"
new file mode 100644
index 0000000..540295e
--- /dev/null
+++ "b/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream\043595.qbl"
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ExportTheFileStream (
+  MacroPlan parent
+) as BinaryValue
+{
+  TextBody:
+  [*
+    // yypsybs Sep-20-2023 (created)
+    return PRData::ExportTheFileStream( selectset( parent, PRData, item, true ) );
+  *]
+}
diff --git a/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream.qbl b/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream.qbl
new file mode 100644
index 0000000..5a26632
--- /dev/null
+++ b/_Main/BL/Type_PRData/StaticMethod_ExportTheFileStream.qbl
@@ -0,0 +1,78 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ExportTheFileStream (
+  PRDatas toExportList
+) as BinaryValue
+{
+  TextBody:
+  [*
+    // generate by generate_export.py
+    dateTimeToString := DateTimeToString::StandardConverter();
+    dateTimeToString.SetCustomConversion();
+    dateTimeToString.CustomFormatString( "yyyy/MM/dd H:mm:ss" );
+    
+    dateToString := DateToString::StandardConverter();
+    dateToString.SetCustomConversion();
+    dateToString.CustomFormatString( "yyyy/MM/dd" );
+    
+    text:= '<?xml version="1.0" encoding="utf-8" standalone="yes"?><table><name>PR</name>
+    <column><name>鐗╂枡缂栫爜</name><type>String</type></column>
+    <column><name>鐗╂枡鍚嶇О</name><type>String</type></column>
+    <column><name>闈㈡澘鐗╂枡鏍囪瘑</name><type>String</type></column>
+    <column><name>浜よ揣鏃ユ湡</name><type>String</type></column>
+    <column><name>PR寤鸿鏃ユ湡</name><type>String</type></column>
+    <column><name>浜よ揣鏁伴噺</name><type>Number</type></column>
+    <column><name>MRP璁$畻鐗堟湰鍙�</name><type>String</type></column>
+    <column><name>涓氬姟绫诲瀷</name><type>String</type></column>
+    <column><name>缁勭粐缂栫爜</name><type>String</type></column>
+    <column><name>鏄惁闀垮懆鏈�</name><type>String</type></column>
+    <column><name>鏄惁涓撶敤鏂�</name><type>String</type></column>
+    <column><name>鐗╂枡璁″垝绛栫暐</name><type>String</type></column>
+    <column><name>鎻愬墠鏈�</name><type>Number</type></column>
+    <column><name>渚涘簲鍟嗕唬鐮�</name><type>String</type></column>
+    <column><name>渚涘簲鍟嗗悕绉�</name><type>String</type></column>
+    <column><name>鏀惰揣搴撳瓨鐐�</name><type>String</type></column>
+    <column><name>璁¢噺鍗曚綅</name><type>String</type></column>
+    <column><name>PR鏁版嵁鍙戦�佺姸鎬�</name><type>String</type></column>
+    <column><name>鍙戦�佹椂闂�</name><type>String</type></column>
+    <column><name>鍙戦�佷汉</name><type>String</type></column>
+    </table>';
+    xmlDOMImplementation := XMLDOMImplementation::Create();
+    xmlDOMDocument := xmlDOMImplementation.CreateDocumentFromString( text );
+    
+    tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 );
+    
+    traverse ( toExportList, Elements, toExport ) {
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductID(), "鐗╂枡缂栫爜" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductName(), "鐗╂枡鍚嶇О" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.IsPanelMaterial(), "闈㈡澘鐗╂枡鏍囪瘑" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, ifexpr( toExport.ProduceRequiredDate() = Date::MinDate(), "", dateToString.Convert( toExport.ProduceRequiredDate() ) ), "浜よ揣鏃ユ湡" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, ifexpr( toExport.PRSuggestionDate() = Date::MinDate(), "", dateToString.Convert( toExport.PRSuggestionDate() ) ), "PR寤鸿鏃ユ湡" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.Quantity(), "浜よ揣鏁伴噺" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.MRPCalverNo(), "MRP璁$畻鐗堟湰鍙�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.BusinessType(), "涓氬姟绫诲瀷" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.OrganCode(), "缁勭粐缂栫爜" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.IsLongLeadItem(), "鏄惁闀垮懆鏈�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.IsGenericMaterial(), "鏄惁涓撶敤鏂�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.MaterialMRPType(), "鐗╂枡璁″垝绛栫暐" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.LeadTime(), "鎻愬墠鏈�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProviderCode(), "渚涘簲鍟嗕唬鐮�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProviderName(), "渚涘簲鍟嗗悕绉�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.StockingPointID(), "鏀惰揣搴撳瓨鐐�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.UnitOfMeasure(), "璁¢噺鍗曚綅" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.SendStatus(), "PR鏁版嵁鍙戦�佺姸鎬�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.SendTimeString(), "鍙戦�佹椂闂�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.SendBy(), "鍙戦�佷汉" );
+    }
+    
+    xmlDOMSerializer := xmlDOMImplementation.CreateSerializer();
+    xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument );
+    
+    tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) );
+    tableGroupHandle := TableGroupHandle::Create( "PR" );
+    tableGroupHandle.Add( tableHandle );
+    tableBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
+    
+    return tableBinaryData.AsBinaryValue();
+  *]
+}
diff --git "a/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning\043662.qbl" "b/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning\043662.qbl"
index f2d08bd..c86f3e2 100644
--- "a/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning\043662.qbl"
+++ "b/_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning\043662.qbl"
@@ -40,7 +40,7 @@
                                      Date::Today(), (result.ProduceRequiredDate() - Duration::Days( 7 )).Date() ) );
     
     // 鏍规嵁 鐗╂枡灞炴�ф爣绛捐瀹�&鐗╂枡璁″垝绛栫暐
-    result.IsPannelMaterial();
+    result.IsPanelMaterial();
     result.IsGenericMaterial( matAttrSetting.FlagGeneric() );
     result.IsLongLeadItem( matAttrSetting.FlagLongTerm() );
     result.MaterialMRPType( ifexpr( matAttrSetting.PlanningStrategyCustom() <> "", matAttrSetting.PlanningStrategyCustom(), matAttrSetting.PlanningStrategyAuto() ) );
diff --git "a/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream\04345.qbl" "b/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream\04345.qbl"
new file mode 100644
index 0000000..a04fd41
--- /dev/null
+++ "b/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream\04345.qbl"
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ExportTheFileStream (
+  GlobalOTDTable parent
+) as BinaryValue
+{
+  TextBody:
+  [*
+    // yypsybs Sep-20-2023 (created)
+    return PRHistoryData::ExportTheFileStream( selectset( parent, PRHistoryData, item, true ) );
+  *]
+}
diff --git a/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream.qbl b/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream.qbl
new file mode 100644
index 0000000..c0a44ae
--- /dev/null
+++ b/_Main/BL/Type_PRHistoryData/StaticMethod_ExportTheFileStream.qbl
@@ -0,0 +1,72 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ExportTheFileStream (
+  PRHistoryDatas toExportList
+) as BinaryValue
+{
+  TextBody:
+  [*
+    // generate by generate_export.py
+    dateTimeToString := DateTimeToString::StandardConverter();
+    dateTimeToString.SetCustomConversion();
+    dateTimeToString.CustomFormatString( "yyyy/MM/dd H:mm:ss" );
+    
+    dateToString := DateToString::StandardConverter();
+    dateToString.SetCustomConversion();
+    dateToString.CustomFormatString( "yyyy/MM/dd" );
+    
+    text:= '<?xml version="1.0" encoding="utf-8" standalone="yes"?><table><name>PR</name>
+    <column><name>闆朵欢鍙�</name><type>String</type></column>
+    <column><name>闆朵欢鍚嶇О</name><type>String</type></column>
+    <column><name>浜よ揣鏃ユ湡</name><type>String</type></column>
+    <column><name>闇�姹傛暟閲�</name><type>Number</type></column>
+    <column><name>MRP璁$畻鐗堟湰鍙�</name><type>String</type></column>
+    <column><name>浜嬩笟閮�</name><type>String</type></column>
+    <column><name>缁勭粐缂栫爜</name><type>String</type></column>
+    <column><name>渚涘簲鍟嗕唬鐮�</name><type>String</type></column>
+    <column><name>渚涘簲鍟嗗悕绉�</name><type>String</type></column>
+    <column><name>鏀惰揣搴撳瓨鐐�</name><type>String</type></column>
+    <column><name>璁¢噺鍗曚綅</name><type>String</type></column>
+    <column><name>PR鏁版嵁鍙戦�佺姸鎬�</name><type>String</type></column>
+    <column><name>鍙戦�佹椂闂�</name><type>String</type></column>
+    <column><name>鍙戦�佷汉</name><type>String</type></column>
+    <column><name>ERP鎺ユ敹鏃堕棿</name><type>String</type></column>
+    <column><name>ERP鎺ユ敹鐘舵��</name><type>String</type></column>
+    <column><name>閿欒淇℃伅鎻忚堪</name><type>String</type></column>
+    </table>';
+    xmlDOMImplementation := XMLDOMImplementation::Create();
+    xmlDOMDocument := xmlDOMImplementation.CreateDocumentFromString( text );
+    
+    tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 );
+    
+    traverse ( toExportList, Elements, toExport ) {
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductID(), "闆朵欢鍙�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductName(), "闆朵欢鍚嶇О" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, ifexpr( toExport.ProduceRequiredDate() = Date::MinDate(), "", dateToString.Convert( toExport.ProduceRequiredDate() ) ), "浜よ揣鏃ユ湡" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.Quantity(), "闇�姹傛暟閲�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.MRPCalverNo(), "MRP璁$畻鐗堟湰鍙�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.BusinessType(), "浜嬩笟閮�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.OrganCode(), "缁勭粐缂栫爜" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProviderCode(), "渚涘簲鍟嗕唬鐮�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProviderName(), "渚涘簲鍟嗗悕绉�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.StockingPointID(), "鏀惰揣搴撳瓨鐐�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.UnitOfMeasure(), "璁¢噺鍗曚綅" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.SendStatus(), "PR鏁版嵁鍙戦�佺姸鎬�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.SendTimeString(), "鍙戦�佹椂闂�" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ReleaseBy(), "鍙戦�佷汉" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ReceiveTimeString(), "ERP鎺ユ敹鏃堕棿" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ReceiveStatus(), "ERP鎺ユ敹鐘舵��" );
+      MatAttrSettingAndPlanStrategy::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ReceiveError(), "閿欒淇℃伅鎻忚堪" );
+    }
+    
+    xmlDOMSerializer := xmlDOMImplementation.CreateSerializer();
+    xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument );
+    
+    tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) );
+    tableGroupHandle := TableGroupHandle::Create( "PR" );
+    tableGroupHandle.Add( tableHandle );
+    tableBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
+    
+    return tableBinaryData.AsBinaryValue();
+  *]
+}
diff --git a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl
new file mode 100644
index 0000000..133fe60
--- /dev/null
+++ b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl
@@ -0,0 +1,29 @@
+Quintiq file version 2.0
+#parent: #root
+Method CapacityAndSaleBudgeChart (
+  MacroPlans macroPlans,
+  Boolean isCapacity,
+  String groupBy,
+  String byBusinessTypeOrByOrgCodde,
+  String businessType,
+  String orgCode,
+  String year,
+  MPSync mpSync,
+  GlobalOTDTable otdTable,
+  MacroPlan mappingParent
+)
+{
+  Description: '鎸夊叆鍙傚鐞嗘暟鎹紝浜х敓闇�瑕佺殑CapacityAndSaleBudgeChartElement'
+  TextBody:
+  [*
+    // yypsybs Sep-19-2023 (created)
+    this.CapacityAndSaleBudgeChartElement( relflush );
+    
+    info( isCapacity );
+    info( groupBy );
+    info( byBusinessTypeOrByOrgCodde );
+    info( businessType );
+    info( orgCode );
+    info( year );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form633/Component_PanelPRDataButton.def b/_Main/UI/MacroPlannerWebApp/Component_Form633/Component_PanelPRDataButton.def
index 29e3432..97ad3ac 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_Form633/Component_PanelPRDataButton.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Form633/Component_PanelPRDataButton.def
@@ -16,6 +16,17 @@
         Taborder: 0
       ]
     }
+    Component ButtonExportPR
+    {
+      #keys: '[414384.0.859041699]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'EXPORT1'
+        Label: '鏁版嵁瀵煎嚭'
+        Taborder: 1
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonExportPR_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonExportPR_OnClick.def
new file mode 100644
index 0000000..db7b6a3
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonExportPR_OnClick.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: PanelPRDataButton/ButtonExportPR
+Response OnClick () id:Response_PanelPRDataButton_ButtonExportPR_OnClick
+{
+  #keys: '[414384.0.859041698]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( GlobalOTDTable );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      tableBinaryData := PRData::ExportTheFileStream( MacroPlan ).AsBinaryData();
+      Application.Download( "PRData.xlsx", tableBinaryData );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_Form633/_ROOT_Component_FormPRData\043633.def" "b/_Main/UI/MacroPlannerWebApp/Component_Form633/_ROOT_Component_FormPRData\043633.def"
index 7696374..e17362c 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_Form633/_ROOT_Component_FormPRData\043633.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_Form633/_ROOT_Component_FormPRData\043633.def"
@@ -22,6 +22,7 @@
   ]
   Properties:
   [
+    Image: 'EXPORT1'
     Title: 'PR'
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def
index 93bc5b0..d67039a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Deleted","title":"Deleted","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Deleted"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"OrgCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayTechnology","title":"DisplayTechnology","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DisplayTechnology"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"BusinessType","title":"BusinessType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"BusinessType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LineAndSpec","title":"LineAndSpec","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LineAndSpec"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductCode","title":"ProductCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlaceOfProductionOfArray","title":"PlaceOfProductionOfArray","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlaceOfProductionOfArray"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlaceOfProductionOfEvaporation","title":"PlaceOfProductionOfEvaporation","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlaceOfProductionOfEvaporation"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Resolution","title":"Resolution","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Resolution"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShippingForm","title":"ShippingForm","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShippingForm"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfCut","title":"NumberOfCut","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NumberOfCut"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityEquivalent","title":"CapacityEquivalent","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityEquivalent"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfMask","title":"NumberOfMask","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NumberOfMask"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth1","title":"CapacityInPCSInMonth1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth1"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth2","title":"CapacityInPCSInMonth2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth2"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSTotal","title":"CapacityInPCSTotal","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSTotal"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth1","title":"CapacityInSheetInMonth1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth1"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth2","title":"CapacityInSheetInMonth2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth2"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetTotal","title":"CapacityInSheetTotal","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetTotal"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth1","title":"SaleAmountInMonth1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth1"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth2","title":"SaleAmountInMonth2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth2"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountTotal","title":"SaleAmountTotal","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountTotal"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Deleted","title":"Deleted","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Deleted"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"OrgCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayTechnology","title":"DisplayTechnology","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DisplayTechnology"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"BusinessType","title":"BusinessType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"BusinessType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LineAndSpec","title":"LineAndSpec","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LineAndSpec"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductCode","title":"ProductCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlaceOfProductionOfArray","title":"PlaceOfProductionOfArray","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlaceOfProductionOfArray"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlaceOfProductionOfEvaporation","title":"PlaceOfProductionOfEvaporation","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlaceOfProductionOfEvaporation"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Resolution","title":"Resolution","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Resolution"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShippingForm","title":"ShippingForm","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShippingForm"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfCut","title":"NumberOfCut","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NumberOfCut"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityEquivalent","title":"CapacityEquivalent","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityEquivalent"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfMask","title":"NumberOfMask","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NumberOfMask"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth1","title":"CapacityInPCSInMonth1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth1"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth2","title":"CapacityInPCSInMonth2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth2"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth3","title":"CapacityInPCSInMonth3","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth3"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth4","title":"CapacityInPCSInMonth4","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth4"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth5","title":"CapacityInPCSInMonth5","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth5"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth6","title":"CapacityInPCSInMonth6","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth6"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth7","title":"CapacityInPCSInMonth7","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth7"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth8","title":"CapacityInPCSInMonth8","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth8"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth9","title":"CapacityInPCSInMonth9","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth9"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth10","title":"CapacityInPCSInMonth10","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth10"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth11","title":"CapacityInPCSInMonth11","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth11"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSInMonth12","title":"CapacityInPCSInMonth12","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSInMonth12"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInPCSTotal","title":"CapacityInPCSTotal","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInPCSTotal"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth1","title":"CapacityInSheetInMonth1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth1"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth2","title":"CapacityInSheetInMonth2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth2"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth3","title":"CapacityInSheetInMonth3","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth3"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth4","title":"CapacityInSheetInMonth4","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth4"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth5","title":"CapacityInSheetInMonth5","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth5"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth6","title":"CapacityInSheetInMonth6","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth6"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth7","title":"CapacityInSheetInMonth7","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth7"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth8","title":"CapacityInSheetInMonth8","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth8"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth9","title":"CapacityInSheetInMonth9","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth9"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth10","title":"CapacityInSheetInMonth10","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth10"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth11","title":"CapacityInSheetInMonth11","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth11"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetInMonth12","title":"CapacityInSheetInMonth12","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetInMonth12"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CapacityInSheetTotal","title":"CapacityInSheetTotal","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CapacityInSheetTotal"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth1","title":"SaleAmountInMonth1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth1"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth2","title":"SaleAmountInMonth2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth2"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth3","title":"SaleAmountInMonth3","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth3"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth5","title":"SaleAmountInMonth5","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth5"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth4","title":"SaleAmountInMonth4","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth4"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth6","title":"SaleAmountInMonth6","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth6"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth7","title":"SaleAmountInMonth7","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth7"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth8","title":"SaleAmountInMonth8","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth8"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth9","title":"SaleAmountInMonth9","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth9"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth10","title":"SaleAmountInMonth10","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth10"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth11","title":"SaleAmountInMonth11","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth11"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountInMonth12","title":"SaleAmountInMonth12","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountInMonth12"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SaleAmountTotal","title":"SaleAmountTotal","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SaleAmountTotal"}}]'
         ContextMenu: 'listContextMenuCapacityAndSaleBudge'
         SortCriteria: 'BusinessType;OrgCode;ProductCode'
         Taborder: 2
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_ChartCapacityAndSaleBudgeChart.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_ChartCapacityAndSaleBudgeChart.def
new file mode 100644
index 0000000..9cb5a75
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_ChartCapacityAndSaleBudgeChart.def
@@ -0,0 +1,85 @@
+Quintiq file version 2.0
+Component ChartCapacityAndSaleBudgeChart
+{
+  #keys: '[414384.0.853873491]'
+  BaseType: 'WebChart'
+  Children:
+  [
+    Component ChartLevelCapacityAndSaleBudge
+    {
+      #keys: '[414384.0.853873492]'
+      BaseType: 'WebChartLevel'
+      Children:
+      [
+        Component DataExtractorCapacityAndSaleBudge
+        {
+          #keys: '[414384.0.853873493]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'ScenarioManager'
+            Source: 'ScenarioManager'
+            Taborder: 0
+            Transformation: 'CapacityAndSaleBudgeChartElement'
+          ]
+        }
+        Component ChartSeriesCapacityAndSaleBudge
+        {
+          #keys: '[414384.0.853873495]'
+          BaseType: 'WebChartSeries'
+          Properties:
+          [
+            Label: 'Quantity'
+            Taborder: 1
+            YScaleDataPath: 'object.Quantity()'
+          ]
+        }
+      ]
+      Properties:
+      [
+        ChartColorString:
+        [*
+          WebChartColor
+          {
+            WebChartConfigGroup
+            {
+              Label: 'Series'
+            }
+            WebChartConfigGroup
+            {
+              Label: 'BusinessTypeOrOrgCode'
+              SequenceNr: 1
+            }
+          }
+        *]
+        ChartTypeString:
+        [*
+          WebChartType
+          {
+            WebChartConfigGroup
+            {
+              Label: 'Series'
+            }
+            WebChartConfigGroup
+            {
+              Label: 'BusinessTypeOrOrgCode'
+              SequenceNr: 1
+            }
+            Default: 'Stacked bar'
+            DefaultStepped: 'No'
+            MergeStackedBars: true
+          }
+        *]
+        Groups: 'TimeStringAndScenarioName,BusinessTypeOrOrgCode'
+        Taborder: 0
+      ]
+    }
+    #child: chartContextMenuCapacityAndSaleBudge
+    #child: chartActionBarPageCapacityAndSaleBudge
+  ]
+  Properties:
+  [
+    ContextMenu: 'chartContextMenuCapacityAndSaleBudge'
+    Taborder: 7
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_chartActionBarPageCapacityAndSaleBudge.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_chartActionBarPageCapacityAndSaleBudge.def
new file mode 100644
index 0000000..3292625
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_chartActionBarPageCapacityAndSaleBudge.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component chartActionBarPageCapacityAndSaleBudge
+{
+  #keys: '[414384.0.853873501]'
+  BaseType: 'chartActionBarPage'
+  Properties:
+  [
+    Taborder: 2
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_chartContextMenuCapacityAndSaleBudge.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_chartContextMenuCapacityAndSaleBudge.def
new file mode 100644
index 0000000..381ece8
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Component_chartContextMenuCapacityAndSaleBudge.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component chartContextMenuCapacityAndSaleBudge
+{
+  #keys: '[414384.0.853873498]'
+  BaseType: 'chartContextMenu'
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def
new file mode 100644
index 0000000..43d6bba
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def
@@ -0,0 +1,27 @@
+Quintiq file version 2.0
+#parent: ButtonCapacityAndSaleBudgeChartTest
+Response OnClick () id:Response_FormCapacityAndSaleBudgeChart_ButtonCapacityAndSaleBudgeChartTest_OnClick
+{
+  #keys: '[414384.0.857443403]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      CapacityAndSaleBudgeChartElement::TestData( ScenarioManager );
+      
+      ScenarioManager.CapacityAndSaleBudgeChart( DataHolderMacroPlansForScenarioComparison.Data(), 
+                                                 CheckboxIsCapacity.Checked(),
+                                                 DropDownTimeGroup.Text(),
+                                                 DropDownByBusinessTypeOrByOrgCode.Text(),
+                                                 DropDownBusinessTypes.Text(),
+                                                 DropDownOrgCodes.Text(),
+                                                 DropDownYears.Text(),
+                                                 MPSync, 
+                                                 GlobalOTDTable, 
+                                                 MacroPlan );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_OnCreated.def
new file mode 100644
index 0000000..0cf2128
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_OnCreated.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: #root
+Response OnCreated () id:Response_FormCapacityAndSaleBudgeChart_OnCreated
+{
+  #keys: '[414384.0.853873350]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      CapacityAndSaleBudgeChartElement::TestData( ScenarioManager );
+      
+      DropDownBusinessTypes.Strings( GlobalOTDTable.CapacityAndSaleBudgeBusinessTypeString() );
+      DropDownOrgCodes.Strings( GlobalOTDTable.CapacityAndSaleBudgePlaceOfProductionOfArrayString() );
+      DropDownYears.Strings( GlobalOTDTable::CapacityAndSaleBudgeYearsString() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def
new file mode 100644
index 0000000..26784de
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def
@@ -0,0 +1,94 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent FormCapacityAndSaleBudgeChart
+{
+  #keys: '[414384.0.852503421]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: ChartCapacityAndSaleBudgeChart
+    Component ButtonCapacityAndSaleBudgeChartTest
+    {
+      #keys: '[414384.0.857443217]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: '娴嬭瘯鐢�'
+        Taborder: 6
+      ]
+    }
+    Component DropDownYears
+    {
+      #keys: '[414384.0.857740648]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        Label: '骞翠唤'
+        Taborder: 2
+      ]
+    }
+    Component DropDownBusinessTypes
+    {
+      #keys: '[414384.0.857740658]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        AllowEmpty: true
+        Label: '浜嬩笟閮�'
+        Taborder: 3
+      ]
+    }
+    Component DropDownOrgCodes
+    {
+      #keys: '[414384.0.857770736]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        AllowEmpty: true
+        Label: '闈㈡澘鍩哄湴'
+        Taborder: 4
+      ]
+    }
+    Component CheckboxIsCapacity
+    {
+      #keys: '[414384.0.857770765]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Label: '浜ц兘'
+        Taborder: 5
+      ]
+    }
+    Component DropDownTimeGroup
+    {
+      #keys: '[414384.0.857771238]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        InitialValue: '鏈�'
+        Label: '鏃堕棿鍒嗙粍'
+        Strings: '鏈�;瀛e害;鍗婂勾;骞�'
+        Taborder: 1
+      ]
+    }
+    Component DropDownByBusinessTypeOrByOrgCode
+    {
+      #keys: '[414384.0.857702904]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        InitialValue: '浜嬩笟閮�'
+        Label: '鏍规嵁闈㈡澘鍩哄湴/浜嬩笟閮ㄥ垎缁�'
+        Strings: '闈㈡澘鍩哄湴;浜嬩笟閮�'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Description: '骞村害浜ч攢棰勭畻澶嶇洏鍥捐〃'
+    Image: 'COLUMN-CHART'
+    Title: '骞村害浜ч攢棰勭畻澶嶇洏鍥捐〃'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonCapacityAndSaleBudgeCompare_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonCapacityAndSaleBudgeCompare_OnClick.def
index 33f805e..50ded64 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonCapacityAndSaleBudgeCompare_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonCapacityAndSaleBudgeCompare_OnClick.def
@@ -10,6 +10,10 @@
   {
     Body:
     [*
+      info( DataHolderMacroPlansForScenarioComparison.Data().Size() );
+      info( DataHolderCapacityAndSaleBudgeFilterItem.Data().Size() );
+      info( DataHolderCapacityAndSaleBudgeFilterYear.Data().Size() );
+      info( DataHolderCapacityAndSaleBudgeFilterMonth.Data().Size() );
       ScenarioManager.CapacityAndSaleBudgeCompare( DataHolderMacroPlansForScenarioComparison.Data(), 
                                                    DataHolderCapacityAndSaleBudgeFilterItem.Data(), 
                                                    DataHolderCapacityAndSaleBudgeFilterYear.Data(), 
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def
index ec18fe9..f4be476 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def
@@ -7,6 +7,7 @@
   BaseType: 'WebForm'
   Children:
   [
+    #child: MatrixEditorCapacityAndSaleBudgeCompare
     Component ButtonCapacityAndSaleBudgeCompare
     {
       #keys: '[414384.0.818241675]'
@@ -17,7 +18,6 @@
         Taborder: 0
       ]
     }
-    #child: MatrixEditorCapacityAndSaleBudgeCompare
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_PanelPRHistoryButton.def b/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_PanelPRHistoryButton.def
index 8a0a6c7..db38272 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_PanelPRHistoryButton.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_PanelPRHistoryButton.def
@@ -5,7 +5,7 @@
   BaseType: 'WebPanel'
   Children:
   [
-    Component ButtonResendPRA
+    Component ButtonResendPR
     {
       #keys: '[414384.0.799483157]'
       BaseType: 'WebButton'
@@ -16,6 +16,17 @@
         Taborder: 0
       ]
     }
+    Component ButtonExportPRHistory
+    {
+      #keys: '[414384.0.859111744]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'EXPORT1'
+        Label: '鏁版嵁瀵煎嚭'
+        Taborder: 1
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick.def
new file mode 100644
index 0000000..9a9f95e
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: PanelPRHistoryButton/ButtonExportPRHistory
+Response OnClick () id:Response_PanelPRHistoryButton_ButtonExportPRHistory_OnClick
+{
+  #keys: '[414384.0.859111743]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( GlobalOTDTable );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      tableBinaryData := PRHistoryData::ExportTheFileStream( GlobalOTDTable ).AsBinaryData();
+      Application.Download( "PRData.xlsx", tableBinaryData );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonResendPRA_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonResendPR_OnClick.def
similarity index 94%
rename from _Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonResendPRA_OnClick.def
rename to _Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonResendPR_OnClick.def
index 52c3bd2..526ae6e 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonResendPRA_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_PanelPRHistoryButton_ButtonResendPR_OnClick.def
@@ -1,6 +1,6 @@
 Quintiq file version 2.0
-#parent: PanelPRHistoryButton/ButtonResendPRA
-Response OnClick () id:Response_PanelPRHistoryButton_ButtonResendPRA_OnClick
+#parent: PanelPRHistoryButton/ButtonResendPR
+Response OnClick () id:Response_PanelPRHistoryButton_ButtonResendPR_OnClick
 {
   #keys: '[414384.0.799483155]'
   CanBindMultiple: false
diff --git a/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp b/_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp
index 237ed78..35f3a71 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.72'
+    BuildVersion: '2022.3.0.101'
     Description: 'Quintiq Macro Planner'
     ProjectKind: 'WebClient'
   }
diff --git "a/_var/_Main/ProjSettings/MacroPlanner/Views/Empty__dialog_initialization__\133124808.0.140900041\135.vw" "b/_var/_Main/ProjSettings/MacroPlanner/Views/Empty__dialog_initialization__\133124808.0.140900041\135.vw"
index 1c4ecf0..06aa05c 100644
--- "a/_var/_Main/ProjSettings/MacroPlanner/Views/Empty__dialog_initialization__\133124808.0.140900041\135.vw"
+++ "b/_var/_Main/ProjSettings/MacroPlanner/Views/Empty__dialog_initialization__\133124808.0.140900041\135.vw"
@@ -16,7 +16,7 @@
   CREATIONUSER ''
   UPDATEDATETIME '2017-06-05T15:08:50'
   UPDATEUSER 'quintiq/dwe2'
-  LASTACCESSDATE '2023-09-01'
+  LASTACCESSDATE '2023-09-19'
   VIEWSCOPE 0
 }
 AUTHORIZATIONS

--
Gitblit v1.9.3