From d154fe69a2da73fc86f668230be84961457d12a0 Mon Sep 17 00:00:00 2001
From: hongji.li <hongji.a.li@capgemini.com>
Date: 星期四, 28 九月 2023 08:58:35 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lhj

---
 _Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl                                                                     |   12 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/_ROOT_Component_DialogEditCustomerOrderPriority.def                 |   32 
 _Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Method_CalculatePriorityResult.def                                       |    5 
 _Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuGlobalOTDTableTest_OnClick.def           |   12 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Response_TIANMA_JITUAN_ListSalesDemands_MenuEditCustomerOrderPriority_OnClic.def |   21 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Component_pnlActions.def                                            |   50 
 _Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def                                                       |    5 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Method_EditCustomerOrderPriority.def                                |   17 
 _Main/BL/Type_GlobalDTOTable/Method_Test.qbl                                                                                              |    9 
 _Main/UI/MacroPlannerWebApp/Views/PriorityTest.vw                                                                                         | 2745 +++++++++++++++++++++++++++++++++++++++++++++++
 _Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl                                                             |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def                                           |   15 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnCancel_OnClick.def                           |   15 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnCreated.def     |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def                                                  |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PriorityPolicyBusinessType_OnSelectionChanged.def                       |    4 
 _Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Response_pnlActions_btnOk_OnClick.def                                    |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnDataChanged.def                  |   10 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def                            |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyFactor_OnDataChanged.def                        |   18 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Component_pnlContent.def                                            |   91 +
 _Main/BL/Type_PriorityResult/StaticMethod_CalculateScore.qbl                                                                              |    9 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnCreated.def                      |    8 
 _Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl                                         |   14 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/_ROOT_Component_FormPriorityPolicy.def                                           |   50 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyBusinessType_OnDataChanged.def                  |   18 
 _Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl                                                                             |  174 +-
 _Main/BL/Type_PriorityResult/StaticMethod_GetRemindFormula.qbl                                                                            |    3 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Method_ClickBynOk.def                                               |   17 
 _Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMCount.qbl                                                                             |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyBusinessType_OnCreated.def                      |   18 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyFactor_OnCreated.def                            |   18 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnOk_OnClick.def                               |   15 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnApply_OnClick.def                            |   19 
 34 files changed, 3,351 insertions(+), 111 deletions(-)

diff --git a/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl b/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl
index 6aedc24..5a4ba17 100644
--- a/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl
+++ b/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl
@@ -30,12 +30,16 @@
     traverse( this, Global_MappingProduct_MP, product,
               product.ProductMajorType() = "鎴愬搧" )
     {
+      uniquebomids := construct( Strings );
+      product.IsLinkedWithFinishedGood( false );
       product.SetIsLinkedWithFinishedGoodAttributes_Recursive( 0, // depth
                                                                100, // maxdepth
                                                                productspool,
                                                                operationspool,
-                                                               operationbomspool );
-      
+                                                               operationbomspool,
+                                                               uniquebomids );
+      uniquebomids := uniquebomids.Unique();
+      product.BOMCount( uniquebomids.Size() );
     }
   *]
 }
diff --git a/_Main/BL/Type_GlobalDTOTable/Method_Test.qbl b/_Main/BL/Type_GlobalDTOTable/Method_Test.qbl
new file mode 100644
index 0000000..26e43f9
--- /dev/null
+++ b/_Main/BL/Type_GlobalDTOTable/Method_Test.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#parent: #root
+Method Test
+{
+  TextBody:
+  [*
+    // KKO2 Sep-27-2023 (created)
+  *]
+}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMCount.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMCount.qbl
new file mode 100644
index 0000000..1916cbd
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMCount.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute BOMCount
+{
+  #keys: '3[157968.0.1161166085][157968.0.1161166084][157968.0.1161166086]'
+  Description: 'Number of unique BOM used to produce this finished good.'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl
index 4c9b813..f0425fa 100644
--- a/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl
@@ -5,7 +5,8 @@
   Number maxdepth,
   Global_MappingProduct_MPs productspool,
   Global_MappingOperations operationspool,
-  Global_MappingOperationBOMs operationbomspool
+  Global_MappingOperationBOMs operationbomspool,
+  output Strings uniquebomids_o
 )
 {
   Description: 'Method to traverse the supply chain recursively to determine if there are any products that are not used to produce finished goods.'
@@ -13,6 +14,11 @@
   [*
     if( not this.IsLinkedWithFinishedGood() )
     {
+      if( this.ProductMajorType() <> "鎴愬搧" )
+      {
+        uniquebomids_o.Add( this.ID() );
+      }
+      
       depth := depth + 1;
       this.IsLinkedWithFinishedGood( true );
       
@@ -50,7 +56,8 @@
                                                                                 maxdepth,
                                                                                 productspool,
                                                                                 operationspool,
-                                                                                operationbomspool );
+                                                                                operationbomspool,
+                                                                                uniquebomids_o );
             }
             
             if( operationbom.AlternativeMaterialCode() <> ""
@@ -66,7 +73,8 @@
                                                                                     maxdepth,
                                                                                     productspool,
                                                                                     operationspool,
-                                                                                    operationbomspool );
+                                                                                    operationbomspool,
+                                                                                    uniquebomids_o );
               }
             }
           }
