From 8c546e869f979f6f9e83d141cb8b767da6472d66 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期二, 15 十月 2024 16:53:46 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg

---
 _Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern0.qbl                                                                         |   46 +
 _Main/BL/Type_OfflinePlanTableInfo/StaticMethod_CreateNew.qbl                                                                              |   23 
 _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def                                      |   81 --
 _Main/BL/Type_ArchiveBudget/_ROOT_Type_ArchiveBudget.qbl                                                                                   |    6 
 _Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Response_pPreviousEditionCurve_cPreviousEditionCurve_OnUserChanged.def       |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight445.def                                   |   16 
 _Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick#613.def                        |    5 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationBase.def                                            |   37 +
 _Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/_ROOT_Component_FormProductionPlan.def                                            |   10 
 _Main/BL/Type_ArchiveFile/Attribute_DateTime.qbl                                                                                           |    7 
 _Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl                                                                             |    5 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPR.def                                                      |    4 
 _Main/BL/Type_NewOfflinePlanCell/StaticMethod_SynchronizeToNewSupply.qbl                                                                   |   36 +
 _Main/BL/Type_ProductionLineBatchData/Method_OnOK.qbl                                                                                      |   77 --
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomation.def                                                |   40 
 _Main/BL/Type_NewOfflinePlanRow/Attribute_OperationID.qbl                                                                                  |    7 
 _Main/BL/Type_ArchiveFile/Attribute_FilePath.qbl                                                                                           |    7 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionCurve.def                                                   |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def                                                      |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly996.def                                  |   36 +
 _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelDaily_478_bApply568_OnClick#952.def             |   19 
 _Main/BL/Type_ArchiveFile/Attribute_Name.qbl                                                                                               |    7 
 _Main/BL/Type_ArchiveFile/DefaultValue_UserName.qbl                                                                                        |    0 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mOfflinePlanInterface_OnClick.def |   23 
 _Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw                                                                                        |   50 -
 _Main/UI/MacroPlannerWebApp/Component_Form701/Response_OnCreated.def                                                                       |    5 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionIDS_bSelectionChecks289_OnClick.def                          |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily#478.def                                  |   25 
 _Main/UI/MacroPlannerWebApp/Views/Forecasts.vw                                                                                             |   42 +
 _Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/Component_MatrixEditorPISPIP.def                                                  |   10 
 _Main/BL/Type_ArchivePR/_ROOT_Type_ArchivePR.qbl                                                                                           |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionIDS.def                                                     |    4 
 _Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl                                                                       |    2 
 _Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504#801.def                                                             |   50 -
 _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelWeekly_791_bApply_OnClick.def                   |    9 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_ButtonCompare_OnClick.def                           |    7 
 _Main/UI/MacroPlannerWebApp/Views/BatchSetShiftPattern.vw                                                                                  |  107 +++
 _Main/BL/Type_ArchivePP/_ROOT_Type_ArchivePP.qbl                                                                                           |    6 
 _Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelFilter_ButtonFilter_OnClick.def                                                |    8 
 _Main/BL/Type_ArchivePPA/_ROOT_Type_ArchivePPA.qbl                                                                                         |    6 
 _Main/BL/Type_ArchiveIDS/_ROOT_Type_ArchiveIDS.qbl                                                                                         |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPPA_bSelectionChecks253_OnClick.def                          |    6 
 _Main/BL/Type_LocalTool/StaticMethod_SetUnitShiftPattern.qbl                                                                               |   33 +
 _Main/BL/Type_Archive/StaticMethod_Archive.qbl                                                                                             |   20 
 _Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelFilter_119_ButtonFilter_OnClick.def                          |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily819.def                                   |   36 +
 _Main/BL/Type_NewOfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl                                                               |   56 +
 _Main/BL/Relations/Relation_ArchiveFile_Archive_Archive_ArchiveFile.qbl                                                                    |   23 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelFilter_ButtonFilter_OnClick.def                                   |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionCurve_bSelectionChecks422_OnClick.def                        |    6 
 _Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelFilter_ButtonClearFilter_OnClick#466.def                                       |   19 
 _Main/BL/Type_ArchiveCurve/_ROOT_Type_ArchiveCurve.qbl                                                                                     |    6 
 _Main/BL/Type_ArchiveFile/DefaultValue_Name.qbl                                                                                            |    0 
 _Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Component_MatrixEditor515.def                                                     |   11 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPPA.def                                                     |    4 
 _Main/BL/Type_ArchiveFile/Attribute_UserName.qbl                                                                                           |    7 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelOperation#568.def                                                |   15 
 _Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def                                               |   16 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgSecondDevelopmentPlan.def                                       |    1 
 _Main/BL/Type_Forecast/StaticMethod_SplitUsingCurve.qbl                                                                                    |    2 
 _Main/BL/Type_ArchiveFile/_ROOT_Type_ArchiveFile.qbl                                                                                       |   14 
 _Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelFilter.def                                                                    |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_dhXMLDataListener_OnDataChanged.def                 |   20 
 _Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bConfirm_OnClick.def                                             |    4 
 _Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_bComparison_OnClick.def                                          |    6 
 _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly#791.def                                 |   95 +++
 _Main/BL/Type_OfflinePlanTableInfo/Function_CalcTableName.qbl                                                                              |   13 
 _Main/UI/MacroPlannerWebApp/Views/TransferPlan.vw                                                                                          |   57 +
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pVersionInfomationCompare_ButtonDelete2_OnClick.def                    |   18 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPR_bSelectionChecks700_OnClick.def                           |    6 
 _Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Component_pPPAArchive.def                                                    |    2 
 _Main/UI/MacroPlannerWebApp/Views/Time_Capacities.vw                                                                                       |   24 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def                                                  |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pVersionInfomationBase_ButtonDelete_OnClick.def                        |   18 
 _Main/BL/Type_NewOfflinePlanTable/Method_Comparison.qbl                                                                                    |  100 +++
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def                                           |   11 
 _Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_OnCreated.def                                                     |   17 
 _Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl                                                                          |   34 +
 _Main/BL/Type_LocalCell_OfflinePlanComparison/StaticMethod_ComparedNew.qbl                                                                 |  107 +++
 _Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl                                                                            |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/Component_PanelMatrix.def                                                         |    8 
 _Main/BL/Type_NewOfflinePlanCell/Method_GetNewOfflinePlanMatrixTooltip.qbl                                                                 |   19 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationCompare.def                                         |   37 +
 _Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bDeductChangeoverLoss_OnClick.def                                |    5 
 /dev/null                                                                                                                                  |    5 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_bSelectionChecks687_OnClick.def                           |    6 
 _Main/BL/Type_OfflinePlanTableInfo/StaticMethod_Create.qbl                                                                                 |    2 
 _Main/BL/Type_ArchiveFile/DefaultValue_FilePath.qbl                                                                                        |    0 
 _Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_bSelectionChecks703_OnClick.def                       |    6 
 89 files changed, 1,371 insertions(+), 403 deletions(-)

