From a1285c5bcea445e4c3c2a3e4fe47b9c9b1e9c1a7 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期五, 01 十一月 2024 16:59:40 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg

---
 _Main/BL/Type_ProductInStockingPointInPeriodPlanningLeaf/_ROOT_Type_ProductInStockingPointInPeriodPlanningLeaf.qbl                             |    6 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupArchiveReport_ButtonActualDailyProductio.def |   17 +
 _Main/BL/Type_ProductInStockingPointInPeriodPlanningLeaf/Attribute_IsLock.qbl                                                                  |    7 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupRestraint_ButtonLockPeriodData_OnClick.def   |   17 +
 _Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mDisable_OnClick.def                                              |   21 +
 _Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Response_PanelActualDailyProduction_dsEndDate_OnCreated.def                    |   16 +
 _Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize.qbl                                                                         |   13 
 _Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_matrixeditorContextMenuArchiveTransferPlan.def                         |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_ListLockPeriod.def                                                              |   20 +
 _Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize#194.qbl                                                                     |   17 +
 _Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/_ROOT_Component_FormActualDailyProduction.def                                  |   18 +
 _Main/BL/Type_LockPeriod/Method_Enable.qbl                                                                                                     |   49 ++
 _Main/BL/Type_NewOfflinePlanRow/Attribute_StockingPointID.qbl                                                                                  |    7 
 _Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Response_PanelActualDailyProduction_bReSync_OnClick.def                        |   29 +
 _Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_PanelArchiveTransferPlan515.def                                        |   14 
 _Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/_ROOT_Component_FormArchiveTransferPlan.def                                      |   17 +
 _Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_PanelArchiveTransferPlan.def                                           |   11 
 _Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_listContextMenuLockPeriod.def                                                   |   25 +
 _Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_ListActualDailyProduction.def                                        |   41 ++
 _Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mEnable_OnClick#21.def                                            |   22 +
 _Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl                                                                           |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_listActionBarPageActualDailyProduction.def                           |   10 
 _Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize0.qbl                                                                        |   25 +
 _Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_MatrixEditorArchiveTransferPlan.def                                    |   97 ++++++
 _Main/BL/Type_LockPeriod/Method_Disable.qbl                                                                                                    |   19 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupRestraint.def                                            |   11 
 _Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_PanelActualDailyProduction912.def                                    |   14 
 _Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_listContextMenuActualDailyProduction.def                             |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormArchivePackagingPlan/_ROOT_Component_FormArchivePackagingPlan.def                                    |    4 
 _Main/UI/MacroPlannerWebApp/Views/LockPeriodData.vw                                                                                            |  199 +++++++++++++
 _Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_matrixEditorActionBarPageArchiveTransferPlan.def                       |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/_ROOT_Component_FormLockPeriod.def                                                        |    5 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupArchiveReport.def                                        |   11 
 _Main/BL/Type_LockPeriod/StaticMethod_Create.qbl                                                                                               |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_PanelActualDailyProduction.def                                       |   46 +++
 35 files changed, 827 insertions(+), 25 deletions(-)

diff --git "a/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize\043194.qbl" "b/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize\043194.qbl"
new file mode 100644
index 0000000..0f1fe83
--- /dev/null
+++ "b/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize\043194.qbl"
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Synchronize (
+  InterfaceDataset interfaceDataset,
+  String executor,
+  Date startDate,
+  Date endDate
+)
+{
+  TextBody:
+  [*
+    // rislai Jul-23-2024 (created)
+    for( i := startDate; i <= endDate; i := i+1 ){
+      ActualDailyProductionData::Synchronize( interfaceDataset, executor, i ); 
+    }
+  *]
+}
diff --git a/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize.qbl b/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize.qbl
index 8942535..043837d 100644
--- a/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize.qbl
+++ b/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize.qbl
@@ -9,17 +9,6 @@
   [*
     // rislai Jul-23-2024 (created)
     date    := Date::ActualDate() - 1;
-    loginfo := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser := executor
-                                       , Name := Translations::InterfaceDataset_ActualDailyProductionData_Name()
-                                       , InterfaceDateTime := DateTime::ActualTime()
-                                       , Message := '鐢熶骇瀹為檯鏁版嵁'
-                                       , RequestBody := ActualDailyProductionData::GetRequestBody( date ) );
-    
-    data := InterfaceLoginfo::CallInterface( interfaceDataset,loginfo );
-    
-    options := DatasetFindOptions::Construct( 'Archive' ).IncludeOffline( true ); //to load we must search offline datasets.
-    mdskey := DatasetController::FindUnique( options );
-    
-    MDSArchive::Root( mdskey ) -> ActualDailyProductionData::ParseData( data );
+    ActualDailyProductionData::Synchronize( interfaceDataset,executor,date );
   *]
 }