diff --git a/_Main/BL/Type_PriorityResult/StaticMethod_CalculateScore.qbl b/_Main/BL/Type_PriorityResult/StaticMethod_CalculateScore.qbl
index 0cc1c80..93e2b2f 100644
--- a/_Main/BL/Type_PriorityResult/StaticMethod_CalculateScore.qbl
+++ b/_Main/BL/Type_PriorityResult/StaticMethod_CalculateScore.qbl
@@ -23,7 +23,7 @@
             // 浠庤捣濮嬩綅缃紑濮嬪尮閰� 
             if(remindFormula.StartsWith( "+" ))
             {
-                remindFormula := remindFormula.SubString( 1,remindFormula.Length());
+                remindFormula := remindFormula.SubString( 1,remindFormula.Length()-1);
                 score := PriorityResult::GetDetailsValue( customerOrder,remindFormula,macroPlan,globalOTDTable); 
                 score := lastScore + score;
                 
@@ -33,7 +33,7 @@
             }
             else if( remindFormula.StartsWith( "-" ))
             {
-                remindFormula := remindFormula.SubString( 1,remindFormula.Length());
+                remindFormula := remindFormula.SubString( 1,remindFormula.Length()-1);
                 score := PriorityResult::GetDetailsValue( customerOrder,remindFormula,macroPlan,globalOTDTable);
                 score := lastScore - score;
                 
@@ -43,7 +43,7 @@
             }
             else if( remindFormula.StartsWith( "*" ) )
             {
-                remindFormula := remindFormula.SubString( 1,remindFormula.Length());
+                remindFormula := remindFormula.SubString( 1,remindFormula.Length()-1);
                 score := PriorityResult::GetDetailsValue( customerOrder,remindFormula,macroPlan,globalOTDTable);
                 score := lastScore * score;
                 
@@ -53,7 +53,7 @@
             }
             else if( remindFormula.StartsWith( "/" ) )
             {
-                remindFormula := remindFormula.SubString( 1,remindFormula.Length());
+                remindFormula := remindFormula.SubString( 1,remindFormula.Length()-1);
                 score := PriorityResult::GetDetailsValue( customerOrder,remindFormula,macroPlan,globalOTDTable);
                 score := lastScore / score;
                 
@@ -76,7 +76,6 @@
             {
                 // 涓嶆槸绗﹀彿 鐩存帴鑾峰彇璁$畻鍚庣殑鏁板��
                 score := PriorityResult::GetDetailsValue( customerOrder,remindFormula,macroPlan,globalOTDTable);
-                info( "123123");
                 // 鎴彇鎺夊凡缁忚绠楃殑浼樺厛绾у洜瀛� 閫掑綊璁$畻
                 remindFormula := PriorityResult::GetRemindFormula( remindFormula,macroPlan);
                 PriorityResult::CalculateScore( remindFormula,customerOrder,businessType,macroPlan,score,globalOTDTable);
diff --git a/_Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl b/_Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl
index 035c057..78c3611 100644
--- a/_Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl
+++ b/_Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl
@@ -15,7 +15,6 @@
     value := 0.0;
     
     priorityFactor := null( PriorityFactor);
-    
     traverse( macroPlan,PriorityFactor,p)
     {   
          if( formula.StartsWith( p.Name()) )
@@ -24,91 +23,102 @@
          }
     }
     
-    if( "瀹㈡埛绛栫暐" =  priorityFactor.Name())
+    if(isnull( priorityFactor) )
     {
-         obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "瀹㈡埛绛栫暐" and p.GradingName() = customerOrder.CustomerPolicy());
-         value := priorityFactor.Coefficient() * obj.GradeTarget();
+        value := 1.0;
     }
-    
-    if( "澶у紶鐩堝埄姘村钩" =  priorityFactor.Name())
+    else
     {
-         obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "澶у紶鐩堝埄姘村钩" and  p.GradingName() = customerOrder.SheetProfitability());
-         gradeTarget := 1.0;
-         if( not isnull( obj ) )
-         {
-              gradeTarget := obj.GradeTarget();
-         }
-         value := priorityFactor.Coefficient() * gradeTarget;
+            if( "瀹㈡埛绛栫暐" =  priorityFactor.Name())
+            {
+                 obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "瀹㈡埛绛栫暐" and p.GradingName() = customerOrder.CustomerPolicy());
+                 gradeTarget := 1.0;
+                 if( not isnull( obj ) )
+                 {
+                      gradeTarget := obj.GradeTarget();
+                 }
+                 value := priorityFactor.Coefficient() * gradeTarget;
+            }
+            
+            if( "澶у紶鐩堝埄姘村钩" =  priorityFactor.Name())
+            {
+                 obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "澶у紶鐩堝埄姘村钩" and  p.GradingName() = customerOrder.SheetProfitability());
+                 gradeTarget := 1.0;
+                 if( not isnull( obj ) )
+                 {
+                      gradeTarget := obj.GradeTarget();
+                 }
+                 value := priorityFactor.Coefficient() * gradeTarget;
+            }
+            
+            if( "DOI" =  priorityFactor.Name())
+            {
+                 // DOI鏁版嵁
+                 obj := selectobject( globalOTDTable,Global_MappingDOI_DSI,doi,doi.ProductID() = customerOrder.ProductID())
+                 doi := 1.0;
+                 if( not isnull( obj ) )
+                 {
+                      doi := [Real]obj.DOI();
+                 }
+                 value := priorityFactor.Coefficient() * doi;
+            }
+            
+            if( "DSI" =  priorityFactor.Name())
+            {
+                 // DOI鏁版嵁
+                 obj := selectobject( globalOTDTable,Global_MappingDOI_DSI,doi,doi.ProductID() = customerOrder.ProductID())
+                 dsi := 1.0;
+                 if( not isnull( obj ) )
+                 {
+                      dsi := [Real]obj.DSI();
+                 }
+                 value := priorityFactor.Coefficient() * dsi;
+            }
+            
+            if( "缁嗗垎甯傚満绛夌骇" =  priorityFactor.Name())
+            {
+                 obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "缁嗗垎甯傚満绛夌骇" and p.GradingName() = customerOrder.SegmentPriority());
+                 gradeTarget := 1.0;
+                 if( not isnull( obj ) )
+                 {
+                      gradeTarget := obj.GradeTarget();
+                 }
+                 value := priorityFactor.Coefficient() * gradeTarget;
+            }
+            
+            if( "闇�姹傜被鍨�" =  priorityFactor.Name())
+            {     
+                // 鏈夐娴� 鏃犻娴� 绾娴�
+                 obj := selectobject( priorityFactor,PriorityFactorDetails,p,p.GradingName() = customerOrder.OrderType());
+                 gradeTarget := 1.0;
+                 if( not isnull( obj ) )
+                 {
+                      gradeTarget := obj.GradeTarget();
+                 }
+                 value := priorityFactor.Coefficient() * gradeTarget;
+            }
+            
+            if( "瀹㈡埛绛夌骇" =  priorityFactor.Name())
+            {
+                 // 閫氳繃鏁版嵁婀栬绠楀鎴风瓑绾�
+                 obj := selectobject( globalOTDTable,Global_MappingCustomerGrade,doi,doi.BusinessType() = customerOrder.BusinessType() and doi.Customer() = customerOrder.CustomerName())
+                 customerGrade := 1.0;
+                 if( not isnull( obj ) )
+                 {
+                      customerGrade := [Real]obj.CustomerGrade();
+                 }
+                 value := priorityFactor.Coefficient() * customerGrade;
+            }
+            
+            if( "璁㈠崟涓嬪崟鏃堕棿" =  priorityFactor.Name())
+            {
+                 // 涓嬪崟鏃堕棿
+                 orderTime := customerOrder.OrderTime();
+                 days := orderTime.TotalInDays() - customerOrder.EndDate().TotalInDays();
+                 obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "璁㈠崟涓嬪崟鏃堕棿" and days >= [Number]p.GradingName());
+                 value := priorityFactor.Coefficient() * obj.GradeTarget();
+            }
     }