diff --git a/_Main/BL/Relations/Relation_ArchiveBudget_Archive_Archive_ArchiveBudget.qbl b/_Main/BL/Relations/Relation_ArchiveBudget_Archive_Archive_ArchiveBudget.qbl
deleted file mode 100644
index 099e214..0000000
--- a/_Main/BL/Relations/Relation_ArchiveBudget_Archive_Archive_ArchiveBudget.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation ArchiveBudget_Archive_Archive_ArchiveBudget
-{
-  #keys: '1[413988.0.1193510089]'
-  DefaultRelationStrategy
-  {
-  }
-  RelationSide.LeftSide Archive
-  {
-    #keys: '3[413988.0.1193510091][413988.0.1193510090][413988.0.1193510092]'
-    Cardinality: '0to1'
-    ObjectDefinition: ArchiveBudget
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide ArchiveBudget
-  {
-    #keys: '3[413988.0.1193510094][413988.0.1193510093][413988.0.1193510095]'
-    Cardinality: '1toN'
-    ObjectDefinition: Archive
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Relations/Relation_ArchiveCurve_Archive_Archive_ArchiveCurve.qbl b/_Main/BL/Relations/Relation_ArchiveCurve_Archive_Archive_ArchiveCurve.qbl
deleted file mode 100644
index 6866a7a..0000000
--- a/_Main/BL/Relations/Relation_ArchiveCurve_Archive_Archive_ArchiveCurve.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation ArchiveCurve_Archive_Archive_ArchiveCurve
-{
-  #keys: '1[413988.0.1193510162]'
-  DefaultRelationStrategy
-  {
-  }
-  RelationSide.LeftSide Archive
-  {
-    #keys: '3[413988.0.1193510164][413988.0.1193510163][413988.0.1193510165]'
-    Cardinality: '0to1'
-    ObjectDefinition: ArchiveCurve
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide ArchiveCurve
-  {
-    #keys: '3[413988.0.1193510167][413988.0.1193510166][413988.0.1193510168]'
-    Cardinality: '1toN'
-    ObjectDefinition: Archive
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Relations/Relation_ArchiveFile_Archive_Archive_ArchiveFile.qbl b/_Main/BL/Relations/Relation_ArchiveFile_Archive_Archive_ArchiveFile.qbl
new file mode 100644
index 0000000..0d31776
--- /dev/null
+++ b/_Main/BL/Relations/Relation_ArchiveFile_Archive_Archive_ArchiveFile.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation ArchiveFile_Archive_Archive_ArchiveFile
+{
+  #keys: '1[414996.1.137244656]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Archive
+  {
+    #keys: '3[414996.1.137244658][414996.1.137244657][414996.1.137244659]'
+    Cardinality: '0to1'
+    ObjectDefinition: ArchiveFile
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide ArchiveFile
+  {
+    #keys: '3[414996.1.137244661][414996.1.137244660][414996.1.137244662]'
+    Cardinality: '1toN'
+    ObjectDefinition: Archive
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_ArchiveIDS_Archive_Archive_ArchiveIDS.qbl b/_Main/BL/Relations/Relation_ArchiveIDS_Archive_Archive_ArchiveIDS.qbl
deleted file mode 100644
index 7fec3ca..0000000
--- a/_Main/BL/Relations/Relation_ArchiveIDS_Archive_Archive_ArchiveIDS.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation ArchiveIDS_Archive_Archive_ArchiveIDS
-{
-  #keys: '1[413988.0.1193510197]'
-  DefaultRelationStrategy
-  {
-  }
-  RelationSide.LeftSide Archive
-  {
-    #keys: '3[413988.0.1193510199][413988.0.1193510198][413988.0.1193510200]'
-    Cardinality: '0to1'
-    ObjectDefinition: ArchiveIDS
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide ArchiveIDS
-  {
-    #keys: '3[413988.0.1193510202][413988.0.1193510201][413988.0.1193510203]'
-    Cardinality: '1toN'
-    ObjectDefinition: Archive
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Relations/Relation_ArchivePPA_Archive_Archive_ArchivePPA.qbl b/_Main/BL/Relations/Relation_ArchivePPA_Archive_Archive_ArchivePPA.qbl
deleted file mode 100644
index edbfa21..0000000
--- a/_Main/BL/Relations/Relation_ArchivePPA_Archive_Archive_ArchivePPA.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation ArchivePPA_Archive_Archive_ArchivePPA
-{
-  #keys: '1[413988.0.1174013545]'
-  DefaultRelationStrategy
-  {
-  }
-  RelationSide.LeftSide Archive
-  {
-    #keys: '3[413988.0.1174013547][413988.0.1174013546][413988.0.1174013548]'
-    Cardinality: '0to1'
-    ObjectDefinition: ArchivePPA
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide ArchivePPA
-  {
-    #keys: '3[413988.0.1174013550][413988.0.1174013549][413988.0.1174013551]'
-    Cardinality: '1toN'
-    ObjectDefinition: Archive
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Relations/Relation_ArchivePP_Archive_Archive_ArchivePP.qbl b/_Main/BL/Relations/Relation_ArchivePP_Archive_Archive_ArchivePP.qbl
deleted file mode 100644
index e0ec7c1..0000000
--- a/_Main/BL/Relations/Relation_ArchivePP_Archive_Archive_ArchivePP.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation ArchivePP_Archive_Archive_ArchivePP
-{
-  #keys: '1[413988.0.1193510127]'
-  DefaultRelationStrategy
-  {
-  }
-  RelationSide.LeftSide Archive
-  {
-    #keys: '3[413988.0.1193510129][413988.0.1193510128][413988.0.1193510130]'
-    Cardinality: '0to1'
-    ObjectDefinition: ArchivePP
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide ArchivePP
-  {
-    #keys: '3[413988.0.1193510132][413988.0.1193510131][413988.0.1193510133]'
-    Cardinality: '1toN'
-    ObjectDefinition: Archive
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Relations/Relation_ArchivePR_Archive_Archive_ArchivePR.qbl b/_Main/BL/Relations/Relation_ArchivePR_Archive_Archive_ArchivePR.qbl
deleted file mode 100644
index 4f4a406..0000000
--- a/_Main/BL/Relations/Relation_ArchivePR_Archive_Archive_ArchivePR.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation ArchivePR_Archive_Archive_ArchivePR
-{
-  #keys: '1[413988.0.1179741558]'
-  DefaultRelationStrategy
-  {
-  }
-  RelationSide.LeftSide Archive
-  {
-    #keys: '3[413988.0.1179741560][413988.0.1179741559][413988.0.1179741561]'
-    Cardinality: '0to1'
-    ObjectDefinition: ArchivePR
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide ArchivePR
-  {
-    #keys: '3[413988.0.1179741563][413988.0.1179741562][413988.0.1179741564]'
-    Cardinality: '1toN'
-    ObjectDefinition: Archive
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Type_Archive/StaticMethod_Archive.qbl b/_Main/BL/Type_Archive/StaticMethod_Archive.qbl
index e23e3a4..26bd4bd 100644
--- a/_Main/BL/Type_Archive/StaticMethod_Archive.qbl
+++ b/_Main/BL/Type_Archive/StaticMethod_Archive.qbl
@@ -23,42 +23,42 @@
         filePath        := archiveFileJSON.Get( "fileFullPath" ).GetString();
         
         if ( archiveType = "PR" ) {
-          apr := select( archive, ArchivePR, tempAPR, tempAPR.Name() = fileName );
+          apr := select( archive, ArchiveFile.astype( ArchivePR ), tempAPR, tempAPR.Name() = fileName );
           if ( not isnull( apr ) ) {
             apr.FilePath( filePath );
           } else {
-            archive.ArchivePR( relnew, Name := fileName, FilePath := filePath );
+            archive.ArchiveFile( relnew,ArchivePR, Name := fileName, FilePath := filePath );
           }
         } else if ( archiveType = "PP" ) {
-          app := select( archive, ArchivePP, tempAPP, tempAPP.Name() = fileName );
+          app := select( archive, ArchiveFile.astype( ArchivePP ), tempAPP, tempAPP.Name() = fileName );
           if ( not isnull( app ) ) {
             app.FilePath( filePath );
           } else {
-            archive.ArchivePP( relnew, Name := fileName, FilePath := filePath );
+            archive.ArchiveFile( relnew,ArchivePP, Name := fileName, FilePath := filePath );
           }
         } else if ( archiveType = "Budget" ) {
-          ab := select( archive, ArchiveBudget, tempAB, tempAB.Name() = fileName );
+          ab := select( archive, ArchiveFile.astype( ArchiveBudget ), tempAB, tempAB.Name() = fileName );
           if ( not isnull( ab ) ) {
             ab.FilePath( filePath );
           } else {
-            archive.ArchiveBudget( relnew, Name := fileName, FilePath := filePath );
+            archive.ArchiveFile( relnew,ArchiveBudget, Name := fileName, FilePath := filePath );
           }
         } else if ( archiveType = "PPA" ) {
           // 瀛樻。PPA
-          appa := select( archive, ArchivePPA, tempAPPA, tempAPPA.Name() = fileName );
+          appa := select( archive, ArchiveFile.astype( ArchivePPA ), tempAPPA, tempAPPA.Name() = fileName );
           if ( not isnull( appa ) ) {
             appa.FilePath( filePath );
             appa.SourceFileBinaryValue( ppaBinaryValue );
           } else {
-            archive.ArchivePPA( relnew, Name := fileName, FilePath := filePath, SourceFileBinaryValue := ppaBinaryValue );
+            archive.ArchiveFile( relnew,ArchivePPA, Name := fileName, FilePath := filePath, SourceFileBinaryValue := ppaBinaryValue );
           }
           
           // 瀛樻。Curve
-          ac := select( archive, ArchiveCurve, tempAC, true );
+          ac := select( archive, ArchiveFile.astype( ArchiveCurve ), tempAC, true );
           if ( not isnull( ac ) ) {
             ac.Delete();
           }
-          archive.ArchiveCurve( relnew, Name := "濮嬬粓鍙瓨涓�鐗�.xlsx", FilePath := curveFileName, SourceFileBinaryValue := curveBinaryValue );
+          archive.ArchiveFile( relnew,ArchiveCurve, Name := "濮嬬粓鍙瓨涓�鐗�.xlsx", FilePath := curveFileName, SourceFileBinaryValue := curveBinaryValue );
         }
       }
     }
diff --git a/_Main/BL/Type_ArchiveBudget/Attribute_DateTime.qbl b/_Main/BL/Type_ArchiveBudget/Attribute_DateTime.qbl
deleted file mode 100644
index 89965f4..0000000
--- a/_Main/BL/Type_ArchiveBudget/Attribute_DateTime.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute DateTime
-{
-  #keys: '3[413988.0.1193510074][413988.0.1193510073][413988.0.1193510075]'
-  ValueType: DateTime
-}
diff --git a/_Main/BL/Type_ArchiveBudget/Attribute_FilePath.qbl b/_Main/BL/Type_ArchiveBudget/Attribute_FilePath.qbl
deleted file mode 100644
index 7e2889e..0000000
--- a/_Main/BL/Type_ArchiveBudget/Attribute_FilePath.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute FilePath
-{
-  #keys: '3[413988.0.1193510077][413988.0.1193510076][413988.0.1193510078]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchiveBudget/Attribute_Name.qbl b/_Main/BL/Type_ArchiveBudget/Attribute_Name.qbl
deleted file mode 100644
index 7c3b273..0000000
--- a/_Main/BL/Type_ArchiveBudget/Attribute_Name.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute Name
-{
-  #keys: '3[413988.0.1193510080][413988.0.1193510079][413988.0.1193510081]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchiveBudget/Attribute_UserName.qbl b/_Main/BL/Type_ArchiveBudget/Attribute_UserName.qbl
deleted file mode 100644
index 9c9e886..0000000
--- a/_Main/BL/Type_ArchiveBudget/Attribute_UserName.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute UserName
-{
-  #keys: '3[413988.0.1193510083][413988.0.1193510082][413988.0.1193510084]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchiveBudget/DefaultValue_FilePath.qbl b/_Main/BL/Type_ArchiveBudget/DefaultValue_FilePath.qbl
deleted file mode 100644
index c83cd18..0000000
--- a/_Main/BL/Type_ArchiveBudget/DefaultValue_FilePath.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: FilePath
-}
diff --git a/_Main/BL/Type_ArchiveBudget/DefaultValue_Name.qbl b/_Main/BL/Type_ArchiveBudget/DefaultValue_Name.qbl
deleted file mode 100644
index 86c3d59..0000000
--- a/_Main/BL/Type_ArchiveBudget/DefaultValue_Name.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: Name
-}
diff --git a/_Main/BL/Type_ArchiveBudget/DefaultValue_UserName.qbl b/_Main/BL/Type_ArchiveBudget/DefaultValue_UserName.qbl
deleted file mode 100644
index 48ef2c3..0000000
--- a/_Main/BL/Type_ArchiveBudget/DefaultValue_UserName.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: UserName
-}
diff --git a/_Main/BL/Type_ArchiveBudget/_ROOT_Type_ArchiveBudget.qbl b/_Main/BL/Type_ArchiveBudget/_ROOT_Type_ArchiveBudget.qbl
index 8313931..1bde702 100644
--- a/_Main/BL/Type_ArchiveBudget/_ROOT_Type_ArchiveBudget.qbl
+++ b/_Main/BL/Type_ArchiveBudget/_ROOT_Type_ArchiveBudget.qbl
@@ -1,9 +1,9 @@
 Quintiq file version 2.0
 #root
 #parent: #DomainModel
-Type ArchiveBudget
+TypeSpecialization ArchiveBudget
 {
-  #keys: '5[413988.0.1193510071][413988.0.1193510069][0.0.0][413988.0.1193510070][413988.0.1193510072]'
-  BaseType: Object
+  #keys: '2[414996.1.137364727][413988.0.1193510069]'
+  Parent: ArchiveFile
   StructuredName: 'ArchiveBudgets'
 }
diff --git a/_Main/BL/Type_ArchiveCurve/Attribute_DateTime.qbl b/_Main/BL/Type_ArchiveCurve/Attribute_DateTime.qbl
deleted file mode 100644
index 8b5947c..0000000
--- a/_Main/BL/Type_ArchiveCurve/Attribute_DateTime.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute DateTime
-{
-  #keys: '3[413988.0.1193510147][413988.0.1193510146][413988.0.1193510148]'
-  ValueType: DateTime
-}
diff --git a/_Main/BL/Type_ArchiveCurve/Attribute_FilePath.qbl b/_Main/BL/Type_ArchiveCurve/Attribute_FilePath.qbl
deleted file mode 100644
index e46d7a0..0000000
--- a/_Main/BL/Type_ArchiveCurve/Attribute_FilePath.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute FilePath
-{
-  #keys: '3[413988.0.1193510150][413988.0.1193510149][413988.0.1193510151]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchiveCurve/Attribute_Name.qbl b/_Main/BL/Type_ArchiveCurve/Attribute_Name.qbl
deleted file mode 100644
index 80fb3d7..0000000
--- a/_Main/BL/Type_ArchiveCurve/Attribute_Name.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute Name
-{
-  #keys: '3[413988.0.1193510153][413988.0.1193510152][413988.0.1193510154]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchiveCurve/Attribute_UserName.qbl b/_Main/BL/Type_ArchiveCurve/Attribute_UserName.qbl
deleted file mode 100644
index 98c5f87..0000000
--- a/_Main/BL/Type_ArchiveCurve/Attribute_UserName.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute UserName
-{
-  #keys: '3[413988.0.1193510156][413988.0.1193510155][413988.0.1193510157]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchiveCurve/_ROOT_Type_ArchiveCurve.qbl b/_Main/BL/Type_ArchiveCurve/_ROOT_Type_ArchiveCurve.qbl
index ae357f5..d1970a9 100644
--- a/_Main/BL/Type_ArchiveCurve/_ROOT_Type_ArchiveCurve.qbl
+++ b/_Main/BL/Type_ArchiveCurve/_ROOT_Type_ArchiveCurve.qbl
@@ -1,9 +1,9 @@
 Quintiq file version 2.0
 #root
 #parent: #DomainModel
-Type ArchiveCurve
+TypeSpecialization ArchiveCurve
 {
-  #keys: '5[413988.0.1193510144][413988.0.1193510142][0.0.0][413988.0.1193510143][413988.0.1193510145]'
-  BaseType: Object
+  #keys: '2[414996.1.137364732][413988.0.1193510142]'
+  Parent: ArchiveFile
   StructuredName: 'ArchiveCurves'
 }
diff --git a/_Main/BL/Type_ArchiveFile/Attribute_DateTime.qbl b/_Main/BL/Type_ArchiveFile/Attribute_DateTime.qbl
new file mode 100644
index 0000000..ad1d5dc
--- /dev/null
+++ b/_Main/BL/Type_ArchiveFile/Attribute_DateTime.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute DateTime
+{
+  #keys: '3[414996.1.137244673][414996.1.137244672][414996.1.137244674]'
+  ValueType: DateTime
+}
diff --git a/_Main/BL/Type_ArchiveFile/Attribute_FilePath.qbl b/_Main/BL/Type_ArchiveFile/Attribute_FilePath.qbl
new file mode 100644
index 0000000..eadd3b8
--- /dev/null
+++ b/_Main/BL/Type_ArchiveFile/Attribute_FilePath.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute FilePath
+{
+  #keys: '3[414996.1.137244676][414996.1.137244675][414996.1.137244677]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ArchiveFile/Attribute_Name.qbl b/_Main/BL/Type_ArchiveFile/Attribute_Name.qbl
new file mode 100644
index 0000000..28ecb30
--- /dev/null
+++ b/_Main/BL/Type_ArchiveFile/Attribute_Name.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+  #keys: '3[414996.1.137244679][414996.1.137244678][414996.1.137244680]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ArchiveFile/Attribute_UserName.qbl b/_Main/BL/Type_ArchiveFile/Attribute_UserName.qbl
new file mode 100644
index 0000000..343b30c
--- /dev/null
+++ b/_Main/BL/Type_ArchiveFile/Attribute_UserName.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute UserName
+{
+  #keys: '3[414996.1.137244670][414996.1.137244669][414996.1.137244671]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ArchiveCurve/DefaultValue_FilePath.qbl b/_Main/BL/Type_ArchiveFile/DefaultValue_FilePath.qbl
similarity index 100%
rename from _Main/BL/Type_ArchiveCurve/DefaultValue_FilePath.qbl
rename to _Main/BL/Type_ArchiveFile/DefaultValue_FilePath.qbl
diff --git a/_Main/BL/Type_ArchiveCurve/DefaultValue_Name.qbl b/_Main/BL/Type_ArchiveFile/DefaultValue_Name.qbl
similarity index 100%
rename from _Main/BL/Type_ArchiveCurve/DefaultValue_Name.qbl
rename to _Main/BL/Type_ArchiveFile/DefaultValue_Name.qbl
diff --git a/_Main/BL/Type_ArchiveCurve/DefaultValue_UserName.qbl b/_Main/BL/Type_ArchiveFile/DefaultValue_UserName.qbl
similarity index 100%
rename from _Main/BL/Type_ArchiveCurve/DefaultValue_UserName.qbl
rename to _Main/BL/Type_ArchiveFile/DefaultValue_UserName.qbl
diff --git a/_Main/BL/Type_ArchiveFile/_ROOT_Type_ArchiveFile.qbl b/_Main/BL/Type_ArchiveFile/_ROOT_Type_ArchiveFile.qbl
new file mode 100644
index 0000000..9c9c317
--- /dev/null
+++ b/_Main/BL/Type_ArchiveFile/_ROOT_Type_ArchiveFile.qbl
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type ArchiveFile
+{
+  #keys: '5[414996.1.137244653][414996.1.137244651][0.0.0][414996.1.137244652][414996.1.137244654]'
+  BaseType: Object
+  OnCreate: 'this.DateTime( DateTime::Now() );'
+  OnDelete:
+  [*
+    OS::RemoveFile( this.FilePath() );
+  *]
+  StructuredName: 'ArchiveFiles'
+}
diff --git a/_Main/BL/Type_ArchiveIDS/Attribute_DateTime.qbl b/_Main/BL/Type_ArchiveIDS/Attribute_DateTime.qbl
deleted file mode 100644
index 8b82448..0000000
--- a/_Main/BL/Type_ArchiveIDS/Attribute_DateTime.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute DateTime
-{
-  #keys: '3[413988.0.1193510182][413988.0.1193510181][413988.0.1193510183]'
-  ValueType: DateTime
-}
diff --git a/_Main/BL/Type_ArchiveIDS/Attribute_FilePath.qbl b/_Main/BL/Type_ArchiveIDS/Attribute_FilePath.qbl
deleted file mode 100644
index acf800b..0000000
--- a/_Main/BL/Type_ArchiveIDS/Attribute_FilePath.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute FilePath
-{
-  #keys: '3[413988.0.1193510185][413988.0.1193510184][413988.0.1193510186]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchiveIDS/Attribute_Name.qbl b/_Main/BL/Type_ArchiveIDS/Attribute_Name.qbl
deleted file mode 100644
index 05f26b3..0000000
--- a/_Main/BL/Type_ArchiveIDS/Attribute_Name.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute Name
-{
-  #keys: '3[413988.0.1193510188][413988.0.1193510187][413988.0.1193510189]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchiveIDS/Attribute_UserName.qbl b/_Main/BL/Type_ArchiveIDS/Attribute_UserName.qbl
deleted file mode 100644
index 46dc986..0000000
--- a/_Main/BL/Type_ArchiveIDS/Attribute_UserName.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute UserName
-{
-  #keys: '3[413988.0.1193510191][413988.0.1193510190][413988.0.1193510192]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchiveIDS/DefaultValue_FilePath.qbl b/_Main/BL/Type_ArchiveIDS/DefaultValue_FilePath.qbl
deleted file mode 100644
index c83cd18..0000000
--- a/_Main/BL/Type_ArchiveIDS/DefaultValue_FilePath.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: FilePath
-}
diff --git a/_Main/BL/Type_ArchiveIDS/DefaultValue_Name.qbl b/_Main/BL/Type_ArchiveIDS/DefaultValue_Name.qbl
deleted file mode 100644
index 86c3d59..0000000
--- a/_Main/BL/Type_ArchiveIDS/DefaultValue_Name.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: Name
-}
diff --git a/_Main/BL/Type_ArchiveIDS/DefaultValue_UserName.qbl b/_Main/BL/Type_ArchiveIDS/DefaultValue_UserName.qbl
deleted file mode 100644
index 48ef2c3..0000000
--- a/_Main/BL/Type_ArchiveIDS/DefaultValue_UserName.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: UserName
-}
diff --git a/_Main/BL/Type_ArchiveIDS/_ROOT_Type_ArchiveIDS.qbl b/_Main/BL/Type_ArchiveIDS/_ROOT_Type_ArchiveIDS.qbl
index a441d0d..c13ecc4 100644
--- a/_Main/BL/Type_ArchiveIDS/_ROOT_Type_ArchiveIDS.qbl
+++ b/_Main/BL/Type_ArchiveIDS/_ROOT_Type_ArchiveIDS.qbl
@@ -1,9 +1,9 @@
 Quintiq file version 2.0
 #root
 #parent: #DomainModel
-Type ArchiveIDS
+TypeSpecialization ArchiveIDS
 {
-  #keys: '5[413988.0.1193510179][413988.0.1193510177][0.0.0][413988.0.1193510178][413988.0.1193510180]'
-  BaseType: Object
+  #keys: '2[414996.1.137364717][413988.0.1193510177]'
+  Parent: ArchiveFile
   StructuredName: 'ArchiveIDSs'
 }
diff --git a/_Main/BL/Type_ArchivePP/Attribute_DateTime.qbl b/_Main/BL/Type_ArchivePP/Attribute_DateTime.qbl
deleted file mode 100644
index 364def4..0000000
--- a/_Main/BL/Type_ArchivePP/Attribute_DateTime.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute DateTime
-{
-  #keys: '3[413988.0.1193510112][413988.0.1193510111][413988.0.1193510113]'
-  ValueType: DateTime
-}
diff --git a/_Main/BL/Type_ArchivePP/Attribute_FilePath.qbl b/_Main/BL/Type_ArchivePP/Attribute_FilePath.qbl
deleted file mode 100644
index 8774e4f..0000000
--- a/_Main/BL/Type_ArchivePP/Attribute_FilePath.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute FilePath
-{
-  #keys: '3[413988.0.1193510115][413988.0.1193510114][413988.0.1193510116]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchivePP/Attribute_Name.qbl b/_Main/BL/Type_ArchivePP/Attribute_Name.qbl
deleted file mode 100644
index 0dd98e3..0000000
--- a/_Main/BL/Type_ArchivePP/Attribute_Name.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute Name
-{
-  #keys: '3[413988.0.1193510118][413988.0.1193510117][413988.0.1193510119]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchivePP/Attribute_UserName.qbl b/_Main/BL/Type_ArchivePP/Attribute_UserName.qbl
deleted file mode 100644
index f173271..0000000
--- a/_Main/BL/Type_ArchivePP/Attribute_UserName.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute UserName
-{
-  #keys: '3[413988.0.1193510121][413988.0.1193510120][413988.0.1193510122]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchivePP/DefaultValue_FilePath.qbl b/_Main/BL/Type_ArchivePP/DefaultValue_FilePath.qbl
deleted file mode 100644
index c83cd18..0000000
--- a/_Main/BL/Type_ArchivePP/DefaultValue_FilePath.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: FilePath
-}
diff --git a/_Main/BL/Type_ArchivePP/DefaultValue_Name.qbl b/_Main/BL/Type_ArchivePP/DefaultValue_Name.qbl
deleted file mode 100644
index 86c3d59..0000000
--- a/_Main/BL/Type_ArchivePP/DefaultValue_Name.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: Name
-}
diff --git a/_Main/BL/Type_ArchivePP/DefaultValue_UserName.qbl b/_Main/BL/Type_ArchivePP/DefaultValue_UserName.qbl
deleted file mode 100644
index 48ef2c3..0000000
--- a/_Main/BL/Type_ArchivePP/DefaultValue_UserName.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: UserName
-}
diff --git a/_Main/BL/Type_ArchivePP/_ROOT_Type_ArchivePP.qbl b/_Main/BL/Type_ArchivePP/_ROOT_Type_ArchivePP.qbl
index 2023f5d..129204c 100644
--- a/_Main/BL/Type_ArchivePP/_ROOT_Type_ArchivePP.qbl
+++ b/_Main/BL/Type_ArchivePP/_ROOT_Type_ArchivePP.qbl
@@ -1,9 +1,9 @@
 Quintiq file version 2.0
 #root
 #parent: #DomainModel
-Type ArchivePP
+TypeSpecialization ArchivePP
 {
-  #keys: '5[413988.0.1193510109][413988.0.1193510107][0.0.0][413988.0.1193510108][413988.0.1193510110]'
-  BaseType: Object
+  #keys: '2[414996.1.137364707][413988.0.1193510107]'
+  Parent: ArchiveFile
   StructuredName: 'ArchivePPs'
 }
diff --git a/_Main/BL/Type_ArchivePPA/Attribute_DateTime.qbl b/_Main/BL/Type_ArchivePPA/Attribute_DateTime.qbl
deleted file mode 100644
index 601c905..0000000
--- a/_Main/BL/Type_ArchivePPA/Attribute_DateTime.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute DateTime
-{
-  #keys: '3[413988.0.1174013571][413988.0.1174013570][413988.0.1174013572]'
-  ValueType: DateTime
-}
diff --git a/_Main/BL/Type_ArchivePPA/Attribute_FilePath.qbl b/_Main/BL/Type_ArchivePPA/Attribute_FilePath.qbl
deleted file mode 100644
index 5e4ecb4..0000000
--- a/_Main/BL/Type_ArchivePPA/Attribute_FilePath.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute FilePath
-{
-  #keys: '3[413988.0.1174013594][413988.0.1174013593][413988.0.1174013595]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchivePPA/Attribute_Name.qbl b/_Main/BL/Type_ArchivePPA/Attribute_Name.qbl
deleted file mode 100644
index 4178409..0000000
--- a/_Main/BL/Type_ArchivePPA/Attribute_Name.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute Name
-{
-  #keys: '3[413988.0.1174013584][413988.0.1174013583][413988.0.1174013585]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchivePPA/Attribute_UserName.qbl b/_Main/BL/Type_ArchivePPA/Attribute_UserName.qbl
deleted file mode 100644
index a1c0cb3..0000000
--- a/_Main/BL/Type_ArchivePPA/Attribute_UserName.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute UserName
-{
-  #keys: '3[413988.0.1174013561][413988.0.1174013560][413988.0.1174013562]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchivePPA/_ROOT_Type_ArchivePPA.qbl b/_Main/BL/Type_ArchivePPA/_ROOT_Type_ArchivePPA.qbl
index ad5734d..a2b8c92 100644
--- a/_Main/BL/Type_ArchivePPA/_ROOT_Type_ArchivePPA.qbl
+++ b/_Main/BL/Type_ArchivePPA/_ROOT_Type_ArchivePPA.qbl
@@ -1,9 +1,9 @@
 Quintiq file version 2.0
 #root
 #parent: #DomainModel
-Type ArchivePPA
+TypeSpecialization ArchivePPA
 {
-  #keys: '5[413988.0.1174013542][413988.0.1174013540][0.0.0][413988.0.1174013541][413988.0.1174013543]'
-  BaseType: Object
+  #keys: '2[414996.1.137364700][413988.0.1174013540]'
+  Parent: ArchiveFile
   StructuredName: 'ArchivePPAs'
 }
diff --git a/_Main/BL/Type_ArchivePR/Attribute_DateTime.qbl b/_Main/BL/Type_ArchivePR/Attribute_DateTime.qbl
deleted file mode 100644
index b799556..0000000
--- a/_Main/BL/Type_ArchivePR/Attribute_DateTime.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute DateTime
-{
-  #keys: '3[413988.0.1179741549][413988.0.1179741548][413988.0.1179741550]'
-  ValueType: DateTime
-}
diff --git a/_Main/BL/Type_ArchivePR/Attribute_FilePath.qbl b/_Main/BL/Type_ArchivePR/Attribute_FilePath.qbl
deleted file mode 100644
index f767bb2..0000000
--- a/_Main/BL/Type_ArchivePR/Attribute_FilePath.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute FilePath
-{
-  #keys: '3[413988.0.1179741555][413988.0.1179741554][413988.0.1179741556]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchivePR/Attribute_Name.qbl b/_Main/BL/Type_ArchivePR/Attribute_Name.qbl
deleted file mode 100644
index 1f03d4e..0000000
--- a/_Main/BL/Type_ArchivePR/Attribute_Name.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute Name
-{
-  #keys: '3[413988.0.1179741552][413988.0.1179741551][413988.0.1179741553]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchivePR/Attribute_UserName.qbl b/_Main/BL/Type_ArchivePR/Attribute_UserName.qbl
deleted file mode 100644
index fc80da0..0000000
--- a/_Main/BL/Type_ArchivePR/Attribute_UserName.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute UserName
-{
-  #keys: '3[413988.0.1179741546][413988.0.1179741545][413988.0.1179741547]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_ArchivePR/DefaultValue_FilePath.qbl b/_Main/BL/Type_ArchivePR/DefaultValue_FilePath.qbl
deleted file mode 100644
index c83cd18..0000000
--- a/_Main/BL/Type_ArchivePR/DefaultValue_FilePath.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: FilePath
-}
diff --git a/_Main/BL/Type_ArchivePR/DefaultValue_Name.qbl b/_Main/BL/Type_ArchivePR/DefaultValue_Name.qbl
deleted file mode 100644
index 86c3d59..0000000
--- a/_Main/BL/Type_ArchivePR/DefaultValue_Name.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: Name
-}
diff --git a/_Main/BL/Type_ArchivePR/DefaultValue_UserName.qbl b/_Main/BL/Type_ArchivePR/DefaultValue_UserName.qbl
deleted file mode 100644
index 48ef2c3..0000000
--- a/_Main/BL/Type_ArchivePR/DefaultValue_UserName.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  TargetAttribute: UserName
-}
diff --git a/_Main/BL/Type_ArchivePR/_ROOT_Type_ArchivePR.qbl b/_Main/BL/Type_ArchivePR/_ROOT_Type_ArchivePR.qbl
index df7b1be..a601e3e 100644
--- a/_Main/BL/Type_ArchivePR/_ROOT_Type_ArchivePR.qbl
+++ b/_Main/BL/Type_ArchivePR/_ROOT_Type_ArchivePR.qbl
@@ -1,9 +1,9 @@
 Quintiq file version 2.0
 #root
 #parent: #DomainModel
-Type ArchivePR
+TypeSpecialization ArchivePR
 {
-  #keys: '5[413988.0.1179741542][413988.0.1179741540][0.0.0][413988.0.1179741541][413988.0.1179741543]'
-  BaseType: Object
+  #keys: '2[414996.1.137244682][413988.0.1179741540]'
+  Parent: ArchiveFile
   StructuredName: 'ArchivePRs'
 }
diff --git a/_Main/BL/Type_Forecast/StaticMethod_SplitUsingCurve.qbl b/_Main/BL/Type_Forecast/StaticMethod_SplitUsingCurve.qbl
index 9e1023e..b4c0858 100644
--- a/_Main/BL/Type_Forecast/StaticMethod_SplitUsingCurve.qbl
+++ b/_Main/BL/Type_Forecast/StaticMethod_SplitUsingCurve.qbl
@@ -19,7 +19,7 @@
     OS::CreateDirectory( filePath );
     
     macroPlan := salesSegment.MacroPlan();
-    ac := select( archive, ArchiveCurve, tempAC, true );
+    ac := select( archive, ArchiveFile.astype( ArchiveCurve ), tempAC, true );
     
     pathCurve     := filePath + ac.Name();
     Archive::WriteTempFile( pathCurve, ac.SourceFileBinaryValue() );
diff --git a/_Main/BL/Type_LocalCell_OfflinePlanComparison/StaticMethod_ComparedNew.qbl b/_Main/BL/Type_LocalCell_OfflinePlanComparison/StaticMethod_ComparedNew.qbl
new file mode 100644
index 0000000..749da30
--- /dev/null
+++ b/_Main/BL/Type_LocalCell_OfflinePlanComparison/StaticMethod_ComparedNew.qbl
@@ -0,0 +1,107 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ComparedNew (
+  RecycleBin recycleBin,
+  const NewOfflinePlanTable baseOfflinePlan,
+  const NewOfflinePlanTable compareOfflinePlan
+) as LocalTable
+{
+  TextBody:
+  [*
+    // rislai Jun-20-2024 (created)
+    table := recycleBin.LocalTable( relnew,Name := LocalCell_OfflinePlanComparison::GetTableName());
+    
+    localColumns := construct( LocalColumns );
+    localColumnIndexTree := NamedValueTree::Create();
+    traverse( baseOfflinePlan,NewOfflinePlanColumn,column,column.StartDate() >=  baseOfflinePlan.MacroPlan().StartOfPlanning().Date()){
+      localColumnHandle := localColumnIndexTree.GetHandle( column.StartDate().AsQUILL() );
+      localColumnIndex := guard( localColumnIndexTree.Root().Child( localColumnHandle ),null( NamedValue ));
+      if( isnull( localColumnIndex )){
+        localColumn := table.LocalColumn( relnew,CustomDate := column.StartDate());
+        localColumns.Add( localColumn );
+        localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 );
+      }
+    }
+    traverse( compareOfflinePlan,NewOfflinePlanColumn,column,column.StartDate() >=  compareOfflinePlan.MacroPlan().StartOfPlanning().Date()){
+      localColumnHandle := localColumnIndexTree.GetHandle( column.StartDate().AsQUILL() );
+      localColumnIndex := guard( localColumnIndexTree.Root().Child( localColumnHandle ),null( NamedValue ));
+      if( isnull( localColumnIndex )){
+        localColumn := table.LocalColumn( relnew,CustomDate := column.StartDate());
+        localColumns.Add( localColumn );
+        localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 );
+      }
+    }
+    
+    baseOfflinePlanCells := construct( NewOfflinePlanCells, constcontent );
+    baseOfflinePlanCellIndexTree := NamedValueTree::Create();
+    compareOfflinePlanCells := construct( NewOfflinePlanCells, constcontent );
+    compareOfflinePlanCellIndexTree := NamedValueTree::Create();
+    
+    localRows := construct( LocalRows );
+    localRowIndexTree := NamedValueTree::Create();
+    
+    traverse( baseOfflinePlan,NewOfflinePlanRow,row,row.Type() = "1" ){
+      rowKey := row.ProductID() + "@$#" + row.ProductionLine()+ "@$#";
+      localRowHandle := localRowIndexTree.GetHandle( rowKey );
+      localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
+      if( isnull( localRowIndex )){
+        localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := row.ProductID(),Remark := rowKey );
+        localRows.Add( localRow );
+        localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
+      }
+      traverse( row,NewOfflinePlanCell,cell ){
+        columnKey := cell.NewOfflinePlanColumn().StartDate().AsQUILL();
+        cellKey := rowKey + columnKey;
+        cellHandle := baseOfflinePlanCellIndexTree.GetHandle( cellKey );
+        baseOfflinePlanCells.Add( cell );
+        baseOfflinePlanCellIndexTree.Root().AddChild( cellHandle,baseOfflinePlanCells.Size() - 1 );
+      }
+    }
+    traverse( compareOfflinePlan,NewOfflinePlanRow,row,row.Type() = "1" ){
+      rowKey := row.ProductID() + "@$#" + row.ProductionLine()+ "@$#";
+      localRowHandle := localRowIndexTree.GetHandle( rowKey );
+      localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
+      if( isnull( localRowIndex )){
+        localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := row.ProductID(),Remark := rowKey );
+        localRows.Add( localRow );
+        localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
+      }
+      traverse( row,NewOfflinePlanCell,cell ){
+        columnKey := cell.NewOfflinePlanColumn().StartDate().AsQUILL();
+        cellHandle := compareOfflinePlanCellIndexTree.GetHandle( rowKey + columnKey );
+        compareOfflinePlanCells.Add( cell );
+        compareOfflinePlanCellIndexTree.Root().AddChild( cellHandle,compareOfflinePlanCells.Size() - 1 );
+      }
+    }
+    
+    traverse( localRows,Elements,localRow ){
+      rowKey := localRow.Remark();
+      traverse( localColumns,Elements,localColumn ){
+        columnKey := localColumn.CustomDate().AsQUILL();
+        cellKey := rowKey + columnKey;
+        
+        baseOfflinePlanCell := constnull( NewOfflinePlanCell );
+        compareOfflinePlanCell := constnull( NewOfflinePlanCell );
+        baseOfflinePlanCellIndex := guard( baseOfflinePlanCellIndexTree.Root().Child( baseOfflinePlanCellIndexTree.GetHandle( cellKey ) ),null( NamedValue ));
+        compareOfflinePlanCellIndex := guard( compareOfflinePlanCellIndexTree.Root().Child( compareOfflinePlanCellIndexTree.GetHandle( cellKey ) ),null( NamedValue ));
+        if( not isnull( baseOfflinePlanCellIndex )){
+          baseOfflinePlanCell := baseOfflinePlanCells.Element( baseOfflinePlanCellIndex.GetValueAsNumber() ); 
+        }
+        if( not isnull( compareOfflinePlanCellIndex )){
+          compareOfflinePlanCell := compareOfflinePlanCells.Element( compareOfflinePlanCellIndex.GetValueAsNumber() ); 
+        }
+        
+        localRow.LocalCell( relnew,LocalCell_OfflinePlanComparison,LocalColumn := localColumn,
+                            BaseVersion := ifexpr( isnull( baseOfflinePlanCell),0.0,baseOfflinePlanCell.Quantity()),
+                            CompareVersion := ifexpr( isnull( compareOfflinePlanCell),0.0,compareOfflinePlanCell.Quantity()));
+      }
+    }
+    traverse( table,LocalColumn,column ){
+      if( column.LocalCell( relsize ) = 0 ){
+        column.Delete(); 
+      } 
+    }
+    
+    return table;
+  *]
+}
diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
index 3f4b090..e115edc 100644
--- a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
+++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
@@ -6,7 +6,7 @@
 {
   TextBody:
   [*
-    // rislai Aug-6-2024 (created)
+      // rislai Aug-6-2024 (created)
     table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() );
     if( not isnull( table )){
       table.Delete(); 
diff --git a/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl b/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl
index b53b40e..31bd0a7 100644
--- a/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl
+++ b/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern.qbl
@@ -5,13 +5,39 @@
   ShiftPattern shiftPattern,
   Date startDate,
   Date endDate,
-  Numbers weekdays
+  Numbers weekdays,
+  Number skipWeek
 )
 {
   TextBody:
   [*
     // Akari Oct-10-2024 (created)
     owner := unit.MacroPlan();
+    
+    saveDays := construct( Dates );
+    flag := startDate.StartOfNextWeek();
+    for( i := startDate; i<endDate; i := i + 1 ){
+      if( i < flag ){
+        saveDays.Add( i ); 
+      }else{
+        temp := skipWeek - 1;
+        while( temp > 0 ){
+          i := flag;
+          flag := i.StartOfNextWeek();
+          temp--;
+          
+          info( i.Format( "Y-M2-D2") );
+          info( flag.Format( "Y-M2-D2") );
+        }
+      }
+    }
+    
+    info( "----------------------------");
+    
+    traverse( saveDays,Elements,element ){
+      info( element.Format( "Y-M2-D2")); 
+    }
+    
     dayPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, 
                                       period_MP.TimeUnit() = 'Day' and 
                                       period_MP.StartDate() >= startDate and 
@@ -21,16 +47,16 @@
                                        period_MP.StartDate() >= startDate and 
                                        period_MP.EndDate() <= endDate and exists( weekdays, Elements,dayOfWeek,dayOfWeek = period_MP.StartDate().DayOfWeek() ),period_MP.StartDate());
     
+    
     if( dayPeriod_MPs.Size() > 0 ){
-      unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( dayPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()) and not isnull( unitPeriodTime.UnitAvailability()));
+      unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( dayPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
       if( unitPeriodTimes.Size() > 0 ){
         LocalTool::SetUnitShiftPattern( owner,unitPeriodTimes,shiftPattern );
       }
-      
     }
     if( weekPeriod_MPs.Size() <> 0 ){
       traverse( weekPeriod_MPs,Elements,period_MP ){
-        unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP() and not isnull( unitPeriodTime.UnitAvailability()));
+        unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP());
         if( unitPeriodTimes.Size() > 0 ){
           LocalTool::SetUnitShiftPattern( owner,unitPeriodTimes,shiftPattern );
         }
diff --git a/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern0.qbl b/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern0.qbl
new file mode 100644
index 0000000..8e45588
--- /dev/null
+++ b/_Main/BL/Type_LocalTool/StaticMethod_BatchSetUnitShiftPattern0.qbl
@@ -0,0 +1,46 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod BatchSetUnitShiftPattern (
+  Unit unit,
+  ShiftPattern shiftPattern,
+  Date startDate,
+  Date endDate,
+  Number skipDay
+)
+{
+  TextBody:
+  [*
+    // Akari Oct-10-2024 (created)
+    owner := unit.MacroPlan();
+    
+    saveDays := construct( Dates );
+    for( i := startDate; i < endDate; i := i + skipDay ){
+      saveDays.Add( i ); 
+    }
+    
+    
+    dayPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, 
+                                      period_MP.TimeUnit() = 'Day' and 
+                                      period_MP.StartDate() >= startDate and 
+                                      period_MP.EndDate() <= endDate and exists( saveDays, Elements,day,day = period_MP.StartDate()) ,period_MP.StartDate());
+    weekPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, 
+                                       period_MP.TimeUnit() = 'Week' and 
+                                       period_MP.StartDate() >= startDate and 
+                                       period_MP.EndDate() <= endDate and exists( saveDays, Elements,day,day = period_MP.StartDate()) ,period_MP.StartDate());
+    
+    
+    if( dayPeriod_MPs.Size() > 0 ){
+      unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( dayPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
+      if( unitPeriodTimes.Size() > 0 ){
+        info( unitPeriodTimes.Size() );
+        LocalTool::SetUnitShiftPattern( owner,unitPeriodTimes,shiftPattern );
+      }
+    }
+    if( weekPeriod_MPs.Size() <> 0 ){
+      unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( weekPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()));
+      if( unitPeriodTimes.Size() > 0 ){
+        LocalTool::SetUnitShiftPattern( owner,unitPeriodTimes,shiftPattern );
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LocalTool/StaticMethod_SetUnitShiftPattern.qbl b/_Main/BL/Type_LocalTool/StaticMethod_SetUnitShiftPattern.qbl
index 92b0e44..52778d8 100644
--- a/_Main/BL/Type_LocalTool/StaticMethod_SetUnitShiftPattern.qbl
+++ b/_Main/BL/Type_LocalTool/StaticMethod_SetUnitShiftPattern.qbl
@@ -47,6 +47,21 @@
       }
     }
     
+    traverse( unitPeriodTimes,Elements,unitPeriodTime,isnull( unitPeriodTime.UnitAvailability())){
+    //  UnitAvailability::Create( unitPeriodTime.Unit(),
+    //                            unitPeriodTime.Start(),
+    //                            timeunit,
+    //                            maintenance,
+    //                            efficiency,
+    //                            allocation,
+    //                            shiftPattern,
+    //                            maxloadpercentage,
+    //                            nrofunitopen,
+    //                            minloadthreshold,
+    //                            true );
+      unitPeriodTime.CalcUnitAvailability();
+    }
+    
     isbatchedit := unitPeriodTimes.Size() > 1;
     UnitAvailability::CreateOrUpdateForUnitPeriodTimes( unitPeriodTimes,
                                                         not isbatchedit or false,
@@ -66,5 +81,23 @@
                                                         not isbatchedit or false,
                                                         minloadthreshold
                                                        );
+    //UnitAvailability::CreateOrUpdateForUnitPeriodTimes( unitPeriodTimes,
+    //                                                    not isbatchedit or CheckBoxBatchEditMaintenance.Checked(),
+    //                                                    data.TimeUnit(),
+    //                                                    data.Maintenance(),
+    //                                                    not isbatchedit or CheckBoxBatchEditEfficiency.Checked(),
+    //                                                    data.Efficiency(),
+    //                                                    false,
+    //                                                    data.Allocation(),
+    //                                                    not isbatchedit or CheckBoxBatchEditShiftPattern.Checked(),
+    //                                                    data.ShiftPattern(),
+    //                                                    not isbatchedit or CheckBoxBatchEditMaxLoadPercentage.Checked(),
+    //                                                    data.MaximumLoadPercentage(),
+    //                                                    not isbatchedit or CheckBoxBatchEditNrOfUnitsOpen.Checked(),
+    //                                                    data.NrOfUnitsOpen(),
+    //                                                    DataHolderFromThisPeriodOnward.Data(),
+    //                                                    not isbatchedit or CheckBoxBatchEditMinimumLoadThreshold.Checked(),
+    //                                                    data.MinimumLoadThreshold()
+    //                                                   );
   *]
 }
diff --git a/_Main/BL/Type_NewOfflinePlanCell/Method_GetNewOfflinePlanMatrixTooltip.qbl b/_Main/BL/Type_NewOfflinePlanCell/Method_GetNewOfflinePlanMatrixTooltip.qbl
new file mode 100644
index 0000000..593455b
--- /dev/null
+++ b/_Main/BL/Type_NewOfflinePlanCell/Method_GetNewOfflinePlanMatrixTooltip.qbl
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetNewOfflinePlanMatrixTooltip () declarative remote as String
+{
+  TextBody:
+  [*
+    tooltip := '<table>';
+    
+    tooltip := tooltip 
+                 + '<tr><td><b>鎬婚噺锛�</b></td><td>'         + [String]this.Total().TotalQuantity() + '</td></tr>'
+                 + '<tr><td><b>鐝鍚嶏細</b></td><td>'       + this.Total().ShiftPatternName()      + '</td></tr>'
+                 + '<tr><td><b>鐝寮�濮嬫椂闂达細</b></td><td>' + this.Total().ShiftPatternStart()     + '</td></tr>'
+                 + '<tr><td><b>鐝缁撴潫鏃堕棿锛�</b></td><td>' + this.Total().ShiftPatternEnd()       + '</td></tr>';
+    
+    tooltip := tooltip + '</table>'; 
+    
+    return tooltip;
+  *]
+}
diff --git a/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl
new file mode 100644
index 0000000..6b23ce9
--- /dev/null
+++ b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl
@@ -0,0 +1,56 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod DeductionOfReplacementLoss (
+  MacroPlan macroPlan,
+  NewOfflinePlanTable nopt
+)
+{
+  TextBody:
+  [*
+    // 淇濆瓨涓婁竴浠藉瓨妗�
+    newNOPT := NewOfflinePlanCell::SaveAsDraft( macroPlan, nopt );
+    
+    // 鎵ц鎹㈠瀷鎹熷け
+    allProductionLines := selectuniquevalues( newNOPT, NewOfflinePlanRow, tempNOPR, true, tempNOPR.ProductionLine() );
+    
+    traverse ( allProductionLines, Elements, pl
+    //           , pl = "eMotor Assy (France)" 
+             ) 
+    {
+      // 涓嬬嚎璁″垝褰撳墠浜х嚎涓嬬殑琛�
+      noprs      := selectset( newNOPT, NewOfflinePlanRow, tempNOPR, tempNOPR.ProductionLine() = pl and tempNOPR.Type() = "1" );
+      
+      // 涓婁竴涓敓浜х殑浜у搧Cell
+      preNOPCell := null( NewOfflinePlanCell );
+      
+      traverse ( newNOPT, NewOfflinePlanColumn, nopc
+    //             , nopc.StartDate() >= macroPlan.StartOfPlanning().Date() and nopc.StartDate() <= Date::Construct( 2024, 4, 17 ) // 娴嬭瘯鏃跺彲浠ヨ繃婊ゆ椂闂�
+               ) 
+      {         
+        for ( i := 1; i < 10; i++ ) {
+          nopcell := select( noprs, Elements.NewOfflinePlanCell, tempNOPC, tempNOPC.NewOfflinePlanColumn() = nopc and tempNOPC.OrderNr() = i );
+          // 鎹㈠瀷鎹熷け鍙傛暟
+          cls     := select( macroPlan, ChangeLossSetting, tempCLS, 
+                             tempCLS.ProductFirst().ID()  = guard( preNOPCell.NewOfflinePlanRow().ProductID(), "" ) and
+                             tempCLS.ProductSecond().ID() = guard( nopcell.NewOfflinePlanRow().ProductID(), "" )    and
+                             tempCLS.StartDate()          <= nopc.StartDate()                                       and
+                             tempCLS.EndDate()            >= nopc.StartDate()                       
+                            );
+    
+          // 鎵e噺鎹㈠瀷鎹熷け
+          if ( not isnull( preNOPCell ) and not isnull( nopcell ) and not isnull( cls ) ) {
+            preNOPCell.Quantity( preNOPCell.Quantity() - cls.ChangeLossNumber() );                 
+    //        info( "褰撳墠鍒楁椂闂达細", nopc.StartDate().Format( "Y-M2-D2" ), 
+    //              "    涓婁竴涓骇鍝佸綋鍓嶅簭鍙凤細", preNOPCell.Order(), "    涓婁竴涓骇鍝佹暟閲忥細", preNOPCell.Quantity(), "    涓婁竴涓骇鍝佸悕锛�", preNOPCell.NewOfflinePlanRow().ProductID(),
+    //              "    褰撳墠浜у搧搴忓彿锛�"      , nopcell.Order()   , "    褰撳墠浜у搧鏁伴噺锛�"     , nopcell.Quantity(), "    褰撳墠浜у搧鍚嶏細"  , nopcell.NewOfflinePlanRow().ProductID() );
+          }
+          
+          // 璁剧疆涓婁竴涓敓浜х殑浜у搧Cell
+          if ( not isnull( nopcell ) ) {
+            preNOPCell := nopcell;
+          }
+        }
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
index a018b69..5718ef8 100644
--- a/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
+++ b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
@@ -41,7 +41,7 @@
           // 鐢熸垚涓嬬嚎璁″垝銆愪骇绾挎槑缁嗐�戣
           detailedNOPR   := select( nopt, NewOfflinePlanRow, tempNOPR, tempNOPR.ProductionLine() = u.ID() and tempNOPR.ProductID() = pisp.ProductID() and tempNOPR.Type() = "1" );
           if ( isnull( detailedNOPR ) ) {
-            detailedNOPR := nopt.NewOfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := pisp.ProductID(), Type := "1" );
+            detailedNOPR := nopt.NewOfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := pisp.ProductID(), Type := "1", OperationID := o.ID() );
           }
           
           // 鐢熸垚涓嬬嚎璁″垝鍒�
diff --git a/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_SynchronizeToNewSupply.qbl b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_SynchronizeToNewSupply.qbl
new file mode 100644
index 0000000..1ce7d37
--- /dev/null
+++ b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_SynchronizeToNewSupply.qbl
@@ -0,0 +1,36 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod SynchronizeToNewSupply (
+  MacroPlan macroPlan,
+  NewOfflinePlanTable nopt
+)
+{
+  TextBody:
+  [*
+    traverse ( nopt, NewOfflinePlanRow.NewOfflinePlanCell, cell, 
+               cell.NewOfflinePlanRow().Type() = "1" and cell.Quantity() > 0.0 
+    //           and cell.NewOfflinePlanRow().ProductionLine() = "eMotor Assy (France)" and cell.NewOfflinePlanColumn().StartDate() = Date::Construct( 2020, 4, 4 )
+             ) 
+    {
+     pto := select( macroPlan, Unit.Operation.PeriodTaskOperation, tempPTO,
+                    exists( tempPTO, NewSupply, tempNS, tempNS.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() = cell.NewOfflinePlanRow().ProductID() ) and
+                    tempPTO.Operation().UnitID() = cell.NewOfflinePlanRow().ProductionLine()                                                                                                 and
+                    tempPTO.Start().Date()       = cell.NewOfflinePlanColumn().StartDate() );
+      if ( isnull( pto ) ) {
+        o  := select( macroPlan, Unit.Operation, tempO, tempO.ID() = cell.NewOfflinePlanRow().OperationID() );
+        up := select( macroPlan, Unit.UnitPeriod, tempUP, tempUP.UnitID() = cell.NewOfflinePlanRow().ProductionLine() and tempUP.StartDate() = cell.NewOfflinePlanColumn().StartDate() );
+        if ( not isnull( o ) and not isnull( up ) ) {
+          PeriodTaskOperation::Create( o, up, cell.Quantity(), false );
+        }
+      } else {
+        if ( [Number]cell.Quantity() <> [Number]pto.Quantity() ) {
+          pto.Update( cell.Quantity(), false );
+        }
+      }
+      
+      
+      
+      
+    }
+  *]
+}
diff --git a/_Main/BL/Type_NewOfflinePlanRow/Attribute_OperationID.qbl b/_Main/BL/Type_NewOfflinePlanRow/Attribute_OperationID.qbl
new file mode 100644
index 0000000..0845fa7
--- /dev/null
+++ b/_Main/BL/Type_NewOfflinePlanRow/Attribute_OperationID.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute OperationID
+{
+  #keys: '3[413988.0.1695608112][413988.0.1695608111][413988.0.1695608113]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_NewOfflinePlanTable/Method_Comparison.qbl b/_Main/BL/Type_NewOfflinePlanTable/Method_Comparison.qbl
new file mode 100644
index 0000000..743331b
--- /dev/null
+++ b/_Main/BL/Type_NewOfflinePlanTable/Method_Comparison.qbl
@@ -0,0 +1,100 @@
+Quintiq file version 2.0
+#parent: #root
+Method Comparison (
+  RecycleBin recycleBin,
+  const Archive archive
+) as LocalTable
+{
+  TextBody:
+  [*
+    // rislai Jul-17-2024 (created)
+    macroPlan := this.MacroPlan();
+    table := recycleBin.LocalTable( relnew,Name := LocalCell_ProductionComparison::GetTableName());
+    
+    actualDailyProductionDatas := selectset( archive,ActualDailyProductionData,data,true );
+    actualDailyProductionDataIndexTree := NamedValueTree::Create();
+    for( i := 0; i< actualDailyProductionDatas.Size(); i++ ){
+      actualDailyProductionData := actualDailyProductionDatas.Element( i );
+      actualDailyProductionDataKey := actualDailyProductionData.ProductNo() + actualDailyProductionData.ProductionDate().AsQUILL();
+      actualDailyProductionDataHandle := actualDailyProductionDataIndexTree.GetHandle( actualDailyProductionDataKey );
+      actualDailyProductionDataIndexTree.Root().AddChild( actualDailyProductionDataHandle,i ); 
+    }
+    
+    localColumns := construct( LocalColumns );
+    localColumnIndexTree := NamedValueTree::Create();
+    traverse( this,NewOfflinePlanColumn,column,column.StartDate() >=  macroPlan.StartOfPlanning().Date()){
+      localColumn := table.LocalColumn( relnew,CustomDate := column.StartDate());
+      localColumnHandle := localColumnIndexTree.GetHandle( column.StartDate().AsQUILL() );
+      localColumns.Add( localColumn );
+      localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 );
+    }
+    
+    traverse( this,NewOfflinePlanRow,row,row.Type() = "1" ){
+      productID := row.ProductID();
+      // productLine := row.ProductionLine();
+      localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := productID );
+      traverse( row,NewOfflinePlanCell,cell,cell.NewOfflinePlanColumn().StartDate() >= macroPlan.StartOfPlanning().Date() ){
+        localColumnHandle := localColumnIndexTree.GetHandle( cell.NewOfflinePlanColumn().StartDate().AsQUILL() );
+        localColumnIndex := guard( localColumnIndexTree.Root().Child( localColumnHandle ),null( NamedValue ));
+        if( not isnull( localColumnIndex )){
+          actualDailyProductionDataKey := productID + cell.NewOfflinePlanColumn().StartDate().AsQUILL();
+          actualDailyProductionDataHandle := actualDailyProductionDataIndexTree.GetHandle( actualDailyProductionDataKey );
+          actualDailyProductionDataIndex := guard( actualDailyProductionDataIndexTree.Root().Child( actualDailyProductionDataHandle ),null( NamedValue ));
+          
+          actualDailyProductionVolume := 0.0;
+          if( not isnull( actualDailyProductionDataIndex )){
+            actualDailyProductionData := actualDailyProductionDatas.Element( actualDailyProductionDataIndex.GetValueAsNumber() );
+            actualDailyProductionVolume := actualDailyProductionData.ActualOut();
+          }
+          localColumn := localColumns.Element( localColumnIndex.GetValueAsNumber() );
+          localRow.LocalCell( relnew,LocalCell_ProductionComparison ,LocalColumn := localColumn,
+                                           Plan := cell.Quantity(),Actual := actualDailyProductionVolume );
+        }
+      }
+    }
+    traverse( table,LocalColumn,column ){
+      if( column.LocalCell( relsize ) = 0 ){
+        column.Delete(); 
+      } 
+    }
+    // maxCellCount := table.LocalRow( relsize );  
+    
+    //traverse( table,LocalColumn,column ){
+    //  cellIndexTree := NamedValueTree::Create();
+    //  columnKey := column.CustomDate().AsQUILL();
+    //  count := 0;
+    //  traverse( column,LocalCell,cell ){
+    //    rowKey := cell.LocalRow().CustomName();
+    //    cellHandle := cellIndexTree.GetHandle( rowKey + columnKey );
+    //    cellIndexTree.Root().AddChild( cellHandle,count );
+    //    count++;
+    //  }
+    //  traverse( table,LocalRow,row ){
+    //    rowKey := row.CustomName();
+    //    cellHandle := cellIndexTree.GetHandle( rowKey + columnKey );
+    //    cellCount := guard( cellIndexTree.Root().Child( cellHandle ),null( NamedValue ));
+    //    if( isnull( cellCount )){
+    //      row.LocalCell( relnew,LocalCell_ProductionComparison ,LocalColumn := column,
+    //                     Plan := 0,Actual := 0 );
+    //    }
+    //  }
+    //}
+    
+    traverse( table,LocalRow,row ){
+      cellCountTree := NamedValueTree::Create();
+      traverse( row,LocalCell,cell ){
+        cellHandle := cellCountTree.GetHandle( cell.LocalColumn().CustomDate().AsQUILL());
+        cellCountTree.Root().AddChild( cellHandle,0 );
+      }
+      traverse( table,LocalColumn,column ){
+        cellHandle := cellCountTree.GetHandle( column.CustomDate().AsQUILL());
+        cell := guard( cellCountTree.Root().Child( cellHandle ),null( NamedValue ));
+        if( isnull( cell )){
+          row.LocalCell( relnew,LocalCell_ProductionComparison ,LocalColumn := column,Plan := 0,Actual := 0 );
+        }
+      } 
+    }
+    
+    return table;
+  *]
+}
diff --git a/_Main/BL/Type_OfflinePlanTableInfo/Function_CalcTableName.qbl b/_Main/BL/Type_OfflinePlanTableInfo/Function_CalcTableName.qbl
new file mode 100644
index 0000000..740f352
--- /dev/null
+++ b/_Main/BL/Type_OfflinePlanTableInfo/Function_CalcTableName.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcTableName
+{
+  TextBody:
+  [*
+    // Akari Oct-15-2024 (created)
+    
+    value := this.TableSaveTime().Format( "Y-M2-D2 H:m:s" )
+    
+    this.TableName( value );
+  *]
+}
diff --git a/_Main/BL/Type_OfflinePlanTableInfo/StaticMethod_Create.qbl b/_Main/BL/Type_OfflinePlanTableInfo/StaticMethod_Create.qbl
index 419d238..e7a8bc3 100644
--- a/_Main/BL/Type_OfflinePlanTableInfo/StaticMethod_Create.qbl
+++ b/_Main/BL/Type_OfflinePlanTableInfo/StaticMethod_Create.qbl
@@ -15,7 +15,7 @@
       name := macroPlan.MDSMacroPlan().Description();
       
       traverse( macroPlan,OfflinePlanTable,offlinePlanTable ){
-        owner.OfflinePlanTableInfo( relnew,MacroPlanName := name,TableName := offlinePlanTable.SaveDateTime().Format( "Y-M2-D2 H:m:s" ),MacroPlanMDSID := mdsid ,TableSaveTime := offlinePlanTable.SaveDateTime());
+        owner.OfflinePlanTableInfo( relnew,MacroPlanName := name,MacroPlanMDSID := mdsid ,TableSaveTime := offlinePlanTable.SaveDateTime());
       }
     }
     info( owner.OfflinePlanTableInfo( relsize ) );
diff --git a/_Main/BL/Type_OfflinePlanTableInfo/StaticMethod_CreateNew.qbl b/_Main/BL/Type_OfflinePlanTableInfo/StaticMethod_CreateNew.qbl
new file mode 100644
index 0000000..466dc31
--- /dev/null
+++ b/_Main/BL/Type_OfflinePlanTableInfo/StaticMethod_CreateNew.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateNew (
+  const constcontent MacroPlans macroPlans,
+  RecycleBin owner
+)
+{
+  TextBody:
+  [*
+    // Akari Oct-14-2024 (created)
+    owner.OfflinePlanTableInfo( relflush );
+    info( macroPlans.Size() );
+    traverse( macroPlans,Elements,macroPlan ){
+      mdsid := macroPlan.MDSID();
+      name := macroPlan.MDSMacroPlan().Description();
+      
+      traverse( macroPlan,NewOfflinePlanTable,offlinePlanTable ){
+        owner.OfflinePlanTableInfo( relnew,MacroPlanName := name,MacroPlanMDSID := mdsid ,TableSaveTime := offlinePlanTable.SaveDateTime());
+      }
+    }
+    info( owner.OfflinePlanTableInfo( relsize ) );
+  *]
+}
diff --git a/_Main/BL/Type_ProductionLineBatchData/Method_OnOK.qbl b/_Main/BL/Type_ProductionLineBatchData/Method_OnOK.qbl
index 8c9012e..8c9b634 100644
--- a/_Main/BL/Type_ProductionLineBatchData/Method_OnOK.qbl
+++ b/_Main/BL/Type_ProductionLineBatchData/Method_OnOK.qbl
@@ -8,81 +8,6 @@
   TextBody:
   [*
     // rislai Jun-9-2024 (created)
-    firstElement := minselect( unitPeriodTimes, Elements, e, true, e.Start() );
-    
-    start := this.MacroPlan().Start();
-    timeunit := this.MacroPlan().StartOfPlanningPeriod().TimeUnit();
-    maintenance := Duration::Zero();
-    efficiency := 1.0;
-    allocation := 1.0;
-    
-    maxloadpercentage := this.MacroPlan().GlobalParameters_MP().DefaultMaxLoadPercentage();
-    nrofunitopen := 1;
-    minloadthreshold := 0.0;
-    
-    if( not isnull( firstElement ) ){
-      // To inherit the value from last unit availability while creating a new unit availability
-      unitavailability := firstElement.UnitAvailability();
-      start := firstElement.Start();
-    
-      if( not isnull( unitavailability ) ){
-        timeunit := unitavailability.TimeUnit();
-        maintenance := unitavailability.Maintenance();
-        efficiency := unitavailability.Efficiency();
-        allocation := unitavailability.Allocation();
-    
-        maxloadpercentage := unitavailability.MaximumLoadPercentage();
-        nrofunitopen := unitavailability.NrOfUnitsOpen();
-        minloadthreshold := unitavailability.MinimumLoadThreshold();
-      }else{
-        timeunit := firstElement.Period_MP().TimeUnit();
-        maintenance := firstElement.Maintenance();
-        efficiency := firstElement.Efficiency();
-        allocation := firstElement.Allocation();
-    
-        maxloadpercentage := firstElement.MaximumLoadPercentage();
-        nrofunitopen := firstElement.NrOfOpen();
-        minloadthreshold := firstElement.MinimumLoadThreshold();
-      }
-    }
-    
-    isbatchedit := unitPeriodTimes.Size() > 1;
-    UnitAvailability::CreateOrUpdateForUnitPeriodTimes( unitPeriodTimes,
-                                                        not isbatchedit or false,
-                                                        timeunit,
-                                                        maintenance,
-                                                        not isbatchedit or false,
-                                                        efficiency,
-                                                        false,
-                                                        allocation,
-                                                        not isbatchedit or true,
-                                                        shiftPattern,
-                                                        not isbatchedit or false,
-                                                        maxloadpercentage,
-                                                        not isbatchedit or false,
-                                                        nrofunitopen,
-                                                        false,
-                                                        not isbatchedit or false,
-                                                        minloadthreshold
-                                                       );
-    
-    //UnitAvailability::CreateOrUpdateForUnitPeriodTimes( unitPeriodTimes,
-    //                                                    not isbatchedit or CheckBoxBatchEditMaintenance.Checked(),
-    //                                                    data.TimeUnit(),
-    //                                                    data.Maintenance(),
-    //                                                    not isbatchedit or CheckBoxBatchEditEfficiency.Checked(),
-    //                                                    data.Efficiency(),
-    //                                                    false,
-    //                                                    data.Allocation(),
-    //                                                    not isbatchedit or CheckBoxBatchEditShiftPattern.Checked(),
-    //                                                    data.ShiftPattern(),
-    //                                                    not isbatchedit or CheckBoxBatchEditMaxLoadPercentage.Checked(),
-    //                                                    data.MaximumLoadPercentage(),
-    //                                                    not isbatchedit or CheckBoxBatchEditNrOfUnitsOpen.Checked(),
-    //                                                    data.NrOfUnitsOpen(),
-    //                                                    DataHolderFromThisPeriodOnward.Data(),
-    //                                                    not isbatchedit or CheckBoxBatchEditMinimumLoadThreshold.Checked(),
-    //                                                    data.MinimumLoadThreshold()
-    //                                                   );
+    LocalTool::SetUnitShiftPattern( this.MacroPlan(),unitPeriodTimes,shiftPattern );
   *]
 }
diff --git a/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl b/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl
index b00f219..ed9b769 100644
--- a/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl
+++ b/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl
@@ -29,7 +29,8 @@
                                               RowNr                   := rowNr,
                                               SourceStockpoingPointID := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ),
                                               TargetStockpoingPointID := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ),
-                                              ProductID               := pit.Product_MP().ID() );     
+                                              ProductID               := pit.Product_MP().ID(),
+                                              Category                := pit.Product_MP().ParentID() );     
           }
           
           // 鎵惧垪
@@ -77,7 +78,7 @@
     minDateTPC := macroPlan.TransferPlanColumn( relnew,
                                                 ColumnDate := Date::MinDate() );
     traverse ( macroPlan, TransferPlanRow, tpr ) {
-      productCell := minDateTPC.TransferPlanCell( relnew, Value := tpr.ProductID() );
+      productCell := minDateTPC.TransferPlanCell( relnew, Value := tpr.Category() + "_" + tpr.ProductID() );
       productCell.TransferPlanRow( relset, tpr );
     }
     
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
index 3bde815..6807e36 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
@@ -124,6 +124,17 @@
         Title: 'Inventory report'
       ]
     }
+    Component mOfflinePlanInterface
+    {
+      #keys: '[413988.0.1697411489]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'WIND_ENGINE_OFFSHORE'
+        Taborder: 11
+        Title: '涓嬬嚎璁″垝'
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgSecondDevelopmentPlan.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgSecondDevelopmentPlan.def
index 8a7c394..65f45f0 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgSecondDevelopmentPlan.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgSecondDevelopmentPlan.def
@@ -34,6 +34,7 @@
         Image: 'LIGHTBULB'
         Label: 'Output plan'
         Taborder: 1
+        Visible: false
       ]
     }
     Component bAssemblyOnlinePlan
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mOfflinePlanInterface_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mOfflinePlanInterface_OnClick.def
new file mode 100644
index 0000000..0e7644b
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mOfflinePlanInterface_OnClick.def
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: ContextMenuInterface/mOfflinePlanInterface
+Response OnClick () id:Response_MacroPlanner_ContextMenuInterface_mOfflinePlanInterface_OnClick
+{
+  #keys: '[413988.0.1697411525]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan ) and not isnull( InterfaceDataset );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      // 瀛樻。
+      NewOfflinePlanCell::InterfaceArchive( MacroPlan, InterfaceDataset );
+      
+      WebMessageBox::Success( Translations::A_VWED_Success() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Component_pPPAArchive.def b/_Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Component_pPPAArchive.def
index 1670931..11f8a32 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Component_pPPAArchive.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Component_pPPAArchive.def
@@ -31,7 +31,7 @@
             DataType: 'Archive'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchivePPA'
+            Transformation: 'ArchiveFile.astype( ArchivePPA )'
           ]
         }
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Response_pPreviousEditionCurve_cPreviousEditionCurve_OnUserChanged.def b/_Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Response_pPreviousEditionCurve_cPreviousEditionCurve_OnUserChanged.def
index 7fe5e41..f309a89 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Response_pPreviousEditionCurve_cPreviousEditionCurve_OnUserChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogRequirementUpload/Response_pPreviousEditionCurve_cPreviousEditionCurve_OnUserChanged.def
@@ -18,7 +18,7 @@
         dhLocalOriginalFileNameCurve.Data( guard( dhOriginalFileNameCurve.Data(), "" ) );
         
         // 鏇挎崲鍏ㄥ眬Curve涓轰笂涓�鐗圕urve
-        previousAC := select( Archive, ArchiveCurve, tempAC, true );
+        previousAC := select( Archive, ArchiveFile.astype( ArchiveCurve ), tempAC, true );
         dhBinaryDataCurve.Data( BinaryData::FromBase64EncodedString( previousAC.SourceFileBinaryValue().AsBase64EncodedString() ) );
         dhOriginalFileNameCurve.Data( previousAC.Name() );
       } else {
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelFilter.def b/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelFilter.def
index eb49efb..78343ec 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelFilter.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelFilter.def
@@ -86,6 +86,16 @@
         Taborder: 6
       ]
     }
+    Component ButtonClearFilter id:ButtonClearFilter_414
+    {
+      #keys: '[414996.1.137702887]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Clear'
+        Taborder: 8
+      ]
+    }
   ]
   Properties:
   [
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504\043801.def" "b/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504\043801.def"
index 56e00de..f18276f 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504\043801.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_Form701/Component_PanelRibbon504\043801.def"
@@ -18,10 +18,10 @@
           BaseType: 'WebDataExtractor'
           Properties:
           [
-            DataType: 'structured[OfflinePlanTableInfo]'
-            Source: 'dhOfflinePlanTables'
+            DataType: 'RecycleBin'
+            Source: 'RecycleBin'
             Taborder: 0
-            Transformation: 'Elements'
+            Transformation: 'OfflinePlanTableInfo'
           ]
         }
       ]
@@ -55,10 +55,10 @@
           BaseType: 'WebDataExtractor'
           Properties:
           [
-            DataType: 'structured[OfflinePlanTableInfo]'
-            Source: 'dhOfflinePlanTables'
+            DataType: 'RecycleBin'
+            Source: 'RecycleBin'
             Taborder: 0
-            Transformation: 'Elements'
+            Transformation: 'OfflinePlanTableInfo'
           ]
         }
       ]
@@ -69,31 +69,6 @@
         Taborder: 1
       ]
     }
-    Component dhOfflinePlanTables
-    {
-      #keys: '[414996.1.103241339]'
-      BaseType: 'WebDataHolder'
-      Databinding: 'structured[OfflinePlanTableInfo]*'
-      Children:
-      [
-        Component deOfflinePlanTables
-        {
-          #keys: '[414996.1.124700546]'
-          BaseType: 'WebDataExtractor'
-          Properties:
-          [
-            DataType: 'RecycleBin'
-            Source: 'RecycleBin'
-            Taborder: 0
-            Transformation: 'OfflinePlanTableInfo'
-          ]
-        }
-      ]
-      Properties:
-      [
-        Taborder: 4
-      ]
-    }
     Component bExport
     {
       #keys: '[414996.1.104721685]'
@@ -101,7 +76,7 @@
       Properties:
       [
         Image: 'EXPORT1'
-        Taborder: 5
+        Taborder: 3
       ]
     }
     Component dhXMLDataListener
@@ -127,16 +102,7 @@
       ]
       Properties:
       [
-        Taborder: 6
-      ]
-    }
-    Component ButtonRibbon
-    {
-      #keys: '[414996.1.125429607]'
-      BaseType: 'WebButton'
-      Properties:
-      [
-        Taborder: 3
+        Taborder: 4
       ]
     }
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_OnCreated.def
index 2054ef1..5859930 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_OnCreated.def
@@ -8,5 +8,10 @@
   GroupServerCalls: true
   QuillAction
   {
+    Body:
+    [*
+      macroPlans := ApplicationMacroPlanner.GetMacroPlans();
+      OfflinePlanTableInfo::CreateNew( macroPlans,RecycleBin );
+    *]
   }
 }
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelFilter_ButtonClearFilter_OnClick\043466.def" "b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelFilter_ButtonClearFilter_OnClick\043466.def"
new file mode 100644
index 0000000..67e41e3
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelFilter_ButtonClearFilter_OnClick\043466.def"
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelFilter/ButtonClearFilter_414
+Response OnClick () id:Response_PanelFilter_119_ButtonClearFilter_OnClick_466
+{
+  #keys: '[414996.1.137702886]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      ddslGeneration.Text( "<All>" );
+      ddslMQBMLB.Text( "<All>" );
+      ddslPower.Text( "<All>" )
+      dhFinelProduct.Data( DataHolderProduct.Data().Copy() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelFilter_ButtonFilter_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelFilter_ButtonFilter_OnClick.def
index 0e04f16..9836c38 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelFilter_ButtonFilter_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelFilter_ButtonFilter_OnClick.def
@@ -10,15 +10,15 @@
   {
     Body:
     [*
-      products := dhCheckedProduct.Data().Copy();
+      products := dhFinelProduct.Data().Copy();
       if( ddslGeneration.Text() <> "<All>" ){
-        products := selectset( products,Elements,element,element.Generation() <> ddslGeneration.Text());
+        products := selectset( products,Elements,element,element.Generation() = ddslGeneration.Text());
       }
       if( ddslMQBMLB.Text() <> "<All>" ){
-        products := selectset( products,Elements,element,element.MQBMLB() <> ddslMQBMLB.Text());
+        products := selectset( products,Elements,element,element.MQBMLB() = ddslMQBMLB.Text());
       }
       if( ddslPower.Text() <> "<All>" ){
-        products := selectset( products,Elements,element,element.Power() <> ddslPower.Text());
+        products := selectset( products,Elements,element,element.Power() = ddslPower.Text());
       }
       dhFinelProduct.Data( &products );
     *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_ButtonRibbon_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_ButtonRibbon_OnClick.def
deleted file mode 100644
index 6488149..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_ButtonRibbon_OnClick.def
+++ /dev/null
@@ -1,17 +0,0 @@
-Quintiq file version 2.0
-#parent: PanelRibbon504_801/ButtonRibbon
-Response OnClick () id:Response_PanelRibbon504_801_ButtonRibbon_OnClick
-{
-  #keys: '[414996.1.125429626]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  GroupServerCalls: true
-  QuillAction
-  {
-    Body:
-    [*
-      macroPlans := ApplicationMacroPlanner.GetMacroPlans();
-      OfflinePlanTableInfo::Create( macroPlans,RecycleBin );
-    *]
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_bComparison_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_bComparison_OnClick.def
index 292494e..f398e76 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_bComparison_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_bComparison_OnClick.def
@@ -11,13 +11,13 @@
     [*
       baseOfflineTableInfo := ddlBaseOfflinePlanTable.Data();
       baseMacroPlan := ApplicationMacroPlanner.GetMacroPlanByMDSID( baseOfflineTableInfo );
-      baseVersion := select( baseMacroPlan ,OfflinePlanTable,table,table.SaveDateTime() = baseOfflineTableInfo.TableSaveTime() );
+      baseVersion := select( baseMacroPlan ,NewOfflinePlanTable,table,table.SaveDateTime() = baseOfflineTableInfo.TableSaveTime() );
       
       compareOfflineTableInfo := ddlCompareOfflinePlanTable.Data();
       compareMacroPlan := ApplicationMacroPlanner.GetMacroPlanByMDSID( compareOfflineTableInfo );
-      compareVersion := select( compareMacroPlan ,OfflinePlanTable,table,table.SaveDateTime() = compareOfflineTableInfo.TableSaveTime() );
+      compareVersion := select( compareMacroPlan ,NewOfflinePlanTable,table,table.SaveDateTime() = compareOfflineTableInfo.TableSaveTime() );
       
-      dhTable.Data( LocalCell_OfflinePlanComparison::Compared( RecycleBin,baseVersion,compareVersion ));
+      dhTable.Data( LocalCell_OfflinePlanComparison::ComparedNew( RecycleBin,baseVersion,compareVersion ));
     *]
     GroupServerCalls: false
   }
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_dhOfflinePlanTables_OnCreated\04357.def" "b/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_dhOfflinePlanTables_OnCreated\04357.def"
deleted file mode 100644
index 8844fc9..0000000
--- "a/_Main/UI/MacroPlannerWebApp/Component_Form701/Response_PanelRibbon504_801_dhOfflinePlanTables_OnCreated\04357.def"
+++ /dev/null
@@ -1,12 +0,0 @@
-Quintiq file version 2.0
-#parent: PanelRibbon504_801/dhOfflinePlanTables
-Response OnCreated () id:Response_PanelRibbon504_801_dhOfflinePlanTables_OnCreated_57
-{
-  #keys: '[414996.1.103241337]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebComponent_OnCreated'
-  QuillAction
-  {
-    GroupServerCalls: false
-  }
-}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelOperation\043568.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelOperation\043568.def"
index b37ae84..44b99a9 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelOperation\043568.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_PanelOperation\043568.def"
@@ -12,7 +12,7 @@
       Properties:
       [
         Label: '寮�濮嬪姣�'
-        Taborder: 3
+        Taborder: 2
       ]
     }
     Component dhXMLDataListener id:dhXMLDataListener_906
@@ -38,7 +38,7 @@
       ]
       Properties:
       [
-        Taborder: 2
+        Taborder: 1
       ]
     }
     Component bExport id:bExport_98
@@ -50,17 +50,6 @@
         Image: 'EXPORT1'
         Label: '瀵煎嚭'
         Taborder: 0
-      ]
-    }
-    Component bDownload id:bDownload_352
-    {
-      #keys: '[412672.0.1109203542]'
-      BaseType: 'WebButton'
-      Properties:
-      [
-        Image: 'DOWNLOAD'
-        Label: '涓嬭浇'
-        Taborder: 1
       ]
     }
     #child: pVersionInfomation
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def
index 7823f63..35bf6e7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionBudget.def
@@ -21,7 +21,7 @@
             DataType: 'Archive'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchiveBudget'
+            Transformation: 'ArchiveFile.astype( ArchiveBudget )'
           ]
         }
       ]
