From 1fe923bcb5983e2156e13dbf1316c6dabfbf026d Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期五, 06 九月 2024 18:18:08 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev

---
 _Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_TimeUnit.qbl                                                                                |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelHeader.def                                                       |   19 +
 _Main/BL/Type_CustomerDemandIDSSearch/Attribute_Power.qbl                                                                                      |    7 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_ButtonCustomerDemandPPAIDS_OnClic.def |   16 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_MatrixEditorTable.def                                                 |  103 ++++++
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelPower.def                                                        |   23 +
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTimeUnit.def                                                     |   26 +
 _Main/BL/Type_CustomerDemandIDSSearch/_ROOT_Type_CustomerDemandIDSSearch.qbl                                                                   |   10 
 _Main/BL/Type_CustomerDemandIDSRow/Method_Initialize.qbl                                                                                       |   17 +
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_OnCreated.def                                                          |   19 +
 _Main/BL/Type_CustomerDemandIDSRow/Attribute_Factory.qbl                                                                                       |    7 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelMLBMQB_ddslMQBMLB_OnCreated#217.def                               |   23 +
 _Main/BL/Type_CustomerDemandIDS/Method_GetColumnByTimeUnit.qbl                                                                                 |   17 +
 _Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl                                                                               |   27 -
 _Main/BL/Type_CustomerDemandIDS/Method_GenerateColumn.qbl                                                                                      |   30 +
 _Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Generation.qbl                                                                              |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelOperation.def                                                    |   24 +
 _Main/BL/Type_CustomerDemandIDS/StaticMethod_GetDefaultAllUnit.qbl                                                                             |   10 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def                                               |   11 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration_ddslGeneration_OnCreated#774.def                       |   23 +
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/_ROOT_Component_FormCustomerDemandPPAIDS.def                                    |   28 +
 _Main/BL/Type_CustomerDemandIDS/Method_GetRowByUnit.qbl                                                                                        |   22 +
 _Main/BL/Type_CustomerDemandIDSColumn/Attribute_EndDate.qbl                                                                                    |    7 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelMLBMQB.def                                                       |   23 +
 _Main/BL/Type_CustomerDemandIDSSearch/Attribute_Generation.qbl                                                                                 |    7 
 _Main/BL/Relations/Relation_CustomerDemandIDS_MacroPlan_MacroPlan_CustomerDemandIDS.qbl                                                        |   23 +
 _Main/BL/Type_CustomerDemandIDSSearch/Attribute_TimeUnit.qbl                                                                                   |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTable.def                                                        |   14 
 _Main/UI/MacroPlannerWebApp/Views/Customer_demand_PPAIDS_view.vw                                                                               |  112 ++++++
 _Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl                                                                                  |   62 +++
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnCreated#618.def         |   16 
 _Main/BL/Type_CustomerDemandIDSSearch/Attribute_Unit.qbl                                                                                       |    8 
 _Main/BL/Type_CustomerDemandIDSRow/Method_SetCellValue.qbl                                                                                     |   14 
 _Main/BL/Type_CustomerDemandIDSColumn/Attribute_TimeUnit.qbl                                                                                   |    8 
 _Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_MqbMlb.qbl                                                                                  |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration_ddslGeneration_OnSelectionChanged#187.def              |   19 +
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnChanged#150.def         |   20 +
 _Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Unit.qbl                                                                                    |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPower_ddslPower_OnSelectionChanged#136.def                        |   19 +
 _Main/BL/Relations/Relation_CustomerDemandIDSRow_Product_MP_Product_MP_CustomerDemandIDSRow.qbl                                                |   23 +
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_matrixeditorContextMenuTable.def                                      |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelMLBMQB_ddslMQBMLB_OnSelectionChanged#456.def                      |   19 +
 _Main/BL/Type_CustomerDemandIDSColumn/Attribute_StartDate.qbl                                                                                  |    7 
 _Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Power.qbl                                                                                   |    6 
 /dev/null                                                                                                                                      |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_matrixEditorActionBarPageTable.def                                    |   10 
 _Main/BL/Type_CustomerDemandIDSSearch/Attribute_MqbMlb.qbl                                                                                     |    7 
 _Main/BL/Relations/Relation_CustomerDemandIDSSearch_MacroPlan_MacroPlan_CustomerDemandIDSSearch.qbl                                            |   23 +
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelGeneration.def                                                   |   23 +
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPower_ddslPower_OnCreated#19.def                                  |   23 +
 50 files changed, 974 insertions(+), 29 deletions(-)