diff --git a/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize0.qbl b/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize0.qbl
new file mode 100644
index 0000000..f235822
--- /dev/null
+++ b/_Main/BL/Type_ActualDailyProductionReport/StaticMethod_Synchronize0.qbl
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Synchronize (
+  InterfaceDataset interfaceDataset,
+  String executor,
+  Date date
+)
+{
+  TextBody:
+  [*
+    // rislai Jul-23-2024 (created)
+    loginfo := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser := executor
+                                       , Name := Translations::InterfaceDataset_ActualDailyProductionData_Name()
+                                       , InterfaceDateTime := DateTime::ActualTime()
+                                       , Message := '鐢熶骇瀹為檯鏁版嵁'
+                                       , RequestBody := ActualDailyProductionData::GetRequestBody( date ) );
+    
+    data := InterfaceLoginfo::CallInterface( interfaceDataset,loginfo );
+    
+    options := DatasetFindOptions::Construct( 'Archive' ).IncludeOffline( true ); //to load we must search offline datasets.
+    mdskey := DatasetController::FindUnique( options );
+    
+    MDSArchive::Root( mdskey ) -> ActualDailyProductionData::ParseData( data );
+  *]
+}
diff --git a/_Main/BL/Type_LockPeriod/Method_Disable.qbl b/_Main/BL/Type_LockPeriod/Method_Disable.qbl
new file mode 100644
index 0000000..1f03c2b
--- /dev/null
+++ b/_Main/BL/Type_LockPeriod/Method_Disable.qbl
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: #root
+Method Disable
+{
+  TextBody:
+  [*
+    // Akari Nov-1-2024 (created)
+    if( this.IsEnable()){
+      this.IsEnable( false );
+      
+      pispips := selectset( this,ProductInStockingPoint_MP.ProductInStockingPointInPeriod.astype( ProductInStockingPointInPeriodPlanningLeaf ),period,period.Period_MP().StartDate() <= this.LockDate() );
+      traverse( pispips,Elements,element ){
+        element.IsLock( false );
+      }
+      
+      ProductInStockingPointInPeriod::LockUnlockPlanning( pispips, false, true );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_LockPeriod/Method_Enable.qbl b/_Main/BL/Type_LockPeriod/Method_Enable.qbl
index d613476..ccff833 100644
--- a/_Main/BL/Type_LockPeriod/Method_Enable.qbl
+++ b/_Main/BL/Type_LockPeriod/Method_Enable.qbl
@@ -7,26 +7,57 @@
   TextBody:
   [*
     // Akari Oct-30-2024 (created)
-    offlinePlanRow := select( offlinePlanTable,NewOfflinePlanRow,row,row.ProductID() = this.ProductInStockingPoint_MP().ProductID() );
+    offlinePlanRow := select( offlinePlanTable,NewOfflinePlanRow,row,row.ProductID() = this.ProductInStockingPoint_MP().ProductID() and row.StockingPointID() = this.ProductInStockingPoint_MP().StockingPointID() );
+    
+    offlinePlanCells := selectset( offlinePlanRow, NewOfflinePlanCell,cell,true );
+    offlinePlanCellIndexTree := NamedValueTree::Create();
+    for( i := 0; i< offlinePlanCells.Size(); i++ ){
+      offlinePlanCell := offlinePlanCells.Element( i );
+      offlinePlanCellHandle := offlinePlanCellIndexTree.GetHandle( offlinePlanCell.NewOfflinePlanColumn().StartDate().AsQUILL() );
+      offlinePlanCellIndexTree.Root().AddChild( offlinePlanCellHandle,i );
+    }
+    
     
     if( not this.IsEnable() ){
+      this.IsEnable( true );
+      
       pispips := selectset( this,ProductInStockingPoint_MP.ProductInStockingPointInPeriod.astype( ProductInStockingPointInPeriodPlanningLeaf ),period,period.Period_MP().StartDate() <= this.LockDate() );
       traverse( pispips,Elements,element ){
+        element.IsLock( true );
+        offlinePlanCellHandle := offlinePlanCellIndexTree.GetHandle( element.Period_MP().StartDate().AsQUILL() );
+        offlinePlanCellIndex := guard( offlinePlanCellIndexTree.Root().Child( offlinePlanCellHandle),null( NamedValue ));
+        offlinePlanCellQuantity := 0.0;
+        if( not isnull( offlinePlanCellIndex )){
+          offlinePlanCell := offlinePlanCells.Element( offlinePlanCellIndex.GetValueAsNumber() );
+          offlinePlanCellQuantity := offlinePlanCell.Quantity();
+        }
         if( element.NewSupply( relsize ) = 1 ){
           traverse( element,NewSupply,newSupply ){
-            
+            newSupply.Update( offlinePlanCellQuantity );
           }
         }else if( element.NewSupply( relsize ) > 1 ){
-          
+          newSupplys := selectset( element,NewSupply,newSupply,true );
+          for( i := 1; i < newSupplys.Size(); i++ ){
+            newSupply := newSupplys.Element( i );
+            newSupply.Update( 0.0 );
+          }
+          newSupplys.Element( 0 ).Update( offlinePlanCellQuantity )
         }else if( element.NewSupply( relsize ) = 0 ){
-          unit := element.StockingPointInPeriod().StockingPoint_MP().Unit();
-          operaction := select( unit,Operation,op,true );
-          // PeriodTaskOperation::Create( )
+          if( offlinePlanCellQuantity <> 0 ){
+            info( "new supply is null" );
+            unit := element.StockingPointInPeriod().StockingPoint_MP().Unit();
+            operaction := select( unit,Operation,op,true );
+            if( not isnull( operaction )){
+              info( "operaction is null" );
+              // unitPeriod := element.Period_MP().UnitPeriod()
+              // PeriodTaskOperation::Create( operaction,unitPeriod,quantity,false );
+            }else{
+              
+            }
+          }
         }
-        
-        
-    
       }
+      ProductInStockingPointInPeriod::LockUnlockPlanning( pispips, true, true );
     }
   *]
 }
diff --git a/_Main/BL/Type_LockPeriod/StaticMethod_Create.qbl b/_Main/BL/Type_LockPeriod/StaticMethod_Create.qbl
index 4aa7e39..667e135 100644
--- a/_Main/BL/Type_LockPeriod/StaticMethod_Create.qbl
+++ b/_Main/BL/Type_LockPeriod/StaticMethod_Create.qbl
@@ -8,6 +8,14 @@
   TextBody:
   [*
     // rislai Jun-13-2024 (created)
-    owner.LockPeriod( relnew, LockDate := lockDate );
+    lockPeriod := owner.LockPeriod( relnew, LockDate := lockDate );
+    
+    macroPlan := owner.MacroPlan();
+    
+    offlineTable := select( macroPlan,NewOfflinePlanTable,table,true );
+    
+    if( not isnull( offlineTable )){
+      lockPeriod.Enable( offlineTable ); 
+    }
   *]
 }
diff --git a/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
index 6dd9a3b..e51e83c 100644
--- a/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
+++ b/_Main/BL/Type_NewOfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
@@ -39,9 +39,9 @@
           sdt      := select( sp, ShiftDayTime, tempSDT, tempSDT.Name() = tempSDT.ShiftPattern().Name() );
           
           // 鐢熸垚涓嬬嚎璁″垝銆愪骇绾挎槑缁嗐�戣
-          detailedNOPR   := select( nopt, NewOfflinePlanRow, tempNOPR, tempNOPR.ProductionLine() = u.ID() and tempNOPR.ProductID() = pisp.ProductID() and tempNOPR.Type() = "1" );
+          detailedNOPR   := select( nopt, NewOfflinePlanRow, tempNOPR, tempNOPR.ProductionLine() = u.ID() and tempNOPR.ProductID() = pisp.ProductID() and tempNOPR.StockingPointID() = pisp.StockingPointID() and tempNOPR.Type() = "1" );
           if ( isnull( detailedNOPR ) ) {
-            detailedNOPR := nopt.NewOfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := pisp.ProductID(), Type := "1", OperationID := o.ID() );
+            detailedNOPR := nopt.NewOfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := pisp.ProductID(),StockingPointID := pisp.StockingPointID(), Type := "1", OperationID := o.ID() );
           }
           
           // 鐢熸垚涓嬬嚎璁″垝鍒�
diff --git a/_Main/BL/Type_NewOfflinePlanRow/Attribute_StockingPointID.qbl b/_Main/BL/Type_NewOfflinePlanRow/Attribute_StockingPointID.qbl
new file mode 100644
index 0000000..aa10488
--- /dev/null
+++ b/_Main/BL/Type_NewOfflinePlanRow/Attribute_StockingPointID.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute StockingPointID
+{
+  #keys: '3[414996.1.183584732][414996.1.183584731][414996.1.183584733]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_ProductInStockingPointInPeriodPlanningLeaf/Attribute_IsLock.qbl b/_Main/BL/Type_ProductInStockingPointInPeriodPlanningLeaf/Attribute_IsLock.qbl
new file mode 100644
index 0000000..f22dee4
--- /dev/null
+++ b/_Main/BL/Type_ProductInStockingPointInPeriodPlanningLeaf/Attribute_IsLock.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsLock
+{
+  #keys: '3[414996.1.185600021][414996.1.185600020][414996.1.185600022]'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_ProductInStockingPointInPeriodPlanningLeaf/_ROOT_Type_ProductInStockingPointInPeriodPlanningLeaf.qbl b/_Main/BL/Type_ProductInStockingPointInPeriodPlanningLeaf/_ROOT_Type_ProductInStockingPointInPeriodPlanningLeaf.qbl
new file mode 100644
index 0000000..8c6a2c8
--- /dev/null
+++ b/_Main/BL/Type_ProductInStockingPointInPeriodPlanningLeaf/_ROOT_Type_ProductInStockingPointInPeriodPlanningLeaf.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+TypeSpecialization ProductInStockingPointInPeriodPlanningLeaf #extension
+{
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupArchiveReport.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupArchiveReport.def
index 10f9121..5298ee8 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupArchiveReport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupArchiveReport.def
@@ -38,6 +38,17 @@
         Taborder: 2
       ]
     }
+    Component ButtonActualDailyProduction
+    {
+      #keys: '[414996.1.186223693]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'RSS'
+        Label: '瀹為檯姣忔棩鐢熶骇璁″垝'
+        Taborder: 3
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupRestraint.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupRestraint.def
index f6b290e..ad5b573 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupRestraint.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupRestraint.def
@@ -27,6 +27,17 @@
         Taborder: 1
       ]
     }