@@ -61,7 +61,7 @@
             FixedFilter: 'object.Filter( baseSelection,dateUnit )'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchiveBudget'
+            Transformation: 'ArchiveFile.astype( ArchiveBudget )'
           ]
         }
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionCurve.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionCurve.def
index ecc0d24..3e57ff0 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionCurve.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionCurve.def
@@ -21,7 +21,7 @@
             DataType: 'Archive'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchiveCurve'
+            Transformation: 'ArchiveFile.astype(ArchiveCurve)'
           ]
         }
       ]
@@ -61,7 +61,7 @@
             FixedFilter: 'object <> baseSelection'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchiveCurve'
+            Transformation: 'ArchiveFile.astype( ArchiveCurve )'
           ]
         }
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionIDS.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionIDS.def
index ebaefd0..2589294 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionIDS.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionIDS.def
@@ -21,7 +21,7 @@
             DataType: 'Archive'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchiveIDS'
+            Transformation: 'ArchiveFile.astype( ArchiveIDS )'
           ]
         }
       ]
@@ -61,7 +61,7 @@
             FixedFilter: 'object <> baseSelection'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchiveIDS'
+            Transformation: 'ArchiveFile.astype( ArchiveIDS )'
           ]
         }
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def
index 5fcce35..a066998 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPP.def
@@ -21,7 +21,7 @@
             DataType: 'Archive'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchivePP'