-    
-    if( "DOI" =  priorityFactor.Name())
-    {
-         // DOI鏁版嵁
-         obj := selectobject( globalOTDTable,Global_MappingDOI_DSI,doi,doi.ProductID() = customerOrder.ProductID())
-         doi := 1.0;
-         if( not isnull( obj ) )
-         {
-              doi := [Real]obj.DOI();
-         }
-         value := priorityFactor.Coefficient() * doi;
-    }
-    
-    if( "DSI" =  priorityFactor.Name())
-    {
-         // DOI鏁版嵁
-         obj := selectobject( globalOTDTable,Global_MappingDOI_DSI,doi,doi.ProductID() = customerOrder.ProductID())
-         dsi := 1.0;
-         if( not isnull( obj ) )
-         {
-              dsi := [Real]obj.DSI();
-         }
-         value := priorityFactor.Coefficient() * dsi;
-    }
-    
-    if( "缁嗗垎甯傚満绛夌骇" =  priorityFactor.Name())
-    {
-         obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "缁嗗垎甯傚満绛夌骇" and p.GradingName() = customerOrder.SegmentPriority());
-         gradeTarget := 1.0;
-         if( not isnull( obj ) )
-         {
-              gradeTarget := obj.GradeTarget();
-         }
-         value := priorityFactor.Coefficient() * gradeTarget;
-    }
-    
-    if( "闇�姹傜被鍨�" =  priorityFactor.Name())
-    {     
-        // 鏈夐娴� 鏃犻娴� 绾娴�
-         obj := selectobject( priorityFactor,PriorityFactorDetails,p,p.GradingName() = customerOrder.OrderType());
-         gradeTarget := 1.0;
-         if( not isnull( obj ) )
-         {
-              gradeTarget := obj.GradeTarget();
-         }
-         value := priorityFactor.Coefficient() * gradeTarget;
-    }
-    
-    if( "瀹㈡埛绛夌骇" =  priorityFactor.Name())
-    {
-         // 閫氳繃鏁版嵁婀栬绠楀鎴风瓑绾�
-         obj := selectobject( globalOTDTable,Global_MappingCustomerGrade,doi,doi.BusinessType() = customerOrder.BusinessType() and doi.Customer() = customerOrder.CustomerName())
-         customerGrade := 1.0;
-         if( not isnull( obj ) )
-         {
-              customerGrade := [Real]obj.CustomerGrade();
-         }
-         value := priorityFactor.Coefficient() * customerGrade;
-    }
-    
-    if( "璁㈠崟涓嬪崟鏃堕棿" =  priorityFactor.Name())
-    {
-         // 涓嬪崟鏃堕棿
-         orderTime := customerOrder.OrderTime();
-         days := orderTime.TotalInDays() - customerOrder.EndDate().TotalInDays();
-         obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "璁㈠崟涓嬪崟鏃堕棿" and days >= [Number]p.GradingName());
-         value := priorityFactor.Coefficient() * obj.GradeTarget();
-    }
-    
     return value;
   *]
 }
diff --git a/_Main/BL/Type_PriorityResult/StaticMethod_GetRemindFormula.qbl b/_Main/BL/Type_PriorityResult/StaticMethod_GetRemindFormula.qbl
index c931871..fd4f1f0 100644
--- a/_Main/BL/Type_PriorityResult/StaticMethod_GetRemindFormula.qbl
+++ b/_Main/BL/Type_PriorityResult/StaticMethod_GetRemindFormula.qbl
@@ -22,11 +22,12 @@
               }
               else
               {              
-                str := formula.SubString( 0 + p.Name().Length(),formula.Length());
+                str := formula.SubString( p.Name().Length(),formula.Length() - p.Name().Length());
               }
          }
     }
     
+    info( "remindStr = " + str );
     return str;
   *]
 }