+    Component ButtonLockPeriodData
+    {
+      #keys: '[414996.1.185742569]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'GEAR_VIEW'
+        Label: 'Lock period data'
+        Taborder: 2
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupArchiveReport_ButtonActualDailyProductio.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupArchiveReport_ButtonActualDailyProductio.def
new file mode 100644
index 0000000..c2d70f3
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupArchiveReport_ButtonActualDailyProductio.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: ActionBarGroupArchiveReport/ButtonActualDailyProduction
+Response OnClick () id:Response_MacroPlanner_ActionBarGroupArchiveReport_ButtonActualDailyProduction_OnClick
+{
+  #keys: '[414996.1.186223803]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      // Open view
+      ApplicationMacroPlanner.OpenView( 'ActualDailyProduction', this );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupRestraint_ButtonLockPeriodData_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupRestraint_ButtonLockPeriodData_OnClick.def
new file mode 100644
index 0000000..9f569c5
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupRestraint_ButtonLockPeriodData_OnClick.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: ActionBarGroupRestraint/ButtonLockPeriodData
+Response OnClick () id:Response_MacroPlanner_ActionBarGroupRestraint_ButtonLockPeriodData_OnClick
+{
+  #keys: '[414996.1.185904137]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      // Open view
+      ApplicationMacroPlanner.OpenView( 'LockPeriodData', this );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_ListActualDailyProduction.def b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_ListActualDailyProduction.def
new file mode 100644
index 0000000..9771638
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_ListActualDailyProduction.def
@@ -0,0 +1,41 @@
+Quintiq file version 2.0
+Component ListActualDailyProduction
+{
+  #keys: '[414996.1.184390814]'
+  BaseType: 'WebList'
+  Children:
+  [
+    Component DataExtractorActualDailyProduction
+    {
+      #keys: '[414996.1.184390815]'
+      BaseType: 'WebDataExtractor'
+      Properties:
+      [
+        DataType: 'external[Archive]'
+        Source: 'Archive'
+        Taborder: 0
+        Transformation: 'ActualDailyProductionData'
+      ]
+    }
+    #child: listActionBarPageActualDailyProduction
+    Component DataSetLevelActualDailyProduction
+    {
+      #keys: '[414996.1.184390820]'
+      BaseType: 'WebDataSetLevel'
+      Children:
+      [
+        #child: listContextMenuActualDailyProduction
+      ]
+      Properties:
+      [
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ActualOut","title":"瀹為檯浜у嚭鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ActualOut"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Fac","title":"宸ュ巶绠�鍐�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Fac"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LineName","title":"浜х嚎鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LineName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductionDate","title":"鐢熶骇鏃ユ湡","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductionDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductNo","title":"浜у搧ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductNo"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftCode","title":"鐝鍙�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftName","title":"浜х嚎鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftName"}}]'
+        ContextMenu: 'listContextMenuActualDailyProduction'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_PanelActualDailyProduction.def b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_PanelActualDailyProduction.def
new file mode 100644
index 0000000..a9c5a73
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_PanelActualDailyProduction.def
@@ -0,0 +1,46 @@
+Quintiq file version 2.0
+Component PanelActualDailyProduction
+{
+  #keys: '[414996.1.184390778]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component dsStartDate
+    {
+      #keys: '[414996.1.184361099]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        Label: 'Start date'
+        Taborder: 0
+      ]
+    }
+    Component dsEndDate
+    {
+      #keys: '[414996.1.185982342]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        Label: 'End date'
+        Taborder: 1
+      ]
+    }
+    Component bReSync
+    {
+      #keys: '[414996.1.185982355]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Image: 'ARROW_CIRCLE2'
+        Label: 'Re Sync'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    FixedSize: true
+    Orientation: 'horizontal'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_PanelActualDailyProduction912.def b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_PanelActualDailyProduction912.def
new file mode 100644
index 0000000..00285b4
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_PanelActualDailyProduction912.def
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+Component PanelActualDailyProduction912
+{
+  #keys: '[414996.1.184390800]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: ListActualDailyProduction
+  ]
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_listActionBarPageActualDailyProduction.def b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_listActionBarPageActualDailyProduction.def
new file mode 100644
index 0000000..ff79c37
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_listActionBarPageActualDailyProduction.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component listActionBarPageActualDailyProduction
+{
+  #keys: '[414996.1.184390817]'
+  BaseType: 'listActionBarPage'
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_listContextMenuActualDailyProduction.def b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_listContextMenuActualDailyProduction.def
new file mode 100644
index 0000000..d9f75a7
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Component_listContextMenuActualDailyProduction.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component listContextMenuActualDailyProduction
+{
+  #keys: '[414996.1.184390822]'
+  BaseType: 'listContextMenu'
+  Properties:
+  [
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Response_PanelActualDailyProduction_bReSync_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Response_PanelActualDailyProduction_bReSync_OnClick.def
new file mode 100644
index 0000000..bf422af
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Response_PanelActualDailyProduction_bReSync_OnClick.def
@@ -0,0 +1,29 @@
+Quintiq file version 2.0
+#parent: PanelActualDailyProduction/bReSync
+Response OnClick () id:Response_PanelActualDailyProduction_bReSync_OnClick
+{
+  #keys: '[414996.1.185702537]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  Precondition:
+  [*
+    return dsEndDate.Date() > dsStartDate.Date();
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      days := dsEndDate.Date() - dsStartDate.Date();
+      if( days >= 365 ){
+        if( WebMessageBox::Question( "褰撳墠鏃堕棿璺ㄥ害銆�"+ [String]days +"澶┿�戣繃澶э紝鏄惁缁х画锛�",Translations::MessageBox_YesNo() ) = 0 ){
+          ActualDailyProductionData::Synchronize( InterfaceDataset,"User",dsStartDate.Date(),dsEndDate.Date() ); 
+        }else{
+          WebMessageBox::Information( "Canceled." ); 
+        }
+      }else{
+        ActualDailyProductionData::Synchronize( InterfaceDataset,"User",dsStartDate.Date(),dsEndDate.Date() );
+      }
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Response_PanelActualDailyProduction_dsEndDate_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Response_PanelActualDailyProduction_dsEndDate_OnCreated.def
new file mode 100644
index 0000000..a1db4af
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/Response_PanelActualDailyProduction_dsEndDate_OnCreated.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: PanelActualDailyProduction/dsEndDate
+Response OnCreated () id:Response_PanelActualDailyProduction_dsEndDate_OnCreated
+{
+  #keys: '[414996.1.185563333]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      this.Date( Date::ActualDate() - 1 );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/_ROOT_Component_FormActualDailyProduction.def b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/_ROOT_Component_FormActualDailyProduction.def
new file mode 100644
index 0000000..cced845
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormActualDailyProduction/_ROOT_Component_FormActualDailyProduction.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent FormActualDailyProduction
+{
+  #keys: '[414996.1.184390758]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: PanelActualDailyProduction
+    #child: PanelActualDailyProduction912
+  ]
+  Properties:
+  [
+    Image: 'RSS'
+    Title: 'Actual Daily Production'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormArchivePackagingPlan/_ROOT_Component_FormArchivePackagingPlan.def b/_Main/UI/MacroPlannerWebApp/Component_FormArchivePackagingPlan/_ROOT_Component_FormArchivePackagingPlan.def
index 6dcd1e7..9e6ec7a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormArchivePackagingPlan/_ROOT_Component_FormArchivePackagingPlan.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormArchivePackagingPlan/_ROOT_Component_FormArchivePackagingPlan.def
@@ -10,4 +10,8 @@
     #child: PanelArchivePackagingPlan
     #child: PanelArchivePackagingPlan922
   ]
+  Properties:
+  [
+    Title: 'Archive Packaging Plan'
+  ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_MatrixEditorArchiveTransferPlan.def b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_MatrixEditorArchiveTransferPlan.def
new file mode 100644
index 0000000..cab7630
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_MatrixEditorArchiveTransferPlan.def
@@ -0,0 +1,97 @@
+Quintiq file version 2.0
+Component MatrixEditorArchiveTransferPlan
+{
+  #keys: '[414996.1.183850516]'
+  BaseType: 'WebMatrixEditor'
+  Children:
+  [
+    Component MatrixEditorCellArchiveTransferPlan
+    {
+      #keys: '[414996.1.183850517]'
+      BaseType: 'WebMatrixEditorCell'
+      Children:
+      [
+        Component DataExtractorArchiveTransferPlan
+        {
+          #keys: '[414996.1.183850518]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'Archive'
+            Source: 'Archive'
+            Taborder: 0
+            Transformation: 'ArchiveTransferPlanRow.ArchiveTransferPlanCell'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Attributes: 'Value'
+        Column: 'ArchiveTransferPlanColumn'
+        Row: 'ArchiveTransferPlanRow'
+        Taborder: 0
+      ]
+    }
+    Component MatrixEditorRowsArchiveTransferPlan
+    {
+      #keys: '[414996.1.183850521]'
+      BaseType: 'WebMatrixEditorHeaderLevel'
+      Children:
+      [
+        Component DataExtractor568
+        {
+          #keys: '[414996.1.183850522]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'Archive'
+            Source: 'Archive'
+            Taborder: 0
+            Transformation: 'ArchiveTransferPlanRow'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Legend: 'Name'
+        SortCriteria: 'SourceStockpoingPointID;TargetStockpoingPointID;ProductID'
+        Taborder: 1
+      ]
+    }
+    Component MatrixEditorColumnsArchiveTransferPlan
+    {
+      #keys: '[414996.1.183850525]'
+      BaseType: 'WebMatrixEditorHeaderLevel'
+      Children:
+      [
+        Component DataExtractor802
+        {
+          #keys: '[414996.1.183850526]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'Archive'
+            Source: 'Archive'
+            Taborder: 0
+            Transformation: 'ArchiveTransferPlanColumn'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Legend: 'ColumnName'
+        SortCriteria: 'ColumnDate'
+        Taborder: 2
+      ]
+    }
+    #child: matrixEditorActionBarPageArchiveTransferPlan
+    #child: matrixeditorContextMenuArchiveTransferPlan
+  ]
+  Properties:
+  [
+    Columns: 'MatrixEditorColumnsArchiveTransferPlan'
+    ContextMenu: 'matrixeditorContextMenuArchiveTransferPlan'
+    Rows: 'MatrixEditorRowsArchiveTransferPlan'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_PanelArchiveTransferPlan.def b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_PanelArchiveTransferPlan.def
new file mode 100644
index 0000000..5faab36
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_PanelArchiveTransferPlan.def
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+Component PanelArchiveTransferPlan
+{
+  #keys: '[414996.1.183850471]'
+  BaseType: 'WebPanel'
+  Properties:
+  [
+    FixedSize: true
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_PanelArchiveTransferPlan515.def b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_PanelArchiveTransferPlan515.def
new file mode 100644
index 0000000..7347773
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_PanelArchiveTransferPlan515.def
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+Component PanelArchiveTransferPlan515
+{
+  #keys: '[414996.1.183850483]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    #child: MatrixEditorArchiveTransferPlan
+  ]
+  Properties:
+  [
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_matrixEditorActionBarPageArchiveTransferPlan.def b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_matrixEditorActionBarPageArchiveTransferPlan.def
new file mode 100644
index 0000000..45d88f8
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_matrixEditorActionBarPageArchiveTransferPlan.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component matrixEditorActionBarPageArchiveTransferPlan
+{
+  #keys: '[414996.1.183850529]'
+  BaseType: 'matrixEditorActionBarPage'
+  Properties:
+  [
+    Taborder: 3
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_matrixeditorContextMenuArchiveTransferPlan.def b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_matrixeditorContextMenuArchiveTransferPlan.def
new file mode 100644
index 0000000..49019ea
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/Component_matrixeditorContextMenuArchiveTransferPlan.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+Component matrixeditorContextMenuArchiveTransferPlan
+{
+  #keys: '[414996.1.183850532]'
+  BaseType: 'matrixeditorContextMenu'
+  Properties:
+  [
+    Taborder: 4
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/_ROOT_Component_FormArchiveTransferPlan.def b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/_ROOT_Component_FormArchiveTransferPlan.def
new file mode 100644
index 0000000..4e5be49
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormArchiveTransferPlan/_ROOT_Component_FormArchiveTransferPlan.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent FormArchiveTransferPlan
+{
+  #keys: '[414996.1.183850405]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: PanelArchiveTransferPlan
+    #child: PanelArchiveTransferPlan515
+  ]
+  Properties:
+  [
+    Title: 'Archive Transfer Plan'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_ListLockPeriod.def b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_ListLockPeriod.def
index 4308ad7..2ea65a5 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_ListLockPeriod.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_ListLockPeriod.def
@@ -28,7 +28,7 @@
       ]
       Properties:
       [
-        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductInStockingPoint_MP.ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductInStockingPoint_MP.ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductInStockingPoint_MP.StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductInStockingPoint_MP.StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LockDate","title":"LockDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LockDate"}}]'
+        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductInStockingPoint_MP.ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductInStockingPoint_MP.ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductInStockingPoint_MP.StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductInStockingPoint_MP.StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LockDate","title":"LockDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LockDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsEnable","title":"IsEnable","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsEnable"}}]'
         ContextMenu: 'listContextMenuLockPeriod'
         Taborder: 2
       ]
@@ -38,4 +38,22 @@
   [
     Taborder: 0
   ]
+  ResponseDefinitions:
+  [
+    DelegatedResponseDefinition OnClick id:Responsedef_ListLockPeriod_WebMenu_OnClick
+    {
+      #keys: '[414996.1.185430534]'
+      Initiator: 'WebMenu'
+      IsInherited: false
+      ResponseType: 'OnClick'
+      Arguments:
+      [
+        ResponseDefinitionArgument selection
+        {
+          #keys: '[345.0.11072389]'
+          Binding: 'this.Selection()'
+        }
+      ]
+    }
+  ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_listContextMenuLockPeriod.def b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_listContextMenuLockPeriod.def
index f2db74c..8e57ed9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_listContextMenuLockPeriod.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Component_listContextMenuLockPeriod.def
@@ -3,6 +3,31 @@
 {
   #keys: '[414996.1.179381094]'
   BaseType: 'listContextMenu'
+  Children:
+  [
+    Component mDisable
+    {
+      #keys: '[414996.1.185701729]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'EMPTYCHECKBOX'
+        Taborder: 3
+        Title: 'Disable'
+      ]
+    }
+    Component mEnable
+    {
+      #keys: '[414996.1.184360918]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'CHECKEDCHECKBOX'
+        Taborder: 4
+        Title: 'Enable'
+      ]
+    }
+  ]
   Properties:
   [
     Taborder: 0
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mDisable_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mDisable_OnClick.def
new file mode 100644
index 0000000..1d08608
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mDisable_OnClick.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: ListLockPeriod
+Response OnClick (
+  structured[LockPeriod] selection
+) id:Response_ListLockPeriod_mDisable_OnClick
+{
+  #keys: '[414996.1.185430554]'
+  CanBindMultiple: false
+  DefinitionID => /ListLockPeriod/Responsedef_ListLockPeriod_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'mDisable'
+  QuillAction
+  {
+    Body:
+    [*
+      traverse( selection,Elements,element ,element.IsEnable() ){
+        element.Disable(); 
+      }
+    *]
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mEnable_OnClick\04321.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mEnable_OnClick\04321.def"
new file mode 100644
index 0000000..c1e9778
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/Response_ListLockPeriod_mEnable_OnClick\04321.def"
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: ListLockPeriod
+Response OnClick (
+  structured[LockPeriod] selection
+) id:Response_ListLockPeriod_mEnable_OnClick
+{
+  #keys: '[414996.1.185400954]'
+  CanBindMultiple: false
+  DefinitionID => /ListLockPeriod/Responsedef_ListLockPeriod_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'mEnable'
+  QuillAction
+  {
+    Body:
+    [*
+      offlinePlanTable := select( MacroPlan,NewOfflinePlanTable,table,true );
+      traverse( selection,Elements,element ,not element.IsEnable() ){
+        element.Enable( offlinePlanTable ); 
+      }
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/_ROOT_Component_FormLockPeriod.def b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/_ROOT_Component_FormLockPeriod.def
index 7150c91..12ce217 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/_ROOT_Component_FormLockPeriod.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormLockPeriod/_ROOT_Component_FormLockPeriod.def
@@ -10,4 +10,9 @@
     #child: PanelLockPeriod
     #child: PanelLockPeriod633
   ]
+  Properties:
+  [
+    Image: 'GEAR_VIEW'
+    Title: 'Lock period data'
+  ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Views/LockPeriodData.vw b/_Main/UI/MacroPlannerWebApp/Views/LockPeriodData.vw
new file mode 100644
index 0000000..8b88f12
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Views/LockPeriodData.vw
@@ -0,0 +1,199 @@
+Quintiq file version 2.0
+{
+  viewcontents
+  {
+    forms
+    {
+      form_FormLockPeriod
+      {
+        title: 'QMacroPlanner::FormLockPeriod'
+        shown: true
+        componentID: 'QMacroPlanner::FormLockPeriod'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 22
+          columnPosition: 1
+          columnSpan: 8
+        }
+        components
+        {
+          FormLockPeriod_PanelLockPeriod
+          {
+            sizeRatio: 1
+          }
+          FormLockPeriod_PanelLockPeriod633
+          {
+            sizeRatio: 1
+          }
+          FormLockPeriod_ListLockPeriod
+          {
+          }
+          FormLockPeriod_DataSetLevelLockPeriod
+          {
+            groupDepth: -1
+            column_ProductInStockingPoint_MP_ProductID
+            {
+              columnId: 'ProductInStockingPoint_MP.ProductID'
+              dataPath: 'ProductInStockingPoint_MP.ProductID'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_ProductInStockingPoint_MP_StockingPointID
+            {
+              columnId: 'ProductInStockingPoint_MP.StockingPointID'
+              dataPath: 'ProductInStockingPoint_MP.StockingPointID'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_LockDate
+            {
+              columnId: 'LockDate'
+              dataPath: 'LockDate'
+              dataType: 'date'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+            column_IsEnable
+            {
+              columnId: 'IsEnable'
+              dataPath: 'IsEnable'
+              dataType: 'boolean'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 0
+        }
+        components
+        {
+          FormOptimizerPuzzles_ListOptimizerPuzzles
+          {
+          }
+          FormOptimizerPuzzles_DataSetLevelOptimizerPuzzles
+          {
+            groupDepth: -1
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              title: 'All constraints'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              title: 'Name'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: 'Description'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI
+      {
+        title: 'KPI Dashboard'
+        shown: true
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 1
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPISelection'
+          }
+          FormKPI_PanelKPIDashboard
+          {
+            sizeRatio: 1
+          }
+          FormKPI_PanelKPISelection
+          {
+            sizeRatio: 1
+          }
+          FormKPI_ListKPISelection
+          {
+            QuillViewData
+            {
+              Food_KPISetting: 'Cost of sales;Fulfillment;Fulfillment target;Inventory holding cost;Labor cost;Margin;Safety stock;Sales;Sourcing cost;Total CO2 emission;Transportation cost;Volume'
+            }
+          }
+          FormKPI_DataSetLevelKPISelection
+          {
+            groupDepth: -1
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              title: 'All constraints'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              title: 'Name'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+    }
+    userconfigurableinformation
+    {
+    }
+    image: 'GEAR_VIEW'
+    page: ''
+    group: ''
+    index: 0
+    description: ''
+  }
+  formatversion: 2
+  id: 'LockPeriodData'
+  name: 'LockPeriodData'
+  isglobal: false
+  isroot: true
+}

--
Gitblit v1.9.3