+            Transformation: 'ArchiveFile.astype( ArchivePP )'
           ]
         }
       ]
@@ -61,7 +61,7 @@
             FixedFilter: 'object.Filter( baseSelection,dateUnit )'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchivePP'
+            Transformation: 'ArchiveFile.astype( ArchivePP )'
           ]
         }
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPPA.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPPA.def
index 5438664..9d8afc3 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPPA.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPPA.def
@@ -21,7 +21,7 @@
             DataType: 'Archive'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchivePPA'
+            Transformation: 'ArchiveFile.astype( ArchivePPA )'
           ]
         }
       ]
@@ -61,7 +61,7 @@
             FixedFilter: 'object <> baseSelection'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchivePPA'
+            Transformation: 'ArchiveFile.astype( ArchivePPA )'
           ]
         }
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPR.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPR.def
index 84251b8..6c62f9e 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPR.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pSelectionPR.def
@@ -21,7 +21,7 @@
             DataType: 'Archive'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchivePR'
+            Transformation: 'ArchiveFile.astype(ArchivePR)'
           ]
         }
       ]
@@ -61,7 +61,7 @@
             FixedFilter: 'object <> baseSelection'
             Source: 'Archive'
             Taborder: 0
-            Transformation: 'ArchivePR'
+            Transformation: 'ArchiveFile.astype(ArchivePR)'
           ]
         }
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomation.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomation.def
index 9d0dfe9..f06061c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomation.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomation.def
@@ -5,49 +5,31 @@
   BaseType: 'WebPanel'
   Children:
   [
-    Component dhBaseVersionPath id:dhBaseVersionPath_640
+    #child: pVersionInfomationBase
+    #child: pVersionInfomationCompare
+    Component dhCompareVersion
     {
-      #keys: '[412672.0.1119852775]'
+      #keys: '[414996.1.137780879]'
       BaseType: 'WebDataHolder'
-      Databinding: 'String*'
-      Properties:
-      [
-        Taborder: 2
-      ]
-    }
-    Component dhCompareVersionPath id:dhCompareVersionPath_582
-    {
-      #keys: '[412672.0.1119852802]'
-      BaseType: 'WebDataHolder'
-      Databinding: 'String*'
+      Databinding: 'ArchiveFile'
       Properties:
       [
         Taborder: 3
       ]
     }
-    Component lBaseVersionName
+    Component dhBaseVersion
     {
-      #keys: '[412672.0.1119853064]'
-      BaseType: 'WebLabel'
+      #keys: '[414996.1.137780892]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'ArchiveFile'
       Properties:
       [
-        Label: '鍩哄噯闇�姹傜増鏈細'
-        Taborder: 0
-      ]
-    }
-    Component lCompareVersionName
-    {
-      #keys: '[412672.0.1119853066]'
-      BaseType: 'WebLabel'
-      Properties:
-      [
-        Label: '瀵规瘮闇�姹傜増鏈細'
-        Taborder: 1
+        Taborder: 2
       ]
     }
   ]
   Properties:
   [
-    Taborder: 4
+    Taborder: 3
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationBase.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationBase.def
new file mode 100644
index 0000000..0c750e5
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationBase.def
@@ -0,0 +1,37 @@
+Quintiq file version 2.0
+Component pVersionInfomationBase
+{
+  #keys: '[414996.1.137700459]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component lBaseVersionName id:lBaseVersionName_774
+    {
+      #keys: '[414996.1.137700529]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        DataBinding: 'dhBaseVersion.Data.Name'
+        Label: '鍩哄噯闇�姹傜増鏈細'
+        Taborder: 0
+      ]
+    }
+    Component ButtonDelete
+    {
+      #keys: '[414996.1.137420506]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'DELETE'
+        Label: 'Delete'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationCompare.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationCompare.def
new file mode 100644
index 0000000..048766e
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Component_pVersionInfomationCompare.def
@@ -0,0 +1,37 @@
+Quintiq file version 2.0
+Component pVersionInfomationCompare
+{
+  #keys: '[414996.1.137700548]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component lCompareVersionName id:lCompareVersionName_456
+    {
+      #keys: '[414996.1.137700586]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        DataBinding: 'dhCompareVersion.Data.Name'
+        Label: '瀵规瘮闇�姹傜増鏈細'
+        Taborder: 0
+      ]
+    }
+    Component ButtonDelete2
+    {
+      #keys: '[414996.1.137740415]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'DELETE'
+        Label: 'Delete'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelFilter_ButtonFilter_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelFilter_ButtonFilter_OnClick.def
index 345b365..7ee37b7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelFilter_ButtonFilter_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelFilter_ButtonFilter_OnClick.def
@@ -12,13 +12,13 @@
     [*
       products := dhFinelProduct.Data().Copy();
       if( ddslGeneration.Text() <> "<All>" ){
-        products := selectset( products,Elements,element,element.Generation() <> ddslGeneration.Text());
+        products := selectset( products,Elements,element,element.Generation() = ddslGeneration.Text());
       }
       if( ddslMQBMLB.Text() <> "<All>" ){
-        products := selectset( products,Elements,element,element.MQBMLB() <> ddslMQBMLB.Text());
+        products := selectset( products,Elements,element,element.MQBMLB() = ddslMQBMLB.Text());
       }
       if( ddslPower.Text() <> "<All>" ){
-        products := selectset( products,Elements,element,element.Power() <> ddslPower.Text());
+        products := selectset( products,Elements,element,element.Power() = ddslPower.Text());
       }
       dhFinelProduct.Data( &products );
     *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_ButtonCompare_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_ButtonCompare_OnClick.def
index d126b96..3acda12 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_ButtonCompare_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_ButtonCompare_OnClick.def
@@ -5,12 +5,15 @@
   #keys: '[412672.0.1111643148]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return isnull( dhBaseVersion.Data() ) or isnull( dhCompareVersion.Data() );
+  *]
   QuillAction
   {
     Body:
     [*
-      
-      table := LocalCell_DemandComparison::Compared( RecycleBin,MacroPlan, dhBaseVersionPath.Data(),dhCompareVersionPath.Data(),lBaseVersionName.Text(),lCompareVersionName.Text() );
+      table := LocalCell_DemandComparison::Compared( RecycleBin,MacroPlan, dhBaseVersion.Data().FilePath(),dhCompareVersion.Data().FilePath(),lBaseVersionName.Text(),lCompareVersionName.Text() );
       dhComparisonData.Data( table );
     *]
     GroupServerCalls: false
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_bDownload_OnClick\043781.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_bDownload_OnClick\043781.def"
deleted file mode 100644
index a580e4b..0000000
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_bDownload_OnClick\043781.def"
+++ /dev/null
@@ -1,30 +0,0 @@
-Quintiq file version 2.0
-#parent: PanelOperation_568/bDownload_352
-Response OnClick () id:Response_pOperation_bDownload_OnClick_781
-{
-  #keys: '[412672.0.1109203541]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  Precondition:
-  [*
-    flag := true;
-    feedback := "";
-    if( isnull( dhXMLDataListener.Data() )){
-      flag := false;
-      feedback := "褰撳墠鏃犱笅杞芥暟鎹紝鐐瑰嚮瀵煎嚭鍒涘缓涓嬭浇鏁版嵁銆�"
-    }
-    return flag;
-  *]
-  QuillAction
-  {
-    Body:
-    [*
-      binaryValue := dhXMLDataListener.Data( ).Export();
-      
-      Application.Download( LocalCell_DemandComparison::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
-      
-      dhXMLDataListener.Data( ).Delete();
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_dhXMLDataListener_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_dhXMLDataListener_OnDataChanged.def
new file mode 100644
index 0000000..5028aaa
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_PanelOperation_568_dhXMLDataListener_OnDataChanged.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: PanelOperation_568/dhXMLDataListener_906
+Response OnDataChanged () id:Response_PanelOperation_568_dhXMLDataListener_OnDataChanged
+{
+  #keys: '[414996.1.135031114]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      binaryValue := dhXMLDataListener.Data( ).Export();
+      
+      Application.Download( LocalCell_DemandComparison::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
+      
+      dhXMLDataListener.Data( ).Delete();
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_bSelectionChecks703_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_bSelectionChecks703_OnClick.def
index 5d57f6d..9fc65c2 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_bSelectionChecks703_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_bSelectionChecks703_OnClick.def
@@ -11,10 +11,8 @@
     Body:
     [*
       if( CheckboxBudget.Checked() ){
-        dhBaseVersionPath.Data( DropDownListBaseVersionBudget.Data().FilePath() );
-        lBaseVersionName.Text( DropDownListBaseVersionBudget.Data().Name() );
-        dhCompareVersionPath.Data( DropDownListCompareVersionBudget.Data().FilePath() );
-        lCompareVersionName.Text( DropDownListCompareVersionBudget.Data().Name() );
+        dhBaseVersion.Data( DropDownListBaseVersionBudget.Data() );
+        dhCompareVersion.Data( DropDownListCompareVersionBudget.Data() );
       }
     *]
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionCurve_bSelectionChecks422_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionCurve_bSelectionChecks422_OnClick.def
index 84860e7..2fd1422 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionCurve_bSelectionChecks422_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionCurve_bSelectionChecks422_OnClick.def
@@ -11,10 +11,8 @@
     Body:
     [*
       if( CheckboxCurve.Checked() ){
-        dhBaseVersionPath.Data( DropDownListBaseVersionCurve.Data().FilePath() );
-        lBaseVersionName.Text( DropDownListBaseVersionCurve.Data().Name() );
-        dhCompareVersionPath.Data( DropDownListCompareVersionCurve.Data().FilePath() );
-        lCompareVersionName.Text( DropDownListCompareVersionCurve.Data().Name() );
+        dhBaseVersion.Data( DropDownListBaseVersionCurve.Data() );
+        dhCompareVersion.Data( DropDownListCompareVersionCurve.Data() );
       }
     *]
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionIDS_bSelectionChecks289_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionIDS_bSelectionChecks289_OnClick.def
index 9369ce4..a99e87e 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionIDS_bSelectionChecks289_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionIDS_bSelectionChecks289_OnClick.def
@@ -11,10 +11,8 @@
     Body:
     [*
       if( CheckboxIDS.Checked() ){
-        dhBaseVersionPath.Data( DropDownListBaseVersionIDS.Data().FilePath() );
-        lBaseVersionName.Text( DropDownListBaseVersionIDS.Data().Name() );
-        dhCompareVersionPath.Data( DropDownListCompareVersionIDS.Data().FilePath() ); 
-        lCompareVersionName.Text( DropDownListCompareVersionIDS.Data().Name() );
+        dhBaseVersion.Data( DropDownListBaseVersionIDS.Data() );
+        dhCompareVersion.Data( DropDownListCompareVersionIDS.Data() ); 
       }
     *]
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPPA_bSelectionChecks253_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPPA_bSelectionChecks253_OnClick.def
index ee9f482..8d93bb3 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPPA_bSelectionChecks253_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPPA_bSelectionChecks253_OnClick.def
@@ -11,10 +11,8 @@
     Body:
     [*
       if( CheckboxPPA.Checked() ){
-        dhBaseVersionPath.Data( DropDownListBaseVersionPPA.Data().FilePath() );
-        lBaseVersionName.Text( DropDownListBaseVersionPPA.Data().Name() );
-        dhCompareVersionPath.Data( DropDownListCompareVersionPPA.Data().FilePath() );
-        lCompareVersionName.Text( DropDownListCompareVersionPPA.Data().Name() );
+        dhBaseVersion.Data( DropDownListBaseVersionPPA.Data() );
+        dhCompareVersion.Data( DropDownListCompareVersionPPA.Data() );
       }
     *]
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_bSelectionChecks687_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_bSelectionChecks687_OnClick.def
index 04db83b..68e43d4 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_bSelectionChecks687_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_bSelectionChecks687_OnClick.def
@@ -11,10 +11,8 @@
     Body:
     [*
       if( CheckboxPP.Checked() ){
-        dhBaseVersionPath.Data( DropDownListBaseVersionPP.Data().FilePath() );
-        lBaseVersionName.Text( DropDownListBaseVersionPP.Data().Name() );
-        dhCompareVersionPath.Data( DropDownListCompareVersionPP.Data().FilePath() );
-        lCompareVersionName.Text( DropDownListCompareVersionPP.Data().Name() );
+        dhBaseVersion.Data( DropDownListBaseVersionPP.Data() );
+        dhCompareVersion.Data( DropDownListCompareVersionPP.Data() );
       }
     *]
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPR_bSelectionChecks700_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPR_bSelectionChecks700_OnClick.def
index 8b15881..9e217b4 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPR_bSelectionChecks700_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPR_bSelectionChecks700_OnClick.def
@@ -11,10 +11,8 @@
     Body:
     [*
       if( CheckboxPR.Checked() ){
-        dhBaseVersionPath.Data( DropDownListBaseVersionPR.Data().FilePath() );
-        lBaseVersionName.Text( DropDownListBaseVersionPR.Data().Name() );
-        dhCompareVersionPath.Data( DropDownListCompareVersionPR.Data().FilePath() );
-        lCompareVersionName.Text( DropDownListCompareVersionPR.Data().Name() );
+        dhBaseVersion.Data( DropDownListBaseVersionPR.Data() );
+        dhCompareVersion.Data( DropDownListCompareVersionPR.Data() );
       }
     *]
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pVersionInfomationBase_ButtonDelete_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pVersionInfomationBase_ButtonDelete_OnClick.def
new file mode 100644
index 0000000..ecf5902
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pVersionInfomationBase_ButtonDelete_OnClick.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: pVersionInfomationBase/ButtonDelete
+Response OnClick () id:Response_pVersionInfomationBase_ButtonDelete_OnClick
+{
+  #keys: '[414996.1.137612795]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      if( WebMessageBox::Question( Translations::MessageBox_ConfirmDeletion( dhBaseVersion.Name() ),Translations::MessageBox_YesNo() ) = 0 ){
+        dhBaseVersion.Data().Delete();
+      }
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pVersionInfomationCompare_ButtonDelete2_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pVersionInfomationCompare_ButtonDelete2_OnClick.def
new file mode 100644
index 0000000..8448354
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pVersionInfomationCompare_ButtonDelete2_OnClick.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: pVersionInfomationCompare/ButtonDelete2
+Response OnClick () id:Response_pVersionInfomationCompare_ButtonDelete2_OnClick
+{
+  #keys: '[414996.1.137612881]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      if( WebMessageBox::Question( Translations::MessageBox_ConfirmDeletion( dhBaseVersion.Name() ),Translations::MessageBox_YesNo() ) = 0 ){
+        dhCompareVersion.Data().Delete();
+      }
+    *]
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Response_ListSalesDemands_MenuCreate_OnClick\043715.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Response_ListSalesDemands_MenuCreate_OnClick\043715.def"
deleted file mode 100644
index 4267aa8..0000000
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Response_ListSalesDemands_MenuCreate_OnClick\043715.def"
+++ /dev/null
@@ -1,5 +0,0 @@
-Quintiq file version 2.0
-#parent: ListSalesDemands
-Response OnClick () inherited id:Response_ListSalesDemands_MenuCreate_OnClick_715 #extension
-{
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Component_MatrixEditor515.def b/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Component_MatrixEditor515.def
index fbd9bc5..1d48179 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Component_MatrixEditor515.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Component_MatrixEditor515.def
@@ -86,6 +86,17 @@
     }
     #child: matrixEditorActionBarPage623
     #child: matrixeditorContextMenu229
+    Component UserConfigurableInformation675
+    {
+      #keys: '[413988.0.1697329605]'
+      BaseType: 'WebUserConfigurableInformation'
+      Properties:
+      [
+        ObjectType: 'NewOfflinePlanCell'
+        Taborder: 5
+        Tooltip: 'VALUE( object.GetNewOfflinePlanMatrixTooltip() )'
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bConfirm_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bConfirm_OnClick.def
index fe7c4a0..e3789bd 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bConfirm_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bConfirm_OnClick.def
@@ -13,8 +13,8 @@
   {
     Body:
     [*
-      // 瀛樻。
-      NewOfflinePlanCell::InterfaceArchive( MacroPlan, InterfaceDataset );
+      // 鍚屾鍒板懆鏈熶换鍔�
+      NewOfflinePlanCell::SynchronizeToNewSupply( MacroPlan, dhNewOfflinePlanTable.Data() );
       
       // 璁剧疆鎸夐挳锛堥櫎涓嬭浇锛変笉鍙敤
       MacroPlan.A_PreviousScenaioName( MacroPlan.ScenarioName() );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bDeductChangeoverLoss_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bDeductChangeoverLoss_OnClick.def
index a054df7..31f00c2 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bDeductChangeoverLoss_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormNewOfflinePlan/Response_pHeader_bDeductChangeoverLoss_OnClick.def
@@ -13,6 +13,11 @@
   {
     Body:
     [*
+      NewOfflinePlanCell::DeductionOfReplacementLoss( MacroPlan, dhNewOfflinePlanTable.Data() );
+      
+      opt := maxselect( MacroPlan, NewOfflinePlanTable, tempNOPT, true, tempNOPT.SaveDateTime() );
+      dhNewOfflinePlanTable.Data( opt );
+      
       WebMessageBox::Success( Translations::A_VWED_Success() );
     *]
     GroupServerCalls: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def
index 395d971..f13344f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def
@@ -9,7 +9,7 @@
     {
       #keys: '[412672.1.64850982]'
       BaseType: 'WebDropDownList'
-      Databinding: 'OfflinePlanTable'
+      Databinding: 'OfflinePlanTableInfo'
       Children:
       [
         Component DataExtractorRibbon
@@ -18,16 +18,16 @@
           BaseType: 'WebDataExtractor'
           Properties:
           [
-            DataType: 'MacroPlan'
-            Source: 'MacroPlan'
+            DataType: 'RecycleBin'
+            Source: 'RecycleBin'
             Taborder: 0
-            Transformation: 'OfflinePlanTable'
+            Transformation: 'OfflinePlanTableInfo'
           ]
         }
       ]
       Properties:
       [
-        DisplayField: 'SaveDateTime'
+        DisplayField: 'TableName'
         Label: '涓嬬嚎璁″垝:'
         Taborder: 0
       ]
@@ -49,7 +49,7 @@
       Properties:
       [
         DataBinding: 'ddlOfflinePlanTable.Data.SaveDateTime'
-        Taborder: 2
+        Taborder: 4
       ]
     }
     Component bExport id:bExport_298
@@ -59,7 +59,7 @@
       Properties:
       [
         Image: 'EXPORT1'
-        Taborder: 3
+        Taborder: 2
       ]
     }
     Component dhXMLDataListener id:dhXMLDataListener_273
@@ -85,7 +85,7 @@
       ]
       Properties:
       [
-        Taborder: 4
+        Taborder: 3
       ]
     }
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_OnCreated.def
new file mode 100644
index 0000000..cccf588
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_OnCreated.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+Response OnCreated () id:Response_FormOfflinePlanComparison_OnCreated
+{
+  #keys: '[414996.1.137702202]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      macroPlans := ApplicationMacroPlanner.GetMacroPlans();
+      OfflinePlanTableInfo::CreateNew( macroPlans,RecycleBin );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelFilter_119_ButtonFilter_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelFilter_119_ButtonFilter_OnClick.def
index 6a9962a..c25608e 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelFilter_119_ButtonFilter_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelFilter_119_ButtonFilter_OnClick.def
@@ -12,13 +12,13 @@
     [*
       products := dhFinelProduct.Data().Copy();
       if( ddslGeneration.Text() <> "<All>" ){
-        products := selectset( products,Elements,element,element.Generation() <> ddslGeneration.Text());
+        products := selectset( products,Elements,element,element.Generation() = ddslGeneration.Text());
       }
       if( ddslMQBMLB.Text() <> "<All>" ){
-        products := selectset( products,Elements,element,element.MQBMLB() <> ddslMQBMLB.Text());
+        products := selectset( products,Elements,element,element.MQBMLB() = ddslMQBMLB.Text());
       }
       if( ddslPower.Text() <> "<All>" ){
-        products := selectset( products,Elements,element,element.Power() <> ddslPower.Text());
+        products := selectset( products,Elements,element,element.Power() = ddslPower.Text());
       }
       dhFinelProduct.Data( &products );
     *]
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick\043613.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick\043613.def"
index 4cdfee6..ee0cdcb 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick\043613.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick\043613.def"
@@ -9,7 +9,10 @@
   {
     Body:
     [*
-      opt := ddlOfflinePlanTable.Data();
+      offlineTableInfo := ddlOfflinePlanTable.Data();
+      macroPlan := ApplicationMacroPlanner.GetMacroPlanByMDSID( offlineTableInfo );
+      opt := select( macroPlan ,NewOfflinePlanTable,table,table.SaveDateTime() = offlineTableInfo.TableSaveTime() );
+      
       
       dhTable.Data( opt.Comparison( RecycleBin,Archive ));
     *]
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily\043478.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily\043478.def"
new file mode 100644
index 0000000..e278730
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily\043478.def"
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+Component PanelDaily id:PanelDaily_478
+{
+  #keys: '[414996.1.127440897]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: PanelDaily819
+    Component bApply568 id:bApply568_478
+    {
+      #keys: '[414996.1.127821084]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Apply'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 0
+    Title: 'Daily'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily819.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily819.def
new file mode 100644
index 0000000..3bfe67a
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelDaily819.def
@@ -0,0 +1,36 @@
+Quintiq file version 2.0
+Component PanelDaily819
+{
+  #keys: '[414996.1.126333417]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component efDaily
+    {
+      #keys: '[414996.1.126333418]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Label: 'Recur every '
+        Taborder: 0
+        Text: '1'
+      ]
+    }
+    Component LabelDaily
+    {
+      #keys: '[414996.1.126333419]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        Label: 'day(s)'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def
index 3731f86..cf6148c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight.def
@@ -35,16 +35,6 @@
         Taborder: 0
       ]
     }
-    Component bApply
-    {
-      #keys: '[414996.1.116470621]'
-      BaseType: 'WebButton'
-      Properties:
-      [
-        Label: 'Apply'
-        Taborder: 11
-      ]
-    }
     Component ddlShiftPattern
     {
       #keys: '[414996.1.116430349]'
@@ -72,76 +62,7 @@
         Taborder: 1
       ]
     }
-    Component cbMonday
-    {
-      #keys: '[414996.1.117120493]'
-      BaseType: 'WebCheckbox'
-      Properties:
-      [
-        Label: 'Monday'
-        Taborder: 4
-      ]
-    }
-    Component cbTuesday
-    {
-      #keys: '[414996.1.117120516]'
-      BaseType: 'WebCheckbox'
-      Properties:
-      [
-        Label: 'Tuesday'
-        Taborder: 5
-      ]
-    }
-    Component cbWednesday
-    {
-      #keys: '[414996.1.117120539]'
-      BaseType: 'WebCheckbox'
-      Properties:
-      [
-        Label: 'Wednesday'
-        Taborder: 6
-      ]
-    }
-    Component cbThursday
-    {
-      #keys: '[414996.1.117120576]'
-      BaseType: 'WebCheckbox'
-      Properties:
-      [
-        Label: 'Thursday'
-        Taborder: 7
-      ]
-    }
-    Component cbFriday
-    {
-      #keys: '[414996.1.117120599]'
-      BaseType: 'WebCheckbox'
-      Properties:
-      [
-        Label: 'Friday'
-        Taborder: 8
-      ]
-    }
-    Component cbSaturday id:cbSaturday_682
-    {
-      #keys: '[414996.1.117120636]'
-      BaseType: 'WebCheckbox'
-      Properties:
-      [
-        Label: 'Saturday'
-        Taborder: 9
-      ]
-    }
-    Component cbSunday
-    {
-      #keys: '[414996.1.117120659]'
-      BaseType: 'WebCheckbox'
-      Properties:
-      [
-        Label: 'Sunday'
-        Taborder: 10
-      ]
-    }
+    #child: PanelRight445
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight445.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight445.def
new file mode 100644
index 0000000..12cb959
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelRight445.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+Component PanelRight445
+{
+  #keys: '[414996.1.127440860]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: PanelDaily_478
+    #child: PanelWeekly_791
+  ]
+  Properties:
+  [
+    Orientation: 'tab-top'
+    Taborder: 4
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly\043791.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly\043791.def"
new file mode 100644
index 0000000..e23e06e
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly\043791.def"
@@ -0,0 +1,95 @@
+Quintiq file version 2.0
+Component PanelWeekly id:PanelWeekly_791
+{
+  #keys: '[414996.1.127440920]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component cbMonday
+    {
+      #keys: '[414996.1.127440921]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Label: 'Monday'
+        Taborder: 1
+      ]
+    }
+    Component cbTuesday
+    {
+      #keys: '[414996.1.127440922]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Label: 'Tuesday'
+        Taborder: 2
+      ]
+    }
+    Component cbWednesday
+    {
+      #keys: '[414996.1.127440923]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Label: 'Wednesday'
+        Taborder: 3
+      ]
+    }
+    Component cbThursday
+    {
+      #keys: '[414996.1.127440924]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Label: 'Thursday'
+        Taborder: 4
+      ]
+    }
+    Component cbFriday
+    {
+      #keys: '[414996.1.127440925]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Label: 'Friday'
+        Taborder: 5
+      ]
+    }
+    Component cbSaturday
+    {
+      #keys: '[414996.1.127440926]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Label: 'Saturday'
+        Taborder: 6
+      ]
+    }
+    Component cbSunday
+    {
+      #keys: '[414996.1.127440927]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Label: 'Sunday'
+        Taborder: 7
+      ]
+    }
+    #child: PanelWeekly996
+    Component bApply
+    {
+      #keys: '[414996.1.127910499]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Apply'
+        Taborder: 8
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 1
+    Title: 'Weekly'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly996.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly996.def
new file mode 100644
index 0000000..d7d963c
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Component_PanelWeekly996.def
@@ -0,0 +1,36 @@
+Quintiq file version 2.0
+Component PanelWeekly996
+{
+  #keys: '[414996.1.127820590]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component efWeekly id:efWeekly_637
+    {
+      #keys: '[414996.1.127820639]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Label: 'Recur every '
+        Taborder: 0
+        Text: '1'
+      ]
+    }
+    Component LabelWeekly
+    {
+      #keys: '[414996.1.127820645]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        Label: 'week(s)'
+        Taborder: 1
+      ]
+    }
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 0
+  ]
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelDaily_478_bApply568_OnClick\043952.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelDaily_478_bApply568_OnClick\043952.def"
new file mode 100644
index 0000000..e6d1cec
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelDaily_478_bApply568_OnClick\043952.def"
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: PanelDaily_478/bApply568_478
+Response OnClick () id:Response_PanelDaily819_bApply568_OnClick_952
+{
+  #keys: '[414996.1.127821083]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      
+      skipDay := [Number]efDaily.Text();
+      LocalTool::BatchSetUnitShiftPattern( dhSelectUnit.Data(),ddlShiftPattern.Data(),dsStartDate.Date(),dsEndDate.Date() ,skipDay );
+      WebMessageBox::Success( "Success");
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelRight_bApply_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelWeekly_791_bApply_OnClick.def
similarity index 82%
rename from _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelRight_bApply_OnClick.def
rename to _Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelWeekly_791_bApply_OnClick.def
index 1a2c721..76a1490 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelRight_bApply_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionLineBatchSetShiftPattern/Response_PanelWeekly_791_bApply_OnClick.def
@@ -1,8 +1,8 @@
 Quintiq file version 2.0
-#parent: PanelRight/bApply
-Response OnClick () id:Response_PanelRight_bApply_OnClick
+#parent: PanelWeekly_791/bApply
+Response OnClick () id:Response_PanelWeekly996_bApply_OnClick
 {
-  #keys: '[414996.1.117189721]'
+  #keys: '[414996.1.127910498]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebButton_OnClick'
   GroupServerCalls: true
@@ -32,7 +32,8 @@
       if( cbSunday.Checked() ){
         weekdays.Add( 7 ); 
       }
-      LocalTool::BatchSetUnitShiftPattern( dhSelectUnit.Data(),ddlShiftPattern.Data(),dsStartDate.Date(),dsEndDate.Date(),weekdays );
+      skipWeek := [Number]efWeekly.Text();
+      LocalTool::BatchSetUnitShiftPattern( dhSelectUnit.Data(),ddlShiftPattern.Data(),dsStartDate.Date(),dsEndDate.Date(),weekdays ,skipWeek );
       WebMessageBox::Success( "Success");
     *]
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/Component_MatrixEditorPISPIP.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/Component_MatrixEditorPISPIP.def
new file mode 100644
index 0000000..baef54d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/Component_MatrixEditorPISPIP.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component MatrixEditorPISPIP #extension
+{
+  Children:
+  [
+    Component UserConfigurableInformationMatrixEditorPISPIP #extension
+    {
+    }
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/Component_PanelMatrix.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/Component_PanelMatrix.def
new file mode 100644
index 0000000..8186e86
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/Component_PanelMatrix.def
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+Component PanelMatrix #extension
+{
+  Children:
+  [
+    #child: MatrixEditorPISPIP
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/_ROOT_Component_FormProductionPlan.def b/_Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/_ROOT_Component_FormProductionPlan.def
new file mode 100644
index 0000000..b8c746a
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormProductionPlan/_ROOT_Component_FormProductionPlan.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: LibMacroPlannerWebUI
+OrphanComponent FormProductionPlan #extension
+{
+  Children:
+  [
+    #child: PanelMatrix
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/BatchSetShiftPattern.vw b/_Main/UI/MacroPlannerWebApp/Views/BatchSetShiftPattern.vw
index e1a08c5..961b5b1 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/BatchSetShiftPattern.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/BatchSetShiftPattern.vw
@@ -4,6 +4,88 @@
   {
     forms
     {
+      form_legacy_2
+      {
+        title: 'Time Capacities'
+        shown: true
+        componentID: 'FormTimeCapacities'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 13
+          rowSpan: 10
+          columnPosition: 1
+          columnSpan: 12
+        }
+        components
+        {
+          FormTimeCapacities_PanelMatrix
+          {
+            sizeRatio: 1
+          }
+          FormTimeCapacities_MatrixEditorTimeCapacities
+          {
+            gridColor: '#c4c4c4'
+            totalHeaderWidth: 449
+            attributeHeaderWidthRatio: 0.6
+            nameHeaderWidthRatio: 0.4
+            columnWidth: 100
+            horizontalGrid: true
+            verticalGrid: true
+            backendState
+            {
+              componentId: 'QLibMacroPlannerWebUI::FormTimeCapacities.MatrixEditorTimeCapacities'
+              state
+              {
+                cells
+                {
+                  attributes
+                  {
+                    attribute_ShiftPatternName
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 0
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'ShiftPatternName'
+                    }
+                    attribute_Efficiency
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 1
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'Efficiency'
+                    }
+                    attribute_TotalAvailableCapacity
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 2
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'TotalAvailableCapacity'
+                    }
+                  }
+                }
+                columns
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'StartDate'"
+                  }
+                }
+                rows
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'DisplayIndex'"
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
       form_FormProductionLineBatchSetShiftPattern
       {
         title: 'QMacroPlanner::FormProductionLineBatchSetShiftPattern'
@@ -13,9 +95,9 @@
         {
           mode: 'open'
           rowPosition: 1
-          rowSpan: 23
+          rowSpan: 12
           columnPosition: 1
-          columnSpan: 9
+          columnSpan: 10
         }
         components
         {
@@ -48,6 +130,27 @@
           {
             sizeRatio: 1
           }
+          FormProductionLineBatchSetShiftPattern_PanelRight445
+          {
+            sizeRatio: 1
+            activeChild: 'PanelWeekly'
+          }
+          FormProductionLineBatchSetShiftPattern_PanelDaily
+          {
+            sizeRatio: 1
+          }
+          FormProductionLineBatchSetShiftPattern_PanelDaily819
+          {
+            sizeRatio: 1
+          }
+          FormProductionLineBatchSetShiftPattern_PanelWeekly
+          {
+            sizeRatio: 1
+          }
+          FormProductionLineBatchSetShiftPattern_PanelWeekly996
+          {
+            sizeRatio: 1
+          }
         }
       }
       form_FormKPI
diff --git a/_Main/UI/MacroPlannerWebApp/Views/Forecasts.vw b/_Main/UI/MacroPlannerWebApp/Views/Forecasts.vw
new file mode 100644
index 0000000..6d36f78
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Views/Forecasts.vw
@@ -0,0 +1,42 @@
+Quintiq file version 2.0
+{
+  viewcontents
+  {
+    forms
+    {
+      form_legacy_1
+      {
+        components
+        {
+          FormForecasts_DataSetLevelSalesDemands
+          {
+            column_Differnce
+            {
+              columnId: 'Differnce'
+              dataPath: 'Differnce'
+              dataType: 'real'
+              index: 15
+              subtotals: ''
+              width: 150
+            }
+            column_Origin
+            {
+              columnId: 'Origin'
+              dataPath: 'Origin'
+              dataType: 'string'
+              index: 14
+              subtotals: ''
+              width: 150
+            }
+            sort: 'DESC:Origin'
+          }
+        }
+      }
+    }
+  }
+  formatversion: 2
+  id: 'Forecasts'
+  name: 'Forecasts'
+  isglobal: false
+  isroot: false
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw b/_Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw
index bcd0a9f..31f8d84 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/NewOfflinePlan.vw
@@ -30,7 +30,7 @@
           FormNewOfflinePlan_MatrixEditor515
           {
             gridColor: '#c4c4c4'
-            totalHeaderWidth: 511
+            totalHeaderWidth: 507
             attributeHeaderWidthRatio: 0.6
             nameHeaderWidthRatio: 0.4
             columnWidth: 100
@@ -50,7 +50,7 @@
                       type: 'MatrixEditorWebApiCellDataModelInterest'
                       index: 0
                       rowsubtotal: ''
-                      columnsubtotal: 'sum'
+                      columnsubtotal: ''
                       attribute: 'Quantity'
                     }
                     attribute_Order
@@ -87,7 +87,7 @@
           FormNewOfflinePlan_MatrixEditor583
           {
             gridColor: '#c4c4c4'
-            totalHeaderWidth: 510
+            totalHeaderWidth: 509
             attributeHeaderWidthRatio: 0.6
             nameHeaderWidthRatio: 0.4
             columnWidth: 100
@@ -155,48 +155,6 @@
           }
         }
       }
-      form_FormGeneralSettings
-      {
-        title: 'General Settings'
-        shown: true
-        componentID: 'FormGeneralSettings'
-        layout
-        {
-          mode: 'dockright'
-          index: 0
-        }
-        components
-        {
-          FormGeneralSettings_PanelContent
-          {
-            sizeRatio: 1
-          }
-          FormGeneralSettings_PanelGeneralParameter
-          {
-            sizeRatio: 1
-          }
-          FormGeneralSettings_PanelLeadTimeDependent
-          {
-            sizeRatio: 1
-          }
-          FormGeneralSettings_PanelShelfLife
-          {
-            sizeRatio: 1
-          }
-          FormGeneralSettings_PanelSustainability
-          {
-            sizeRatio: 1
-          }
-          FormGeneralSettings_PanelForecastNetting
-          {
-            sizeRatio: 1
-          }
-          FormGeneralSettings_PanelActions
-          {
-            sizeRatio: 1
-          }
-        }
-      }
     }
     userconfigurableinformation
     {
@@ -204,7 +162,7 @@
     page: ''
     group: ''
     index: 0
-    image: 'CHART_DONUT'
+    image: 'BEAR'
     description: ''
   }
   formatversion: 2
diff --git a/_Main/UI/MacroPlannerWebApp/Views/Time_Capacities.vw b/_Main/UI/MacroPlannerWebApp/Views/Time_Capacities.vw
index e44aa89..2362951 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/Time_Capacities.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/Time_Capacities.vw
@@ -101,7 +101,7 @@
           FormProductionLineBatchData_DataSetLevelProductionLineBatchData
           {
             groupDepth: -1
-            sort: 'StartDate'
+            sort: 'DESC:Unit3.Name'
             column_ImageIsEnable
             {
               columnId: 'ImageIsEnable'
@@ -147,12 +147,21 @@
               subtotals: ''
               width: 150
             }
+            column_Unit3_Name
+            {
+              columnId: 'Unit3.Name'
+              dataPath: 'Unit3.Name'
+              dataType: 'string'
+              index: 5
+              subtotals: ''
+              width: 150
+            }
             column_ShiftPattern1_Name
             {
               columnId: 'ShiftPattern1.Name'
               dataPath: 'ShiftPattern1.Name'
               dataType: 'string'
-              index: 5
+              index: 6
               subtotals: ''
               width: 112
             }
@@ -161,10 +170,19 @@
               columnId: 'ShiftPattern2.Name'
               dataPath: 'ShiftPattern2.Name'
               dataType: 'string'
-              index: 6
+              index: 7
               subtotals: ''
               width: 112
             }
+            column_ShiftPattern3_Name
+            {
+              columnId: 'ShiftPattern3.Name'
+              dataPath: 'ShiftPattern3.Name'
+              dataType: 'string'
+              index: 8
+              subtotals: ''
+              width: 150
+            }
           }
         }
       }
diff --git a/_Main/UI/MacroPlannerWebApp/Views/TransferPlan.vw b/_Main/UI/MacroPlannerWebApp/Views/TransferPlan.vw
index 0cda1ef..ec06e46 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/TransferPlan.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/TransferPlan.vw
@@ -17,7 +17,62 @@
           columnPosition: 1
           columnSpan: 12
         }
-        components: null
+        components
+        {
+          FormTransferPlan_pHeader
+          {
+            sizeRatio: 1
+          }
+          FormTransferPlan_pContent
+          {
+            sizeRatio: 1
+          }
+          FormTransferPlan_MatrixEditor872
+          {
+            gridColor: '#c4c4c4'
+            totalHeaderWidth: 200
+            attributeHeaderWidthRatio: 0.6
+            nameHeaderWidthRatio: 0.4
+            columnWidth: 144
+            horizontalGrid: true
+            verticalGrid: true
+            backendState
+            {
+              componentId: 'QMacroPlanner::FormTransferPlan.MatrixEditor872'
+              state
+              {
+                cells
+                {
+                  attributes
+                  {
+                    attribute_Value
+                    {
+                      type: 'MatrixEditorWebApiCellDataModelInterest'
+                      index: 0
+                      rowsubtotal: ''
+                      columnsubtotal: ''
+                      attribute: 'Value'
+                    }
+                  }
+                }
+                columns
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'ColumnDate'"
+                  }
+                }
+                rows
+                {
+                  sorting
+                  {
+                    criteria: "datamember:'SourceStockpoingPointID';datamember:'TargetStockpoingPointID';datamember:'ProductID'"
+                  }
+                }
+              }
+            }
+          }
+        }
       }
       form_FormOptimizerPuzzles
       {

--
Gitblit v1.9.3