diff --git a/_Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl b/_Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl
index 7688006..715b2f8 100644
--- a/_Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl
+++ b/_Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl
@@ -15,8 +15,8 @@
     traverse( macroPlan,SalesDemand.astype( CustomerOrder ),e)
     {
          // 浜嬩笟閮ㄤ俊鎭�
-         //businessType := e.BusinessType();
-         businessType :=  "鎵嬫満浜嬩笟閮�";
+         businessType := e.BusinessType();
+         //businessType :=  "鎵嬫満浜嬩笟閮�";
          
          // 鑾峰彇瀵瑰簲浜嬩笟閮ㄨ绠楀叕寮�
          priorityPolicys := selectobject( macroPlan,PriorityPolicy,p,p.BusinessType() = businessType and p.Name() = priorityPolicyName);
@@ -68,7 +68,13 @@
         {
               obj.PriorityName([String]priorityValue);
               
-              // 鍒涘缓浼樺厛绾ф暟鎹�
+              // 鍒涘缓浼樺厛绾ф暟鎹� 闇�瑕佸厛娓呴櫎涓婁竴娆$殑璁$畻缁撴灉
+              // 鍒ゆ柇褰撳墠customerOrder鏄惁瀛樺湪
+              oldPriority := selectobject( macroPlan,Priority,p,p.Name() = obj.OrderID());
+              if(not isnull( oldPriority ) )
+              {
+                    macroPlan.Priority(reldelete, oldPriority);
+              }
               macroPlan.Priority(relnew,Weight := priorityValue,Name := obj.OrderID());
               priorityValue := priorityValue + 1;
         }
diff --git a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
index 7aa83c9..4ad9e84 100644
--- a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
+++ b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
@@ -13,6 +13,10 @@
           [
             Component MenuSpecial #extension
             {
+              Children:
+              [
+                Component MenuGlobalOTDTableTest { #keys: '[157968.0.1170224128]' BaseType: 'Menu' Properties: [ Image: 'DUDE2' Text: 'GlobalOTDTable Test' ] }
+              ]
               Properties:
               [
                 ModeledStringList ChildOrdering
@@ -30,6 +34,7 @@
                   c: MenuTest
                   c: MenuScenarioManagerTest
                   c: MenuMPDomainHandlerTest
+                  c: MenuGlobalOTDTableTest
                   c: MenuRemoveHistory
                   c: Menu46
                   c: MenuRefresh
diff --git a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuGlobalOTDTableTest_OnClick.def b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuGlobalOTDTableTest_OnClick.def
new file mode 100644
index 0000000..9596987
--- /dev/null
+++ b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuGlobalOTDTableTest_OnClick.def
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: mbMainMenu/MenuGlobalOTDTableTest
+Response OnClick () id:Response_TIANMA_JITUAN_mbMainMenu_MenuGlobalOTDTableTest_OnClick
+{
+  #keys: '[157968.0.1170224134]'
+  Body:
+  [*
+    // Run GlobalOTDTable test method
+    GlobalOTDTable.Test();
+  *]
+  DefinitionID: 'Responsedef_Menu_OnClick'
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Method_CalculatePriorityResult.def b/_Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Method_CalculatePriorityResult.def
index 177aa43..3d2bf8a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Method_CalculatePriorityResult.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Method_CalculatePriorityResult.def
@@ -1,11 +1,12 @@
 Quintiq file version 2.0
 #parent: #root
-Method CalculatePriorityResult () id:Method_DialogChoosePriorityPolicy_CalculatePriorityResult
+Method CalculatePriorityResult (
+  String name
+) id:Method_DialogChoosePriorityPolicy_CalculatePriorityResult
 {
   #keys: '[414382.0.577602130]'
   Body:
   [*
-    name := PriorityPolicyStringList.Text();
     PriorityResult::CalculatePriorityResult(name,MacroPlan,GlobalOTDTable);
     this.Close();
   *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Response_pnlActions_btnOk_OnClick.def
index 9924430..4b92eb4 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Response_pnlActions_btnOk_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogChoosePriorityPolicy/Response_pnlActions_btnOk_OnClick.def
@@ -8,8 +8,10 @@
   {
     Body:
     [*
+      name := PriorityPolicyStringList.Text();
       dlg := construct( DialogChoosePriorityPolicy );
-      dlg.CalculatePriorityResult();
+      dlg.CalculatePriorityResult(name);
+      dlg.Close();
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Component_pnlActions.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Component_pnlActions.def
new file mode 100644
index 0000000..f5b2f80
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Component_pnlActions.def
@@ -0,0 +1,50 @@
+Quintiq file version 2.0
+Component pnlActions
+{
+  #keys: '[414382.0.579140304]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component btnApply
+    {
+      #keys: '[414382.0.579140306]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Apply'
+        Taborder: 0
+      ]
+    }
+    Component btnOk
+    {
+      #keys: '[414382.0.579140308]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'OK'
+        Taborder: 1
+      ]
+    }
+    Component btnCancel
+    {
+      #keys: '[414382.0.579140310]'
+      BaseType: 'WebButton'
+      Properties:
+      [
+        Label: 'Cancel'
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    Border: true
+    ExcludeFromActiveComponent: true
+    FixedSize: true
+    Orientation: 'horizontal'
+    Padding: 'true'
+    Style: 'footer'
+    Taborder: 1
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Component_pnlContent.def
new file mode 100644
index 0000000..410a038
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Component_pnlContent.def
@@ -0,0 +1,91 @@
+Quintiq file version 2.0
+Component pnlContent
+{
+  #keys: '[414382.0.579140302]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component EditBusinessType
+    {
+      #keys: '[414382.0.581576821]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'DataHolderSelectCustomerOrder.Data.BusinessType'
+        Label: '浜嬩笟閮�'
+        Taborder: 0
+      ]
+    }
+    Component EditCustomerPolicy
+    {
+      #keys: '[414382.0.581576840]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'DataHolderSelectCustomerOrder.Data.CustomerPolicy'
+        Label: '瀹㈡埛绛栫暐'
+        Taborder: 1
+      ]
+    }
+    Component EditOrderType
+    {
+      #keys: '[414382.0.581576842]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'DataHolderSelectCustomerOrder.Data.OrderType'
+        Label: '璁㈠崟绫诲瀷'
+        Taborder: 2
+      ]
+    }
+    Component EditProductGrade
+    {
+      #keys: '[414382.0.581576844]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'DataHolderSelectCustomerOrder.Data.ProductGrade'
+        Label: '浜у搧绛夌骇'
+        Taborder: 4
+      ]
+    }
+    Component EditSegmentPriority
+    {
+      #keys: '[414382.0.581576846]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'DataHolderSelectCustomerOrder.Data.SegmentPriority'
+        Label: '缁嗗垎甯傚満浼樺厛绾�'
+        Taborder: 5
+      ]
+    }
+    Component EditOrderTime
+    {
+      #keys: '[414382.0.581576988]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        DataBinding: 'DataHolderSelectCustomerOrder.Data.OrderTime'
+        Label: '璁㈠崟涓嬪崟鏃堕棿'
+        Taborder: 3
+      ]
+    }
+    Component EditSheetProfitability
+    {
+      #keys: '[414382.0.581577181]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'DataHolderSelectCustomerOrder.Data.SheetProfitability'
+        Label: '澶у紶鐩堝埄姘村钩'
+        Taborder: 6
+      ]
+    }
+  ]
+  Properties:
+  [
+    Padding: 'true'
+    Taborder: 0
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Method_ClickBynOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Method_ClickBynOk.def
new file mode 100644
index 0000000..e782835
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Method_ClickBynOk.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+Method ClickBynOk () id:Method_DialogEditCustomerOrderPriority_ClickBynOk
+{
+  #keys: '[414382.0.581577357]'
+  Body:
+  [*
+    // Disabled button to prevent the possibility of multiple firing
+    
+    btnOk.Enabled(false,'');
+    
+    // OnOk
+    this.ApplyChanges();
+    DataHolderSelectCustomerOrder.Data().Commit();
+    this.Close();
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Method_EditCustomerOrderPriority.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Method_EditCustomerOrderPriority.def
new file mode 100644
index 0000000..343d6f0
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Method_EditCustomerOrderPriority.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+Method EditCustomerOrderPriority (
+  CustomerOrder selection
+) id:Method_DialogEditCustomerOrderPriority_EditCustomerOrderPriority
+{
+  #keys: '[414382.0.581575991]'
+  Body:
+  [*
+    // Edits assumption
+    data := shadow( selection );
+    
+    DataHolderSelectCustomerOrder.Data( &data );
+    
+    ApplicationMacroPlanner.ShowFormModal( this );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnApply_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnApply_OnClick.def
new file mode 100644
index 0000000..5935b2f
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnApply_OnClick.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: pnlActions/btnApply
+Response OnClick () id:Response_pnlActions_btnApply_OnClick
+{
+  #keys: '[414382.0.579140312]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  Precondition:
+  [*
+    return Form.HasChanges();
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      Form.ApplyChanges();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnCancel_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnCancel_OnClick.def
new file mode 100644
index 0000000..0b78789
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnCancel_OnClick.def
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: pnlActions/btnCancel
+Response OnClick () id:Response_pnlActions_btnCancel_OnClick
+{
+  #keys: '[414382.0.579140314]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      Form.Close();
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnOk_OnClick.def
new file mode 100644
index 0000000..a1d53c6
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/Response_pnlActions_btnOk_OnClick.def
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: pnlActions/btnOk
+Response OnClick () id:Response_pnlActions_btnOk_OnClick
+{
+  #keys: '[414382.0.579140313]'
+  DefinitionID: 'Responsedef_WebButton_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      Form.ClickBynOk();
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/_ROOT_Component_DialogEditCustomerOrderPriority.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/_ROOT_Component_DialogEditCustomerOrderPriority.def
new file mode 100644
index 0000000..ddfdb14
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditCustomerOrderPriority/_ROOT_Component_DialogEditCustomerOrderPriority.def
@@ -0,0 +1,32 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlannerWebApp
+OrphanComponent DialogEditCustomerOrderPriority
+{
+  #keys: '[414382.0.579140300]'
+  BaseType: 'WebForm'
+  Children:
+  [
+    #child: pnlContent
+    #child: pnlActions
+    Component DataHolderSelectCustomerOrder
+    {
+      #keys: '[414382.0.581575244]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'shadow[CustomerOrder]*'
+      Properties:
+      [
+        Taborder: 2
+      ]
+    }
+  ]
+  Properties:
+  [
+    Alignment: 'trailing'
+    EnterButton: 'btnOk'
+    EscapeButton: 'btnCancel'
+    ExcludeFromActiveComponent: true
+    Padding: 'false'
+    Title: '淇敼璁㈠崟浼樺厛绾у洜瀛愪俊鎭�'
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def
index d9aacef..4d52db8 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def
@@ -13,5 +13,15 @@
         Title: '浜嬩笟閮ㄤ紭鍏堢骇璁$畻'
       ]
     }
+    Component MenuEditCustomerOrderPriority
+    {
+      #keys: '[414382.0.581575364]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Taborder: 11
+        Title: '淇敼瀹㈡埛璁㈠崟浼樺厛绾у洜瀛愪俊鎭�'
+      ]
+    }
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Response_TIANMA_JITUAN_ListSalesDemands_MenuEditCustomerOrderPriority_OnClic.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Response_TIANMA_JITUAN_ListSalesDemands_MenuEditCustomerOrderPriority_OnClic.def
new file mode 100644
index 0000000..db0367b
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Response_TIANMA_JITUAN_ListSalesDemands_MenuEditCustomerOrderPriority_OnClic.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: ListSalesDemands
+Response OnClick (
+  SalesDemandBase selection
+) id:Response_ListSalesDemands_MenuEditCustomerOrderPriority_OnClick
+{
+  #keys: '[414382.0.581575400]'
+  CanBindMultiple: false
+  DefinitionID => //FormSalesDemands/ListSalesDemands/Responsedef_ListSalesDemands_WebMenu_OnClick
+  Initiator: 'MenuEditCustomerOrderPriority'
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogEditCustomerOrderPriority );
+      data := selection.astype( CustomerOrder );
+      dlg.EditCustomerOrderPriority( data);
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnCreated.def
index 97bd89b..0ba2149 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnCreated.def
@@ -9,8 +9,12 @@
   {
     Body:
     [*
-      businessTypeList := selectset( GlobalOTDTable,BusinessType,b,true);
-      this.Data(&businessTypeList);
+      //businessTypeList := selectset( GlobalOTDTable,BusinessType,b,true);
+      //this.Data(&businessTypeList);
+      
+      list := this.Data();
+      strings := selectuniquevalues( list,Elements,e,e.BusinessTypeName()).Concatenate( ";" );
+      DropDownStringListBusinessType.Strings(strings);
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnDataChanged.def
index d68c8ef..c492ed8 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnDataChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnDataChanged.def
@@ -9,10 +9,12 @@
   {
     Body:
     [*
-      businessTypeList := selectset( GlobalOTDTable,BusinessType,b,true);
-      this.Data(&businessTypeList);
-      
-      strings := BusinessType::GetBusinessNameStr( GlobalOTDTable );
+      //businessTypeList := selectset( GlobalOTDTable,BusinessType,b,true);
+      //this.Data(&businessTypeList);
+      //strings := BusinessType::GetBusinessNameStr( GlobalOTDTable );
+      //DropDownStringListBusinessType.Strings(strings);
+      list := this.Data();
+      strings := selectuniquevalues( list,Elements,e,e.BusinessTypeName()).Concatenate( ";" );
       DropDownStringListBusinessType.Strings(strings);
     *]
     GroupServerCalls: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def
index 639dcea..70938b2 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def
@@ -9,8 +9,8 @@
   {
     Body:
     [*
-      strings := BusinessType::GetBusinessNameStr( GlobalOTDTable );
-      this.Strings(strings);
+      //strings := BusinessType::GetBusinessNameStr( GlobalOTDTable );
+      //this.Strings(strings);
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def
index fa7ba3e..b3df733 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def
@@ -43,6 +43,21 @@
       #keys: '[414382.0.539205233]'
       BaseType: 'WebDataHolder'
       Databinding: 'structured[BusinessType]*'
+      Children:
+      [
+        Component DataExtractorPriorityFactorBusinessType
+        {
+          #keys: '[414382.0.584060499]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'GlobalOTDTable'
+            Source: 'GlobalOTDTable'
+            Taborder: 0
+            Transformation: 'BusinessType'
+          ]
+        }
+      ]
       Properties:
       [
         Taborder: 4
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyBusinessType_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyBusinessType_OnCreated.def
new file mode 100644
index 0000000..09cb86c
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyBusinessType_OnCreated.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: DataHolderPriorityPolicyBusinessType
+Response OnCreated () id:Response_FormPriorityPolicy_DataHolderPriorityPolicyBusinessType_OnCreated
+{
+  #keys: '[414382.0.585796031]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      list := this.Data();
+      strings := selectuniquevalues( list,Elements,e,e.BusinessTypeName()).Concatenate( ";" );
+      PriorityPolicyBusinessType.Strings(strings);
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyBusinessType_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyBusinessType_OnDataChanged.def
new file mode 100644
index 0000000..3aa1c62
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyBusinessType_OnDataChanged.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: DataHolderPriorityPolicyBusinessType
+Response OnDataChanged () id:Response_FormPriorityPolicy_DataHolderPriorityPolicyBusinessType_OnDataChanged
+{
+  #keys: '[414382.0.585796110]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      list := this.Data();
+      strings := selectuniquevalues( list,Elements,e,e.BusinessTypeName()).Concatenate( ";" );
+      PriorityPolicyBusinessType.Strings(strings);
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyFactor_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyFactor_OnCreated.def
new file mode 100644
index 0000000..2ec5ac7
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyFactor_OnCreated.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: DataHolderPriorityPolicyFactor
+Response OnCreated () id:Response_FormPriorityPolicy_DataHolderPriorityPolicyFactor_OnCreated
+{
+  #keys: '[414382.0.586001511]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      list := this.Data();
+      strings := selectuniquevalues( list,Elements,e,e.Name()).Concatenate( ";" );
+      DropDownStringList.Strings(strings);
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyFactor_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyFactor_OnDataChanged.def
new file mode 100644
index 0000000..93d0f9c
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicyFactor_OnDataChanged.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: DataHolderPriorityPolicyFactor
+Response OnDataChanged () id:Response_FormPriorityPolicy_DataHolderPriorityPolicyFactor_OnDataChanged
+{
+  #keys: '[414382.0.585931640]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      list := this.Data();
+      strings := selectuniquevalues( list,Elements,e,e.Name()).Concatenate( ";" );
+      DropDownStringList.Strings(strings);
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnCreated.def
index 7cbbd08..992b235 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnCreated.def
@@ -9,8 +9,8 @@
   {
     Body:
     [*
-      strs := PriorityFactor::GetNameList( MacroPlan,DropDownStringList.Text());
-      this.Strings(strs);
+      //strs := PriorityFactor::GetNameList( MacroPlan,DropDownStringList.Text());
+      //this.Strings(strs);
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PriorityPolicyBusinessType_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PriorityPolicyBusinessType_OnSelectionChanged.def
index 6ed7e84..7acc7f0 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PriorityPolicyBusinessType_OnSelectionChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PriorityPolicyBusinessType_OnSelectionChanged.def
@@ -9,8 +9,8 @@
   {
     Body:
     [*
-      list := PriorityPolicy::GetDataByBusinessType( MacroPlan, PriorityPolicyBusinessType.Text());
-      DataHolderPriorityPolicy.Data(&list);
+      //list := PriorityPolicy::GetDataByBusinessType( MacroPlan, PriorityPolicyBusinessType.Text());
+      //DataHolderPriorityPolicy.Data(&list);
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/_ROOT_Component_FormPriorityPolicy.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/_ROOT_Component_FormPriorityPolicy.def
index cd5d437..72153cd 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/_ROOT_Component_FormPriorityPolicy.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/_ROOT_Component_FormPriorityPolicy.def
@@ -39,6 +39,56 @@
         Taborder: 4
       ]
     }
+    Component DataHolderPriorityPolicyBusinessType
+    {
+      #keys: '[414382.0.585736261]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'structured[BusinessType]*'
+      Children:
+      [
+        Component DataExtractorPriorityPolicyBusinessType
+        {
+          #keys: '[414382.0.585207663]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'GlobalOTDTable'
+            Source: 'GlobalOTDTable'
+            Taborder: 0
+            Transformation: 'BusinessType'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Taborder: 5
+      ]
+    }
+    Component DataHolderPriorityPolicyFactor
+    {
+      #keys: '[414382.0.585208237]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'structured[PriorityFactor]*'
+      Children:
+      [
+        Component DataExtractorPriorityPolicyFactor
+        {
+          #keys: '[414382.0.585705356]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'PriorityFactor'
+          ]
+        }
+      ]
+      Properties:
+      [
+        Taborder: 6
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Views/PriorityTest.vw b/_Main/UI/MacroPlannerWebApp/Views/PriorityTest.vw
new file mode 100644
index 0000000..68006ad
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Views/PriorityTest.vw
@@ -0,0 +1,2745 @@
+Quintiq file version 2.0
+{
+  viewcontents
+  {
+    forms
+    {
+      form_FormBusinessType
+      {
+        title: 'QTIANMA_JITUAN::FormBusinessType'
+        shown: true
+        componentID: 'QTIANMA_JITUAN::FormBusinessType'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 11
+          columnPosition: 9
+          columnSpan: 4
+        }
+        components
+        {
+          FormBusinessType_ListBusinessType
+          {
+          }
+          FormBusinessType_DataSetLevelBusinessType
+          {
+            groupDepth: -1
+            column_BusinessTypeName
+            {
+              columnId: 'BusinessTypeName'
+              dataPath: 'BusinessTypeName'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+          }
+        }
+      }
+      form_FormPriorityResult
+      {
+        title: 'QTIANMA_JITUAN::FormPriorityResult'
+        shown: true
+        componentID: 'QTIANMA_JITUAN::FormPriorityResult'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 13
+          rowSpan: 11
+          columnPosition: 1
+          columnSpan: 4
+        }
+        components
+        {
+          FormPriorityResult_PanelPriorityResult
+          {
+            sizeRatio: 1
+          }
+          FormPriorityResult_ListPriorityResult
+          {
+          }
+          FormPriorityResult_DataSetLevelPriorityResult
+          {
+            groupDepth: -1
+            column_SalesSegmentName
+            {
+              columnId: 'SalesSegmentName'
+              dataPath: 'SalesSegmentName'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_ProductID
+            {
+              columnId: 'ProductID'
+              dataPath: 'ProductID'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_StockingPointID
+            {
+              columnId: 'StockingPointID'
+              dataPath: 'StockingPointID'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+            column_Customer
+            {
+              columnId: 'Customer'
+              dataPath: 'Customer'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+            column_BusinessType
+            {
+              columnId: 'BusinessType'
+              dataPath: 'BusinessType'
+              dataType: 'string'
+              index: 4
+              subtotals: ''
+              width: 150
+            }
+            column_Quantity
+            {
+              columnId: 'Quantity'
+              dataPath: 'Quantity'
+              dataType: 'real'
+              index: 5
+              subtotals: ''
+              width: 150
+            }
+            column_UnitOfMeasureName
+            {
+              columnId: 'UnitOfMeasureName'
+              dataPath: 'UnitOfMeasureName'
+              dataType: 'string'
+              index: 6
+              subtotals: ''
+              width: 150
+            }
+            column_DemandDate
+            {
+              columnId: 'DemandDate'
+              dataPath: 'DemandDate'
+              dataType: 'date'
+              index: 7
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityResultScore
+            {
+              columnId: 'PriorityResultScore'
+              dataPath: 'PriorityResultScore'
+              dataType: 'real'
+              index: 8
+              subtotals: ''
+              width: 150
+            }
+          }
+          FormPriorityResult_PanelPriorityResultDetails
+          {
+            sizeRatio: 1
+          }
+          FormPriorityResult_ListPriorityResultBusinessTypeDetails
+          {
+          }
+          FormPriorityResult_DataSetLevelPriorityResultDetails
+          {
+            groupDepth: -1
+            column_SalesSegmentName
+            {
+              columnId: 'SalesSegmentName'
+              dataPath: 'SalesSegmentName'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_StockingPointID
+            {
+              columnId: 'StockingPointID'
+              dataPath: 'StockingPointID'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_Customer
+            {
+              columnId: 'Customer'
+              dataPath: 'Customer'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+            column_BusinessType
+            {
+              columnId: 'BusinessType'
+              dataPath: 'BusinessType'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+            column_Quantity
+            {
+              columnId: 'Quantity'
+              dataPath: 'Quantity'
+              dataType: 'real'
+              index: 4
+              subtotals: ''
+              width: 150
+            }
+            column_UnitOfMeasureName
+            {
+              columnId: 'UnitOfMeasureName'
+              dataPath: 'UnitOfMeasureName'
+              dataType: 'string'
+              index: 5
+              subtotals: ''
+              width: 150
+            }
+            column_DemandDate
+            {
+              columnId: 'DemandDate'
+              dataPath: 'DemandDate'
+              dataType: 'date'
+              index: 6
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityResultScore
+            {
+              columnId: 'PriorityResultScore'
+              dataPath: 'PriorityResultScore'
+              dataType: 'real'
+              index: 7
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityPolicyName
+            {
+              columnId: 'PriorityPolicyName'
+              dataPath: 'PriorityPolicyName'
+              dataType: 'string'
+              index: 8
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityFactorName
+            {
+              columnId: 'PriorityFactorName'
+              dataPath: 'PriorityFactorName'
+              dataType: 'string'
+              index: 9
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityFactorGradingName
+            {
+              columnId: 'PriorityFactorGradingName'
+              dataPath: 'PriorityFactorGradingName'
+              dataType: 'string'
+              index: 10
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityTotalScore
+            {
+              columnId: 'PriorityTotalScore'
+              dataPath: 'PriorityTotalScore'
+              dataType: 'real'
+              index: 11
+              subtotals: ''
+              width: 150
+            }
+          }
+          FormPriorityResult_ListPriorityResultGroupDetails
+          {
+          }
+          FormPriorityResult_DataSetLevelPriorityResultDetails872
+          {
+            groupDepth: -1
+            column_SalesSegmentName
+            {
+              columnId: 'SalesSegmentName'
+              dataPath: 'SalesSegmentName'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_StockingPointID
+            {
+              columnId: 'StockingPointID'
+              dataPath: 'StockingPointID'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_Customer
+            {
+              columnId: 'Customer'
+              dataPath: 'Customer'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+            column_BusinessType
+            {
+              columnId: 'BusinessType'
+              dataPath: 'BusinessType'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+            column_Quantity
+            {
+              columnId: 'Quantity'
+              dataPath: 'Quantity'
+              dataType: 'real'
+              index: 4
+              subtotals: ''
+              width: 150
+            }
+            column_UnitOfMeasureName
+            {
+              columnId: 'UnitOfMeasureName'
+              dataPath: 'UnitOfMeasureName'
+              dataType: 'string'
+              index: 5
+              subtotals: ''
+              width: 150
+            }
+            column_DemandDate
+            {
+              columnId: 'DemandDate'
+              dataPath: 'DemandDate'
+              dataType: 'date'
+              index: 6
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityResultScore
+            {
+              columnId: 'PriorityResultScore'
+              dataPath: 'PriorityResultScore'
+              dataType: 'real'
+              index: 7
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityPolicyName
+            {
+              columnId: 'PriorityPolicyName'
+              dataPath: 'PriorityPolicyName'
+              dataType: 'string'
+              index: 8
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityFactorName
+            {
+              columnId: 'PriorityFactorName'
+              dataPath: 'PriorityFactorName'
+              dataType: 'string'
+              index: 9
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityFactorGradingName
+            {
+              columnId: 'PriorityFactorGradingName'
+              dataPath: 'PriorityFactorGradingName'
+              dataType: 'string'
+              index: 10
+              subtotals: ''
+              width: 150
+            }
+            column_PriorityTotalScore
+            {
+              columnId: 'PriorityTotalScore'
+              dataPath: 'PriorityTotalScore'
+              dataType: 'real'
+              index: 11
+              subtotals: ''
+              width: 150
+            }
+          }
+        }
+      }
+      form_FormPriorityFactor
+      {
+        title: 'QTIANMA_JITUAN::FormPriorityFactor'
+        shown: true
+        componentID: 'QTIANMA_JITUAN::FormPriorityFactor'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 12
+          columnPosition: 1
+          columnSpan: 4
+        }
+        components
+        {
+          FormPriorityFactor_ListPriorityFactor
+          {
+          }
+          FormPriorityFactor_DataSetLevelPriorityFactor
+          {
+            groupDepth: -1
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_Coefficient
+            {
+              columnId: 'Coefficient'
+              dataPath: 'Coefficient'
+              dataType: 'real'
+              index: 1
+              subtotals: ''
+              width: 496
+            }
+            column_Desc
+            {
+              columnId: 'Desc'
+              dataPath: 'Desc'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+          }
+        }
+      }
+      form_FormPriorityFactorGrading
+      {
+        title: 'QTIANMA_JITUAN::FormPriorityFactorGrading'
+        shown: true
+        componentID: 'QTIANMA_JITUAN::FormPriorityFactorGrading'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 11
+          columnPosition: 5
+          columnSpan: 4
+        }
+        components
+        {
+          FormPriorityFactorGrading_ListPriorityFactorGrading
+          {
+          }
+          FormPriorityFactorGrading_DataSetLevelPriorityFactorGrading
+          {
+            groupDepth: -1
+            column_GradingName
+            {
+              columnId: 'GradingName'
+              dataPath: 'GradingName'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_GradeValueStr
+            {
+              columnId: 'GradeValueStr'
+              dataPath: 'GradeValueStr'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 150
+            }
+            column_GradeDesc
+            {
+              columnId: 'GradeDesc'
+              dataPath: 'GradeDesc'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 150
+            }
+          }
+        }
+      }
+      form_FormPriorityPolicy
+      {
+        title: 'QTIANMA_JITUAN::FormPriorityPolicy'
+        shown: true
+        componentID: 'QTIANMA_JITUAN::FormPriorityPolicy'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 12
+          rowSpan: 14
+          columnPosition: 5
+          columnSpan: 7
+        }
+        components
+        {
+          FormPriorityPolicy_ListPriorityPolicy
+          {
+          }
+          FormPriorityPolicy_DataSetLevelPriorityPolicy
+          {
+            groupDepth: -1
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+            column_Formula
+            {
+              columnId: 'Formula'
+              dataPath: 'Formula'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 433
+            }
+            column_CalculateValue
+            {
+              columnId: 'CalculateValue'
+              dataPath: 'CalculateValue'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 644
+            }
+            column_Desc
+            {
+              columnId: 'Desc'
+              dataPath: 'Desc'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 150
+            }
+          }
+          FormPriorityPolicy_PanelPriorityPolicyOperation
+          {
+            sizeRatio: 1
+          }
+          FormPriorityPolicy_PanelPriorityPolicyOperationButton
+          {
+            sizeRatio: 1
+          }
+          FormPriorityPolicy_PanelPriorityPolicyCoefficient
+          {
+            sizeRatio: 1
+          }
+        }
+      }
+      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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 1
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_1
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 2
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_1
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 3
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_2
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 4
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_2
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 5
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_3
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 6
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_3
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 7
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_4
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 8
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_4
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 9
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_5
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 10
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_5
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 11
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_6
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 12
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_6
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 13
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_7
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 14
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_7
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 15
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormSanityCheck
+      {
+        title: 'Sanity Check'
+        shown: false
+        componentID: 'FormSanityCheck'
+        layout
+        {
+          mode: 'dockright'
+          index: 16
+        }
+        components
+        {
+          FormSanityCheck_PanelSanityCheckToolbar
+          {
+            sizeRatio: 1
+          }
+          FormSanityCheck_PanelSanityCheckContent
+          {
+            sizeRatio: 1
+          }
+          FormSanityCheck_PanelSanityCheckGroup
+          {
+            sizeRatio: 4
+          }
+          FormSanityCheck_ListSanityCheckGroup
+          {
+          }
+          FormSanityCheck_DataSetLevelSanityCheckGroup
+          {
+            groupDepth: -1
+            sort: 'DESC:IsShown,DESC:SanityCheckHighestCategory,DESC:_Expr3'
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Show
+            {
+              columnId: 'Show'
+              dataPath: 'Show'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 32
+            }
+            column_Category
+            {
+              columnId: 'Category'
+              dataPath: 'Category'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 32
+            }
+            column_Group
+            {
+              columnId: 'Group'
+              dataPath: 'Group'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 270
+            }
+            column__Expr3
+            {
+              columnId: '_Expr3'
+              dataPath: '_Expr3'
+              dataType: 'number'
+              index: 4
+              subtotals: ''
+              width: 95
+            }
+          }
+          FormSanityCheck_PanelSanityCheckMessage
+          {
+            sizeRatio: 5
+          }
+          FormSanityCheck_ListSanityCheckMessage
+          {
+          }
+          FormSanityCheck_DataSetLevelSanityCheckMessage
+          {
+            groupDepth: -1
+            sort: 'DESC:IsShown,SanityCheckGroup.Type,SanityCheckGroup.Group,Description'
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Show
+            {
+              columnId: 'Show'
+              dataPath: 'Show'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 32
+            }
+            column_Category
+            {
+              columnId: 'Category'
+              dataPath: 'Category'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 32
+            }
+            column_Messages
+            {
+              columnId: 'Messages'
+              dataPath: 'Messages'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 32
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              index: 4
+              subtotals: ''
+              width: 585
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_8
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 17
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_8
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 18
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_9
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 19
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_9
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 20
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_10
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 21
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_10
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 22
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_11
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 23
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_11
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 24
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_12
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 25
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_12
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 26
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_13
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 27
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_13
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 28
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_14
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 29
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_14
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 30
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerPuzzles_15
+      {
+        title: 'Optimizer Puzzles'
+        shown: false
+        componentID: 'FormOptimizerPuzzles'
+        layout
+        {
+          mode: 'dockright'
+          index: 31
+        }
+        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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 109
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              title: '鎻忚堪'
+              index: 2
+              subtotals: ''
+              width: 207
+            }
+          }
+        }
+      }
+      form_FormKPI_15
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 32
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          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: '鍚嶇О'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormSanityCheck_1
+      {
+        title: 'Sanity Check'
+        shown: false
+        componentID: 'FormSanityCheck'
+        layout
+        {
+          mode: 'dockright'
+          index: 33
+        }
+        components
+        {
+          FormSanityCheck_PanelSanityCheckToolbar
+          {
+            sizeRatio: 1
+          }
+          FormSanityCheck_PanelSanityCheckContent
+          {
+            sizeRatio: 1
+          }
+          FormSanityCheck_PanelSanityCheckGroup
+          {
+            sizeRatio: 4
+          }
+          FormSanityCheck_ListSanityCheckGroup
+          {
+          }
+          FormSanityCheck_DataSetLevelSanityCheckGroup
+          {
+            groupDepth: -1
+            sort: 'DESC:IsShown,DESC:SanityCheckHighestCategory,DESC:_Expr3'
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Show
+            {
+              columnId: 'Show'
+              dataPath: 'Show'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 32
+            }
+            column_Category
+            {
+              columnId: 'Category'
+              dataPath: 'Category'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 32
+            }
+            column_Group
+            {
+              columnId: 'Group'
+              dataPath: 'Group'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 270
+            }
+            column__Expr3
+            {
+              columnId: '_Expr3'
+              dataPath: '_Expr3'
+              dataType: 'number'
+              index: 4
+              subtotals: ''
+              width: 95
+            }
+          }
+          FormSanityCheck_PanelSanityCheckMessage
+          {
+            sizeRatio: 5
+          }
+          FormSanityCheck_ListSanityCheckMessage
+          {
+          }
+          FormSanityCheck_DataSetLevelSanityCheckMessage
+          {
+            groupDepth: -1
+            sort: 'DESC:IsShown,SanityCheckGroup.Type,SanityCheckGroup.Group,Description'
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Show
+            {
+              columnId: 'Show'
+              dataPath: 'Show'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 32
+            }
+            column_Category
+            {
+              columnId: 'Category'
+              dataPath: 'Category'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 32
+            }
+            column_Messages
+            {
+              columnId: 'Messages'
+              dataPath: 'Messages'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 32
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              index: 4
+              subtotals: ''
+              width: 585
+            }
+          }
+        }
+      }
+      form_FormKPI_16
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 34
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          FormKPI_PanelKPIDashboard
+          {
+            sizeRatio: 1
+          }
+          FormKPI_PanelKPISelection
+          {
+            sizeRatio: 1
+          }
+          FormKPI_ListKPISelection
+          {
+            QuillViewData
+            {
+              Metals_KPISetting: 'Fulfillment;Fulfillment target;On time fulfillment;On time in full;Sales'
+              Food_KPISetting: 'Fulfillment;Fulfillment target;On time fulfillment;On time in full;Sales'
+              Empty_KPISetting: 'Fulfillment;Fulfillment target;On time fulfillment;On time in full;Sales'
+            }
+          }
+          FormKPI_DataSetLevelKPISelection
+          {
+            groupDepth: -1
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              title: '鍚嶇О'
+              index: 0
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormKPI_17
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 35
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPIDashboard'
+          }
+          FormKPI_PanelKPIDashboard
+          {
+            sizeRatio: 1
+          }
+          FormKPI_PanelKPISelection
+          {
+            sizeRatio: 1
+          }
+          FormKPI_ListKPISelection
+          {
+            QuillViewData
+            {
+              Metals_KPISetting: 'Fulfillment;Fulfillment target;On time fulfillment;On time in full;Sales'
+              Food_KPISetting: 'Fulfillment;Fulfillment target;On time fulfillment;On time in full;Sales'
+              Empty_KPISetting: 'Fulfillment;Fulfillment target;On time fulfillment;On time in full;Sales'
+            }
+          }
+          FormKPI_DataSetLevelKPISelection
+          {
+            groupDepth: -1
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              title: '鍚嶇О'
+              index: 0
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormPriorities
+      {
+        title: 'Priorities'
+        shown: true
+        componentID: 'FormPriorities'
+        layout
+        {
+          mode: 'dockright'
+          index: 36
+        }
+        components
+        {
+          FormPriorities_ListPriority
+          {
+          }
+          FormPriorities_DataSetLevelPriority
+          {
+            groupDepth: -1
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_ImgHasSalesDemand
+            {
+              columnId: 'ImgHasSalesDemand'
+              dataPath: 'ImgHasSalesDemand'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 30
+            }
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 95
+            }
+            column_Weight
+            {
+              columnId: 'Weight'
+              dataPath: 'Weight'
+              dataType: 'real'
+              index: 3
+              subtotals: ''
+              width: 95
+            }
+          }
+        }
+      }
+    }
+    userconfigurableinformation
+    {
+    }
+    page: ''
+    group: ''
+    index: 15
+    image: ''
+    description: ''
+  }
+  formatversion: 2
+  id: 'PriorityTest'
+  name: 'PriorityTest'
+  isglobal: false
+  isroot: true
+}

--
Gitblit v1.9.3