diff --git a/_Main/BL/Relations/Relation_CustomerDemandIDSRow_Product_MP_Product_MP_CustomerDemandIDSRow.qbl b/_Main/BL/Relations/Relation_CustomerDemandIDSRow_Product_MP_Product_MP_CustomerDemandIDSRow.qbl
new file mode 100644
index 0000000..2fc39fc
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CustomerDemandIDSRow_Product_MP_Product_MP_CustomerDemandIDSRow.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CustomerDemandIDSRow_Product_MP_Product_MP_CustomerDemandIDSRow
+{
+  #keys: '1[415136.0.1121380042]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Product_MP
+  {
+    #keys: '3[415136.0.1121380044][415136.0.1121380043][415136.0.1121380045]'
+    Cardinality: '0to1'
+    ObjectDefinition: CustomerDemandIDSRow
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide CustomerDemandIDSRow
+  {
+    #keys: '3[415136.0.1121380047][415136.0.1121380046][415136.0.1121380048]'
+    Cardinality: '1toN'
+    ObjectDefinition: Product_MP
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_CustomerDemandIDSSearch_MacroPlan_MacroPlan_CustomerDemandIDSSearch.qbl b/_Main/BL/Relations/Relation_CustomerDemandIDSSearch_MacroPlan_MacroPlan_CustomerDemandIDSSearch.qbl
new file mode 100644
index 0000000..bbe7d3d
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CustomerDemandIDSSearch_MacroPlan_MacroPlan_CustomerDemandIDSSearch.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CustomerDemandIDSSearch_MacroPlan_MacroPlan_CustomerDemandIDSSearch
+{
+  #keys: '1[415136.0.1123301833]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide MacroPlan
+  {
+    #keys: '3[415136.0.1123301835][415136.0.1123301834][415136.0.1123301836]'
+    Cardinality: '0to1'
+    ObjectDefinition: CustomerDemandIDSSearch
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide CustomerDemandIDSSearch
+  {
+    #keys: '3[415136.0.1123301838][415136.0.1123301837][415136.0.1123301839]'
+    Cardinality: '0to1'
+    ObjectDefinition: MacroPlan
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_CustomerDemandIDS_InterfaceDataset_InterfaceDataset_CustomerDemandI.qbl b/_Main/BL/Relations/Relation_CustomerDemandIDS_InterfaceDataset_InterfaceDataset_CustomerDemandI.qbl
deleted file mode 100644
index 2818276..0000000
--- a/_Main/BL/Relations/Relation_CustomerDemandIDS_InterfaceDataset_InterfaceDataset_CustomerDemandI.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation CustomerDemandIDS_InterfaceDataset_InterfaceDataset_CustomerDemandIDS
-{
-  #keys: '1[415136.0.1109686108]'
-  DefaultRelationStrategy
-  {
-  }
-  RelationSide.LeftSide InterfaceDataset
-  {
-    #keys: '3[415136.0.1109686110][415136.0.1109686109][415136.0.1109686111]'
-    Cardinality: '0to1'
-    ObjectDefinition: CustomerDemandIDS
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide CustomerDemandIDS
-  {
-    #keys: '3[415136.0.1109686113][415136.0.1109686112][415136.0.1109686114]'
-    Cardinality: '1toN'
-    ObjectDefinition: InterfaceDataset
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Relations/Relation_CustomerDemandIDS_MacroPlan_MacroPlan_CustomerDemandIDS.qbl b/_Main/BL/Relations/Relation_CustomerDemandIDS_MacroPlan_MacroPlan_CustomerDemandIDS.qbl
new file mode 100644
index 0000000..33bee49
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CustomerDemandIDS_MacroPlan_MacroPlan_CustomerDemandIDS.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CustomerDemandIDS_MacroPlan_MacroPlan_CustomerDemandIDS
+{
+  #keys: '1[415136.0.1121430084]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide MacroPlan
+  {
+    #keys: '3[415136.0.1121430086][415136.0.1121430085][415136.0.1121430087]'
+    Cardinality: '0to1'
+    ObjectDefinition: CustomerDemandIDS
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide CustomerDemandIDS
+  {
+    #keys: '3[415136.0.1121430089][415136.0.1121430088][415136.0.1121430090]'
+    Cardinality: '1toN'
+    ObjectDefinition: MacroPlan
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_CustomerDemandIDS/Method_GenerateColumn.qbl b/_Main/BL/Type_CustomerDemandIDS/Method_GenerateColumn.qbl
new file mode 100644
index 0000000..f13d6bb
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDS/Method_GenerateColumn.qbl
@@ -0,0 +1,30 @@
+Quintiq file version 2.0
+#parent: #root
+Method GenerateColumn (
+  Dates periods
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    weekstart             := periods.Element( 0 );
+    monthstart            := periods.Element( 0 );
+    traverse( periods, Elements, periodtime ){
+      periodname          := periodtime.Format( "M2/D2/Y" );
+      
+      this.Column( relnew, Name := periodname, StartDate := periodtime, EndDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() );
+      
+      if( periodtime = weekstart ){
+        weekperiodname    := weekstart.Format( "M2/D2/Y" );
+        this.Column( relnew, Name := weekperiodname, StartDate := weekstart, EndDate := ( weekstart + Duration::Days( 6 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() );
+        weekstart         := ( weekstart + Duration::Days( 7 ) ).Date();
+      }
+      if( periodtime = monthstart ){
+        monthperiodname   := monthstart.Format( "M2/D2/Y" );
+        enddate           := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date();
+        this.Column( relnew, Name := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() );
+        weekstart         := monthstart.StartOfNextMonth();
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_CustomerDemandIDS/Method_GetColumnByTimeUnit.qbl b/_Main/BL/Type_CustomerDemandIDS/Method_GetColumnByTimeUnit.qbl
new file mode 100644
index 0000000..7bac4fd
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDS/Method_GetColumnByTimeUnit.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetColumnByTimeUnit (
+  String unit,
+  Date period
+) as CustomerDemandIDSColumn
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-7-2024 (created)
+    //periodname := period.Format( "M2/D2/Y" );
+    
+    column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period and column.TimeUnit() = unit );
+    
+    return column;
+  *]
+}
diff --git a/_Main/BL/Type_CustomerDemandIDS/Method_GetRowByUnit.qbl b/_Main/BL/Type_CustomerDemandIDS/Method_GetRowByUnit.qbl
new file mode 100644
index 0000000..d8ceb1a
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDS/Method_GetRowByUnit.qbl
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetRowByUnit (
+  Product_MP product,
+  String unit
+) as CustomerDemandIDSRow
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Sep-6-2024 (created)
+    row := selectobject( this, Row, row, row.Name() = product.ID() and row.Factory() = unit );
+    if( isnull( row ) ){
+      //鍒濆鍖栧崟鍏冩牸 
+      row := this.Row( relnew, Name := product.ID(), Factory := unit );
+      row.Product_MP( relset, product );
+      traverse( this, Column, column ){
+        row.Initialize( column, product, unit );
+      }
+    }
+    return row;
+  *]
+}
diff --git a/_Main/BL/Type_CustomerDemandIDS/Method_SyncRows.qbl b/_Main/BL/Type_CustomerDemandIDS/Method_SyncRows.qbl
deleted file mode 100644
index 0106865..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/Method_SyncRows.qbl
+++ /dev/null
@@ -1,39 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Method SyncRows
-{
-  TextBody:
-  [*
-    totalRows := 0;
-    totalColumns := this.Column( relsize );
-    
-    if ( totalColumns > 0 ) {
-      randomCol := select( this, Column, tempFPC, true );
-      totalRows := randomCol.Cell( relsize );
-      
-      this.Row( relflush );
-      
-      cells := construct( CustomerDemandIDSCells );
-      traverse ( this, Column, fpc ) {
-        cells.Add( fpc.FirstCellInColumn() );
-      }
-      
-      for ( i := 0; i < totalRows; i++ ) {
-        assert( selectvalues( cells, Elements, c, true, c.Column().Index() ).ToString( "" ) = 
-                selectvalues( selectsortedset( cells, Elements, c, true, c.Column().Index() ), Elements, c, true, c.Column().Index() ).ToString( "" ),
-                "Assertion error in FrockDataTable::syncRows: Cells not sorted by column index" );
-        row := this.Row( relnew, RowNr := i );
-        
-        newCells := construct( CustomerDemandIDSCells );
-        
-        traverse ( cells, Elements, c ) {
-          row.Cell( relinsert, c );
-          
-          newCells.Add( c.NextCellInColumn() );
-        }
-        
-        cells := &newCells;
-      }
-    }
-  *]
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
new file mode 100644
index 0000000..b40e9e5
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
@@ -0,0 +1,62 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GenerateData (
+  MacroPlan macroplan,
+  RecycleBin recycle,
+  const Archive archive
+)
+{
+  Description: '鐢熸垚鍙互涓嬪彂鐨勫鎴烽渶姹傦紙PPA+IDS锛夋暟鎹�'
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-20-2024 (created)
+    allunit               := CustomerDemandIDS::GetDefaultAllUnit();
+    macroplan.CustomerDemandIDSSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit );
+    idstable              := macroplan.CustomerDemandIDS( relnew, ID := '瀹㈡埛闇�姹�', Name := '瀹㈡埛闇�姹�' );
+    binaryValue           := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() );
+    source                := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
+    source.ReadStructure();
+    Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
+    cnv2 := StringToDate::StandardConverter();
+    cnv2.SetCustomConversion();
+    cnv2.CustomFormatString( "dd/MM/yyyy" );
+    idsdates              := selectuniquevalues( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, cnv2.Convert( column.Name() ) );
+    ppadates              := construct( Dates );
+    traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
+      ppadates            := ppadates.Union( selectuniquevalues( forecast, PlanningSalesDemandInPeriod, salesdemand, salesdemand.StartDate() ) );
+    }
+    periods               := idsdates.Union( ppadates );
+    idstable.GenerateColumn( periods.Sort() );
+    traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){
+      traverse( table, GeneralExcelImportAndExportDataRow, row ){
+        productcell       := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
+        factorycell       := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 );
+        product           := selectobject( macroplan, Product_MP, product, product.ID() = productcell.Value() );
+        idsrow            := idstable.GetRowByUnit( product, factorycell.Value() );
+        traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){
+          period          := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() );
+          daycolumn       := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), period );
+          weekcolumn      := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Week(), period );
+          monthcolumn     := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Month(), period );
+          idsrow.SetCellValue( daycolumn, [Number]cell.Value() );
+          idsrow.SetCellValue( weekcolumn, [Number]cell.Value() );
+          idsrow.SetCellValue( monthcolumn, [Number]cell.Value() );
+        }
+      }
+    }
+    traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
+      product             := forecast.Product_MP();
+      idsrow              := idstable.GetRowByUnit( product, forecast.SalesSegmentName() );
+      traverse( forecast, PlanningSalesDemandInPeriod, salesdemand ){
+        daycolumn         := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), salesdemand.StartDate() );
+        weekcolumn        := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Week(), salesdemand.StartDate() );
+        monthcolumn       := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Month(), salesdemand.StartDate() );
+        idsrow.SetCellValue( daycolumn, [Number]salesdemand.Quantity() );
+        idsrow.SetCellValue( weekcolumn, [Number]salesdemand.Quantity() );
+        idsrow.SetCellValue( monthcolumn, [Number]salesdemand.Quantity() );
+      }
+    }
+    
+    source.Delete();
+  *]
+}
diff --git a/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GetDefaultAllUnit.qbl b/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GetDefaultAllUnit.qbl
new file mode 100644
index 0000000..e912c3f
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GetDefaultAllUnit.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultAllUnit () const declarative as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '<All>';
+  *]
+}
diff --git a/_Main/BL/Type_CustomerDemandIDS/StaticMethod_ReadStructure.qbl b/_Main/BL/Type_CustomerDemandIDS/StaticMethod_ReadStructure.qbl
deleted file mode 100644
index f0b4327..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/StaticMethod_ReadStructure.qbl
+++ /dev/null
@@ -1,33 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod ReadStructure (
-  BinaryValue binaryvalue,
-  InterfaceDataset owner
-)
-{
-  TextBody:
-  [*
-    // 鐢勫叞楦� Sep-3-2024 (created)
-    tableGroupHandle := TableGroupHandle::Create( 'IDS鍏ㄨ〃' );
-    tableGroupHandle := XLS::LoadTableGroupFromBinaryData( binaryvalue.AsBinaryData(), tableGroupHandle, true, true );
-    sheets := tableGroupHandle.TableNames();
-    
-    traverse ( sheets, Elements, sheetName ) {
-      tableHandle := tableGroupHandle.Table( sheetName );
-      tableXML := TableHandle::ExportXML( tableHandle );
-      
-    //  info( tableXML.AsQUILL() );
-      
-      CustomerDemandIDS::XMLFileImportCustomerDemandIDSXMLHeaders( tableXML );
-      xlstable := CustomerDemandIDS::XMLImportCustomerDemandIDSXML( tableXML );
-    
-      xlstable.SyncRows();
-    
-      xlstable.Name( sheetName );
-      owner.CustomerDemandIDS( relinsert, &xlstable ); 
-      
-      Transaction::Transaction().Propagate( attribute( CustomerDemandIDSColumn, Index ) );
-    
-    }
-  *]
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_Key.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_Key.qbl
deleted file mode 100644
index 4f408a0..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_Key.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-XMLElementId
-{
-  XMLAddressType { }
-  XMLID Key { }
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_QuintiqType.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_QuintiqType.qbl
deleted file mode 100644
index 7468757..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLElementId_QuintiqType.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-XMLElementId
-{
-  XMLID QuintiqType { }
-  XMLQualifierType { }
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_cell.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_cell.qbl
deleted file mode 100644
index c4fd297..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_cell.qbl
+++ /dev/null
@@ -1,17 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-XMLObjectBase.ObjectDefinitions
-{
-  IdField: Key
-  ObjectTypeField: QuintiqType
-  TargetType: CustomerDemandIDSCell
-  XMLID cell { }
-  Attributes:
-  [
-    XMLAttribute
-    {
-      Attribute: Value
-      XMLID value { }
-    }
-  ]
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_column.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_column.qbl
deleted file mode 100644
index 4a97560..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_column.qbl
+++ /dev/null
@@ -1,27 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-XMLObjectBase.ObjectDefinitions
-{
-  IdField: Key
-  ObjectTypeField: QuintiqType
-  TargetType: CustomerDemandIDSColumn
-  XMLID column { }
-  Aggregates:
-  [
-    XMLAggregate
-    {
-      ElementDefinition: cell
-      GenerateOutput: false
-      Relation: Cell
-      XMLID Cell { }
-    }
-  ]
-  Attributes:
-  [
-    XMLAttribute
-    {
-      Attribute: Name
-      XMLID name { }
-    }
-  ]
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_table.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_table.qbl
deleted file mode 100644
index ebf311d..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/XMLObjectBase_table.qbl
+++ /dev/null
@@ -1,27 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-XMLObjectBase.ObjectDefinitions
-{
-  IdField: Key
-  ObjectTypeField: QuintiqType
-  TargetType: CustomerDemandIDS
-  XMLID table { }
-  Aggregates:
-  [
-    XMLAggregate
-    {
-      ElementDefinition: column
-      GenerateOutput: false
-      Relation: Column
-      XMLID Column { }
-    }
-  ]
-  Attributes:
-  [
-    XMLAttribute
-    {
-      Attribute: Name
-      XMLID name { }
-    }
-  ]
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/_ROOT_XML_CustomerDemandIDSXML.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/_ROOT_XML_CustomerDemandIDSXML.qbl
deleted file mode 100644
index a0513a0..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXML/_ROOT_XML_CustomerDemandIDSXML.qbl
+++ /dev/null
@@ -1,8 +0,0 @@
-Quintiq file version 2.0
-#root
-#parent: #root
-XML CustomerDemandIDSXML
-{
-  Direction: 'ImportExport'
-  Root: table
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_Key.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_Key.qbl
deleted file mode 100644
index 4f408a0..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_Key.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-XMLElementId
-{
-  XMLAddressType { }
-  XMLID Key { }
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_QuintiqType.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_QuintiqType.qbl
deleted file mode 100644
index 7468757..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLElementId_QuintiqType.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-XMLElementId
-{
-  XMLID QuintiqType { }
-  XMLQualifierType { }
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_column.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_column.qbl
deleted file mode 100644
index c3c96e9..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_column.qbl
+++ /dev/null
@@ -1,17 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-XMLObjectBase.ObjectDefinitions
-{
-  IdField: Key
-  ObjectTypeField: QuintiqType
-  TargetType: CustomerDemandIDSColumn
-  XMLID column { }
-  Attributes:
-  [
-    XMLAttribute
-    {
-      Attribute: Name
-      XMLID name { }
-    }
-  ]
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_table.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_table.qbl
deleted file mode 100644
index ebf311d..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/XMLObjectBase_table.qbl
+++ /dev/null
@@ -1,27 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-XMLObjectBase.ObjectDefinitions
-{
-  IdField: Key
-  ObjectTypeField: QuintiqType
-  TargetType: CustomerDemandIDS
-  XMLID table { }
-  Aggregates:
-  [
-    XMLAggregate
-    {
-      ElementDefinition: column
-      GenerateOutput: false
-      Relation: Column
-      XMLID Column { }
-    }
-  ]
-  Attributes:
-  [
-    XMLAttribute
-    {
-      Attribute: Name
-      XMLID name { }
-    }
-  ]
-}
diff --git a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/_ROOT_XML_CustomerDemandIDSXMLHeaders.qbl b/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/_ROOT_XML_CustomerDemandIDSXMLHeaders.qbl
deleted file mode 100644
index 8c8b3e2..0000000
--- a/_Main/BL/Type_CustomerDemandIDS/XML_CustomerDemandIDSXMLHeaders/_ROOT_XML_CustomerDemandIDSXMLHeaders.qbl
+++ /dev/null
@@ -1,8 +0,0 @@
-Quintiq file version 2.0
-#root
-#parent: #root
-XML CustomerDemandIDSXMLHeaders
-{
-  Direction: 'ImportExport'
-  Root: table
-}
diff --git a/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_EndDate.qbl b/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_EndDate.qbl
new file mode 100644
index 0000000..83fd55c
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_EndDate.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute EndDate
+{
+  #keys: '3[415136.0.1116640026][415136.0.1116640025][415136.0.1116640027]'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_Period.qbl b/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_Period.qbl
deleted file mode 100644
index 4ec77c1..0000000
--- a/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_Period.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute Period
-{
-  #keys: '3[415136.0.1109686076][415136.0.1109686075][415136.0.1109686077]'
-  ValueType: Date
-}
diff --git a/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_StartDate.qbl b/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_StartDate.qbl
new file mode 100644
index 0000000..9006a5a
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_StartDate.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute StartDate
+{
+  #keys: '3[415136.0.1116640016][415136.0.1116640015][415136.0.1116640017]'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_TimeUnit.qbl b/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_TimeUnit.qbl
new file mode 100644
index 0000000..3bb5b8e
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSColumn/Attribute_TimeUnit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute TimeUnit
+{
+  #keys: '3[415136.0.1116640005][415136.0.1116640004][415136.0.1116640006]'
+  Description: '鏃堕棿鍗曚綅'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSRow/Attribute_DuplicateValueMarker.qbl b/_Main/BL/Type_CustomerDemandIDSRow/Attribute_DuplicateValueMarker.qbl
deleted file mode 100644
index b28a0d0..0000000
--- a/_Main/BL/Type_CustomerDemandIDSRow/Attribute_DuplicateValueMarker.qbl
+++ /dev/null
@@ -1,8 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute DuplicateValueMarker
-{
-  #keys: '3[415136.0.1109686049][415136.0.1109686048][415136.0.1109686050]'
-  Description: '鍒ゆ柇鏄惁瀛樺湪閲嶅鍊�'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_CustomerDemandIDSRow/Attribute_Factory.qbl b/_Main/BL/Type_CustomerDemandIDSRow/Attribute_Factory.qbl
new file mode 100644
index 0000000..b6ccf44
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSRow/Attribute_Factory.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Factory
+{
+  #keys: '3[415136.0.1121380059][415136.0.1121380058][415136.0.1121380060]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSRow/DefaultValue_DuplicateValueMarker.qbl b/_Main/BL/Type_CustomerDemandIDSRow/DefaultValue_DuplicateValueMarker.qbl
deleted file mode 100644
index bbb8a45..0000000
--- a/_Main/BL/Type_CustomerDemandIDSRow/DefaultValue_DuplicateValueMarker.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: DuplicateValueMarker
-}
diff --git a/_Main/BL/Type_CustomerDemandIDSRow/Method_Initialize.qbl b/_Main/BL/Type_CustomerDemandIDSRow/Method_Initialize.qbl
new file mode 100644
index 0000000..d0b091d
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSRow/Method_Initialize.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+Method Initialize (
+  CustomerDemandIDSColumn column,
+  Product_MP product,
+  String unit
+)
+{
+  Description: '鍒濆鍖栧崟鍏冩牸'
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-24-2024 (created)
+    cell := column.Cell( relnew, Value := '' );
+    
+    this.Cell( relinsert, cell );
+  *]
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSRow/Method_SetCellValue.qbl b/_Main/BL/Type_CustomerDemandIDSRow/Method_SetCellValue.qbl
new file mode 100644
index 0000000..26b0064
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSRow/Method_SetCellValue.qbl
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetCellValue (
+  CustomerDemandIDSColumn column,
+  Number quantity
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-24-2024 (created)
+    cell := selectobject( this, Cell, cell, cell.Column() = column );
+    cell.Value( [String]( [Number]cell.Value() + quantity ) );
+  *]
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Generation.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Generation.qbl
new file mode 100644
index 0000000..fa1f4ed
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Generation.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Generation
+{
+  #keys: '3[415136.0.1123301818][415136.0.1123301817][415136.0.1123301819]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_MqbMlb.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_MqbMlb.qbl
new file mode 100644
index 0000000..2e23654
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_MqbMlb.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute MqbMlb
+{
+  #keys: '3[415136.0.1123301821][415136.0.1123301820][415136.0.1123301822]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Power.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Power.qbl
new file mode 100644
index 0000000..39a7c50
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Power.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Power
+{
+  #keys: '3[415136.0.1123301824][415136.0.1123301823][415136.0.1123301825]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_TimeUnit.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_TimeUnit.qbl
new file mode 100644
index 0000000..faf0bf4
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_TimeUnit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute TimeUnit
+{
+  #keys: '3[415136.0.1123301847][415136.0.1123301846][415136.0.1123301848]'
+  Description: '鏃ユ湡绫诲瀷'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Unit.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Unit.qbl
new file mode 100644
index 0000000..e6fe325
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/Attribute_Unit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Unit
+{
+  #keys: '3[415136.0.1123301827][415136.0.1123301826][415136.0.1123301828]'
+  Description: '浜х嚎'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Generation.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Generation.qbl
new file mode 100644
index 0000000..9e5b51e
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Generation.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Generation
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_MqbMlb.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_MqbMlb.qbl
new file mode 100644
index 0000000..78982c5
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_MqbMlb.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: MqbMlb
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Power.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Power.qbl
new file mode 100644
index 0000000..4922731
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Power.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Power
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_TimeUnit.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_TimeUnit.qbl
new file mode 100644
index 0000000..e29979e
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_TimeUnit.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: TimeUnit
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Unit.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Unit.qbl
new file mode 100644
index 0000000..7e60e2c
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/DefaultValue_Unit.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Unit
+}
diff --git a/_Main/BL/Type_CustomerDemandIDSSearch/_ROOT_Type_CustomerDemandIDSSearch.qbl b/_Main/BL/Type_CustomerDemandIDSSearch/_ROOT_Type_CustomerDemandIDSSearch.qbl
new file mode 100644
index 0000000..1e6b2cd
--- /dev/null
+++ b/_Main/BL/Type_CustomerDemandIDSSearch/_ROOT_Type_CustomerDemandIDSSearch.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type CustomerDemandIDSSearch
+{
+  #keys: '5[415136.0.1123301815][415136.0.1123301813][0.0.0][415136.0.1123301814][415136.0.1123301816]'
+  BaseType: Object
+  Description: '鏌ヨ绫�'
+  StructuredName: 'CustomerDemandIDSSearchs'
+}
diff --git a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
index 2139612..54ab522 100644
--- a/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
@@ -2,7 +2,6 @@
 #parent: #root
 StaticMethod GenerateData (
   const MacroPlan macroplan,
-  const Archive archive,
   InterfaceDataset interfaceDataset,
   String executor,
   Boolean versionflag
@@ -32,28 +31,10 @@
                                                                  , ReturnMsg                 := 'Success'
                                                                  , Success                   := true
                                                                   );
-    traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
-      cd                  :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := forecast.ProductID()
-                                                                   , DemandDate              := forecast.StartDate()
-                                                                   , DemandQty               := [Number]forecast.Quantity()
-                                                                   , VersionName             := macroplan.ScenarioName()
-                                                                   , InterfaceTime           := nowdate
-                                                                   , VersionFlag             := versionflag
-                                                                   );
-      loginfo.CustomerDemandPPAIDS( relinsert, cd );
-    }
-    binaryValue           := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() );
-    CustomerDemandIDS::ReadStructure( binaryValue, interfaceDataset );
-    productcolumn         := select( interfaceDataset, CustomerDemandIDS.Column, column, column.Index() = 1 );
-    cnv2 := StringToDate::StandardConverter();
-    cnv2.SetCustomConversion();
-    cnv2.CustomFormatString( "dd/MM/yyyy" );
-    traverse( interfaceDataset, CustomerDemandIDS.Row, row ){
-      product             := selectobject( row, Cell, cell, cell.Column() = productcolumn );
-      traverse( row, Cell, cell, cell.Column().Index() > 3 ){
-        period := cnv2.Convert( cell.Column().Name() );
-        cd                  :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := product.Value()
-                                                                     , DemandDate              := period
+    traverse( macroplan, CustomerDemandIDS.Row, row ){
+      traverse( row, Cell, cell ){
+        cd                  :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := row.Name()
+                                                                     , DemandDate              := cell.Column().StartDate()
                                                                      , DemandQty               := [Number]cell.Value()
                                                                      , VersionName             := macroplan.ScenarioName()
                                                                      , InterfaceTime           := nowdate
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
index 6e2063a..e6454fc 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
@@ -150,6 +150,17 @@
         Taborder: 11
       ]
     }
+    Component ButtonCustomerDemandPPAIDS
+    {
+      #keys: '[415136.0.1123430252]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'FLAG_AMBER'
+        Label: '瀹㈡埛闇�姹�(PPA + IDS)'
+        Taborder: 12
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_ButtonCustomerDemandPPAIDS_OnClic.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_ButtonCustomerDemandPPAIDS_OnClic.def
new file mode 100644
index 0000000..a51a615
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_ButtonCustomerDemandPPAIDS_OnClic.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ActionBarGroupReport/ButtonCustomerDemandPPAIDS
+Response OnClick () id:Response_MacroPlanner_ActionBarGroupReport_ButtonCustomerDemandPPAIDS_OnClick
+{
+  #keys: '[415136.0.1123430434]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      ApplicationScope.ViewManager().ResetUserViewById( "Customer_demand_PPAIDS_view", true);
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_MatrixEditorTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_MatrixEditorTable.def
new file mode 100644
index 0000000..ba95322
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_MatrixEditorTable.def
@@ -0,0 +1,103 @@
+Quintiq file version 2.0
+Component MatrixEditorTable
+{
+  #keys: '[415136.0.1122860584]'
+  BaseType: 'WebMatrixEditor'
+  Children:
+  [
+    Component MatrixEditorCellTable
+    {
+      #keys: '[415136.0.1122860585]'
+      BaseType: 'WebMatrixEditorCell'
+      Children:
+      [
+        Component DataExtractorCells
+        {
+          #keys: '[415136.0.1122860586]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            FilterArguments: 'search:QMacroPlanner::FormCustomerDemandPPAIDS.dhSearch'
+            FixedFilter: 'object.Column().TimeUnit() = search.TimeUnit()'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'CustomerDemandIDS.Row.Cell'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Attributes: 'Value'
+        Column: 'Column'
+        Row: 'Row'
+        Taborder: 0
+      ]
+    }
+    Component MatrixEditorRowsTable
+    {
+      #keys: '[415136.0.1122860589]'
+      BaseType: 'WebMatrixEditorHeaderLevel'
+      Children:
+      [
+        Component DataExtractorRows
+        {
+          #keys: '[415136.0.1122860590]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            FilterArguments: 'search:QMacroPlanner::FormCustomerDemandPPAIDS.dhSearch'
+            FixedFilter: "( search.Generation() = '<All>' or object.Product_MP().Generation() = search.Generation() ) and ( search.MqbMlb() = '<All>' or object.Product_MP().MQBMLB() = search.MqbMlb() ) and ( search.Power() = '<All>' or object.Product_MP().Power() = search.Power() )"
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'CustomerDemandIDS.Row'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Legend: 'Name'
+        SortCriteria: 'Name'
+        Taborder: 1
+      ]
+    }
+    Component MatrixEditorColumnsTable
+    {
+      #keys: '[415136.0.1122860593]'
+      BaseType: 'WebMatrixEditorHeaderLevel'
+      Children:
+      [
+        Component DataExtractorColumns
+        {
+          #keys: '[415136.0.1122860594]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            FilterArguments: 'search:QMacroPlanner::FormCustomerDemandPPAIDS.dhSearch'
+            FixedFilter: 'object.TimeUnit() = search.TimeUnit()'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'CustomerDemandIDS.Column'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Legend: 'Name'
+        SortCriteria: 'StartDate'
+        Taborder: 2
+      ]
+    }
+    #child: matrixEditorActionBarPageTable
+    #child: matrixeditorContextMenuTable
+  ]
+  Properties:
+  [
+    Columns: 'MatrixEditorColumnsTable'
+    ContextMenu: 'matrixeditorContextMenuTable'
+    Rows: 'MatrixEditorRowsTable'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelGeneration.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelGeneration.def
new file mode 100644
index 0000000..d18d558
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelGeneration.def
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+Component PanelGeneration
+{
+  #keys: '[415136.0.1122860286]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ddslGeneration id:ddslGeneration_265
+    {
+      #keys: '[415136.0.1122860430]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        Label: 'Generation'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelHeader.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelHeader.def
new file mode 100644
index 0000000..2d129ab
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelHeader.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+Component PanelHeader
+{
+  #keys: '[415136.0.1122860235]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: PanelGeneration
+    #child: PanelPower
+    #child: PanelMLBMQB
+    #child: PanelTimeUnit
+    #child: PanelOperation
+  ]
+  Properties:
+  [
+    Orientation: 'horizontal'
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelMLBMQB.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelMLBMQB.def
new file mode 100644
index 0000000..1b1b76b
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelMLBMQB.def
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+Component PanelMLBMQB
+{
+  #keys: '[415136.0.1122860331]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ddslMQBMLB id:ddslMQBMLB_737
+    {
+      #keys: '[415136.0.1122860449]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        Label: 'MQB/MLB'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelOperation.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelOperation.def
new file mode 100644
index 0000000..232bde9
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelOperation.def
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+Component PanelOperation
+{
+  #keys: '[415136.0.1122860379]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ButtonSearch id:ButtonSearch_612
+    {
+      #keys: '[415136.0.1122860565]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'VIEW'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 4
+    Visible: false
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelPower.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelPower.def
new file mode 100644
index 0000000..5fb6dee
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelPower.def
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+Component PanelPower
+{
+  #keys: '[415136.0.1122860308]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component ddslPower id:ddslPower_568
+    {
+      #keys: '[415136.0.1122860468]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        Label: 'Power'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 2
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTable.def
new file mode 100644
index 0000000..e5d9695
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTable.def
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+Component PanelTable
+{
+  #keys: '[415136.0.1122860262]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: MatrixEditorTable
+  ]
+  Properties:
+  [
+    Taborder: 2
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTimeUnit.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTimeUnit.def
new file mode 100644
index 0000000..390be59
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_PanelTimeUnit.def
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+Component PanelTimeUnit
+{
+  #keys: '[415136.0.1122860353]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component RadioButtonGroupUseForTimeUnit id:RadioButtonGroupUseForTimeUnit_324
+    {
+      #keys: '[415136.0.1122860516]'
+      BaseType: 'WebRadioButtonGroup'
+      Properties:
+      [
+        ButtonLabels: 'Day;Week;Month'
+        ButtonValues: 'Day;Week;Month'
+        Orientation: 'horizontal'
+        Taborder: 0
+        Title: 'Periods'
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 3
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_matrixEditorActionBarPageTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_matrixEditorActionBarPageTable.def
new file mode 100644
index 0000000..f7ab20e
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_matrixEditorActionBarPageTable.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component matrixEditorActionBarPageTable
+{
+  #keys: '[415136.0.1122860597]'
+  BaseType: 'matrixEditorActionBarPage'
+  Properties:
+  [
+    Taborder: 3
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_matrixeditorContextMenuTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_matrixeditorContextMenuTable.def
new file mode 100644
index 0000000..518a354
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Component_matrixeditorContextMenuTable.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component matrixeditorContextMenuTable
+{
+  #keys: '[415136.0.1122860600]'
+  BaseType: 'matrixeditorContextMenu'
+  Properties:
+  [
+    Taborder: 4
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_OnCreated.def
new file mode 100644
index 0000000..c2c2010
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_OnCreated.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: #root
+Response OnCreated () id:Response_FormCustomerDemandPPAIDS_OnCreated
+{
+  #keys: '[415136.0.1122960379]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      //鍒濆鍖� 
+      CustomerDemandIDS::GenerateData( MacroPlan, RecycleBin, Archive );
+      
+      dhSearch.Data( MacroPlan.CustomerDemandIDSSearch() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration_ddslGeneration_OnCreated\043774.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration_ddslGeneration_OnCreated\043774.def"
new file mode 100644
index 0000000..ff1fccf
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration_ddslGeneration_OnCreated\043774.def"
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: PanelGeneration/ddslGeneration_265
+Response OnCreated () id:Response_PanelGeneration_ddslGeneration_OnCreated_774
+{
+  #keys: '[415136.0.1122860428]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.Generation() );
+      
+      valueString := values.Concatenate( ";" );
+      valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" );
+      
+      valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString;
+      
+      this.Strings( valueString );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration_ddslGeneration_OnSelectionChanged\043187.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration_ddslGeneration_OnSelectionChanged\043187.def"
new file mode 100644
index 0000000..0b31a25
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelGeneration_ddslGeneration_OnSelectionChanged\043187.def"
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelGeneration/ddslGeneration_265
+Response OnSelectionChanged () id:Response_PanelGeneration_ddslGeneration_OnSelectionChanged_187
+{
+  #keys: '[415136.0.1122860429]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      if( dhSearch.Data().Generation() <> selection ){
+        dhSearch.Data().Generation( selection );
+      //  DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); 
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelMLBMQB_ddslMQBMLB_OnCreated\043217.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelMLBMQB_ddslMQBMLB_OnCreated\043217.def"
new file mode 100644
index 0000000..6a6c3a0
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelMLBMQB_ddslMQBMLB_OnCreated\043217.def"
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: PanelMLBMQB/ddslMQBMLB_737
+Response OnCreated () id:Response_PanelMQBMLB_ddslMQBMLB_OnCreated_217
+{
+  #keys: '[415136.0.1122860447]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.MQBMLB() );
+      
+      valueString := values.Concatenate( ";" );
+      valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" );
+      
+      valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString;
+      
+      this.Strings( valueString );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelMLBMQB_ddslMQBMLB_OnSelectionChanged\043456.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelMLBMQB_ddslMQBMLB_OnSelectionChanged\043456.def"
new file mode 100644
index 0000000..5aa3925
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelMLBMQB_ddslMQBMLB_OnSelectionChanged\043456.def"
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelMLBMQB/ddslMQBMLB_737
+Response OnSelectionChanged () id:Response_PanelMQBMLB_ddslMQBMLB_OnSelectionChanged_456
+{
+  #keys: '[415136.0.1122860448]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      if( dhSearch.Data().MqbMlb() <> selection ){
+        dhSearch.Data().MqbMlb( selection );
+      //  DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); 
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPower_ddslPower_OnCreated\04319.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPower_ddslPower_OnCreated\04319.def"
new file mode 100644
index 0000000..2c1c1a3
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPower_ddslPower_OnCreated\04319.def"
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: PanelPower/ddslPower_568
+Response OnCreated () id:Response_PanelPower_ddslPower_OnCreated_19
+{
+  #keys: '[415136.0.1122860466]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.Power() );
+      
+      valueString := values.Concatenate( ";" );
+      valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" );
+      
+      valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString;
+      
+      this.Strings( valueString );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPower_ddslPower_OnSelectionChanged\043136.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPower_ddslPower_OnSelectionChanged\043136.def"
new file mode 100644
index 0000000..12302f8
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelPower_ddslPower_OnSelectionChanged\043136.def"
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelPower/ddslPower_568
+Response OnSelectionChanged () id:Response_PanelPower_ddslPower_OnSelectionChanged_136
+{
+  #keys: '[415136.0.1122860467]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      if( dhSearch.Data().Power() <> selection ){
+        dhSearch.Data().Power( selection );
+      //  DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); 
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnChanged\043150.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnChanged\043150.def"
new file mode 100644
index 0000000..f5ed614
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnChanged\043150.def"
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: PanelTimeUnit/RadioButtonGroupUseForTimeUnit_324
+Response OnChanged () id:Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnChanged_150
+{
+  #keys: '[415136.0.1122860514]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebRadioButtonGroup_OnChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      //鍖洪棿鏀瑰彉鍚庡埛鏂版樉绀� 
+      if( dhSearch.Data().TimeUnit() <> this.BoundValue() ){
+        dhSearch.Data().TimeUnit( this.BoundValue() );
+      //  DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() );
+      }
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnCreated\043618.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnCreated\043618.def"
new file mode 100644
index 0000000..0a417d2
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnCreated\043618.def"
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: PanelTimeUnit/RadioButtonGroupUseForTimeUnit_324
+Response OnCreated () id:Response_PanelTimeUnit_RadioButtonGroupUseForTimeUnit_OnCreated_618
+{
+  #keys: '[415136.0.1122860515]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      this.ButtonValues( Translations::MP_GlobalParameters_Day() + ';' + Translations::MP_GlobalParameters_Week() + ';' + Translations::MP_GlobalParameters_Month() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/_ROOT_Component_FormCustomerDemandPPAIDS.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/_ROOT_Component_FormCustomerDemandPPAIDS.def
new file mode 100644
index 0000000..8efba69
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerDemandPPAIDS/_ROOT_Component_FormCustomerDemandPPAIDS.def
@@ -0,0 +1,28 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent FormCustomerDemandPPAIDS
+{
+  #keys: '[415136.0.1122821553]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: PanelHeader
+    #child: PanelTable
+    Component dhSearch id:dhSearch_623
+    {
+      #keys: '[415136.0.1121750597]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'CustomerDemandIDSSearch'
+      Properties:
+      [
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Image: 'FLAG_AMBER'
+    Title: '瀹㈡埛闇�姹�(PPA + IDS)'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/Customer_demand_PPAIDS_view.vw b/_Main/UI/MacroPlannerWebApp/Views/Customer_demand_PPAIDS_view.vw
new file mode 100644
index 0000000..76698ea
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Views/Customer_demand_PPAIDS_view.vw
@@ -0,0 +1,112 @@
+Quintiq file version 2.0
+{
+  viewcontents
+  {
+    forms
+    {
+      form_FormCustomerDemandPPAIDS
+      {
+        title: 'QMacroPlanner::FormCustomerDemandPPAIDS'
+        shown: true
+        componentID: 'QMacroPlanner::FormCustomerDemandPPAIDS'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 15
+          columnPosition: 1
+          columnSpan: 12
+        }
+        components
+        {
+          FormCustomerDemandPPAIDS_PanelHeader
+          {
+            sizeRatio: 1
+          }
+          FormCustomerDemandPPAIDS_PanelGeneration
+          {
+            sizeRatio: 1
+          }
+          FormCustomerDemandPPAIDS_PanelMLBMQB
+          {
+            sizeRatio: 1
+          }
+          FormCustomerDemandPPAIDS_PanelPower
+          {
+            sizeRatio: 1
+          }
+          FormCustomerDemandPPAIDS_PanelTimeUnit
+          {
+            sizeRatio: 1
+          }
+          FormCustomerDemandPPAIDS_PanelOperation
+          {
+            sizeRatio: 1
+          }
+          FormCustomerDemandPPAIDS_PanelTable
+          {
+            sizeRatio: 1
+          }
+          FormCustomerDemandPPAIDS_MatrixEditorTable
+          {
+            gridColor: '#c4c4c4'
+            totalHeaderWidth: 200
+            attributeHeaderWidthRatio: 0.6
+            nameHeaderWidthRatio: 0.4
+            columnWidth: 100
+            horizontalGrid: true
+            verticalGrid: true
+            backendState
+            {
+              componentId: 'QMacroPlanner::FormCustomerDemandPPAIDS.MatrixEditorTable'
+              state
+              {
+                cells
+                {
+                  attributes
+                  {
+                    attribute_Value
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 0
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'Value'
+                    }
+                  }
+                }
+                columns
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'StartDate'"
+                  }
+                }
+                rows
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'Name'"
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    userconfigurableinformation
+    {
+    }
+    page: ''
+    group: ''
+    index: 29
+    image: 'SHOPPINGBASKET'
+    description: ''
+  }
+  formatversion: 2
+  id: 'Customer_demand_PPAIDS_view'
+  name: 'Customer demand PPAIDS view'
+  isglobal: false
+  isroot: true
+}

--
Gitblit v1.9.3