From 92ecb46f3f2cfcae338d26cd56855018ba18b449 Mon Sep 17 00:00:00 2001
From: yanyuan <yuan.yan@capgemini.com>
Date: 星期四, 09 十一月 2023 15:20:17 +0800
Subject: [PATCH] Merge branch 'dev' into dev_yy

---
 _Main/BL/Type_Flag/Attribute_flag.qbl                                                                                                          |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_New.def                                                                  |    2 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Component_pnlContent.def                                                 |   34 
 _Main/BL/InfoMessages.qbl                                                                                                                      |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuEditPriorityFactor_OnClick#325.def                    |   20 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuDeletePriorityFactorGrading_OnClick.def |   24 
 _Main/BL/EDI/Broker_GlobalOTDTable_CustomOrder.qbl                                                                                             |   12 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_ListPriorityFactorGrading.def                                        |    6 
 _Main/BL/Type_PriorityFactor/Method_CreatePrioitifyFacotrDetail.qbl                                                                            |   13 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuNewPriorityFactorGrading_OnClick.def    |   18 
 _Main/BL/Type_PriorityFactorDetails/StaticMethod_InitData.qbl                                                                                  |   56 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnCreated.def                                |    4 
 _Main/BL/Type_Global_MappingForecast/Attribute_SegmentPriority.qbl                                                                             |    8 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlActions_btnOk_OnClick.def                                           |   32 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Response_TIANMA_JITUAN_listContextMenuSD_MenuSyncInterfaceData_OnClick.def            |   16 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/_ROOT_Component_FormPriorityFactorGrading.def                                  |   16 
 _Main/BL/Type_Global_MappingOperationBOM/Attribute_IsLinkedWithFGCrossBusiness.qbl                                                             |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnClick#106.def                                           |    4 
 _Main/BL/Type_PriorityFactorDetails/_ROOT_Type_PriorityFactorDetail.qbl                                                                        |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuDeletePriorityFactor_OnClick.def                      |   24 
 _Main/BL/Relations/Relation_Flag_MacroPlan_MacroPlan_Flag.qbl                                                                                  |   23 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_listContextMenuPriorityFactor.def                                           |   33 
 _Main/BL/Type_Global_MappingForecast/Attribute_ProductGrade.qbl                                                                                |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_OnDoubleClick.def                           |   19 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_New.def                                                           |   16 
 _Main/BL/Relations/Relation_PriorityFactorDetail_PriorityFactor_PriorityFactor_PriorityFactorDe.qbl                                            |    6 
 _Main/BL/Type_Global_MappingForecast/Attribute_SheetProfitability.qbl                                                                          |    8 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnChanged.def                                |    4 
 _Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMCountCrossBusiness.qbl                                                                     |    8 
 _Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl                                                                          |  124 -
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuNewPriorityFactor_OnClick.def                         |   20 
 _Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMIDs.qbl                                                                                    |    8 
 _Main/BL/Type_Global_MappingProduct_MP/Attribute_IsLinkedWithFGCrossBusiness.qbl                                                               |    8 
 _Main/BL/Type_MacroPlan/Method_OnCreate.qbl                                                                                                    |  100 +
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_Edit.def                                                          |    8 
 _Main/UI/MacroPlannerWebApp/Views/PriorityTest.vw                                                                                              | 2199 ------------------------------------
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def                                                |   19 
 _Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive_DEBUG.qbl                                        |  167 ++
 _Main/BL/Type_Global_MappingCustomOrder/StaticMethod_CreateCustomOrder.qbl                                                                     |    9 
 _Main/BL/Type_PriorityFactorDetails/StaticMethod_GetDataByPriorityFactor.qbl                                                                   |    4 
 _Main/BL/Relations/Relation_PriorityResult_CustomerOrder_CustomerOrder_PriorityResult.qbl                                                      |   23 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuEditPriorityFactorGrading_OnClick.def   |   20 
 _Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def                                                       |   18 
 _Main/BL/Type_Flag/DefaultValue_flag.qbl                                                                                                       |    7 
 _Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMIDsCrossBusiness.qbl                                                                       |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnDoubleClick.def                                         |   19 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnDrop.def                                                |   21 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_ClickBtnOK.def                                                           |    1 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_listContextMenuPriorityFactor_MenuNewPriorityFactor_OnClick.def              |   17 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_ClickBtnOK.def                                                    |    6 
 _Main/BL/Type_Global_MappingOperation/Attribute_IsLinkedWithFGCrossBusiness.qbl                                                                |    8 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_ListPriorityFactor.def                                                      |    6 
 _Main/BL/Type_Flag/_ROOT_Type_Flag.qbl                                                                                                         |   10 
 _Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes_DEBUG.qbl                                                            |   75 +
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_listContextMenuPriorityFactorGrading.def                             |   36 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/_ROOT_Component_DialogEditPriorityFactorDetail.def                       |    8 
 /dev/null                                                                                                                                      |   17 
 _Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl                                                                                  |   12 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Component_pnlContent.def                                                        |   30 
 _Main/BL/EDI/Broker_GlobalOTDTable_Forecast.qbl                                                                                                |   18 
 _Main/BL/Type_PriorityFactor/StaticMethod_InitData.qbl                                                                                         |    2 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlContent_PriorityFactorName_OnChanged.def                            |   19 
 _Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnSelectionChanged.def                                    |    4 
 63 files changed, 1,096 insertions(+), 2,392 deletions(-)

diff --git a/_Main/BL/EDI/Broker_GlobalOTDTable_CustomOrder.qbl b/_Main/BL/EDI/Broker_GlobalOTDTable_CustomOrder.qbl
index c405497..c0a1573 100644
--- a/_Main/BL/EDI/Broker_GlobalOTDTable_CustomOrder.qbl
+++ b/_Main/BL/EDI/Broker_GlobalOTDTable_CustomOrder.qbl
@@ -54,6 +54,10 @@
         OthersMayUpdateColumn: true
         ValueType: String
       }
+      EDIODBCLinkColumn CHECKMSG
+      {
+        ValueType: String
+      }
       EDIODBCLinkColumn CURRENCYID
       {
         OthersMayUpdateColumn: true
@@ -79,6 +83,14 @@
         OthersMayUpdateColumn: true
         ValueType: String
       }
+      EDIODBCLinkColumn ISCHECKED
+      {
+        ValueType: Number
+      }
+      EDIODBCLinkColumn ISPASS
+      {
+        ValueType: Number
+      }
       EDIODBCLinkColumn ORDERDATE
       {
         OthersMayUpdateColumn: true
diff --git a/_Main/BL/EDI/Broker_GlobalOTDTable_Forecast.qbl b/_Main/BL/EDI/Broker_GlobalOTDTable_Forecast.qbl
index 5d2e4f1..785463b 100644
--- a/_Main/BL/EDI/Broker_GlobalOTDTable_Forecast.qbl
+++ b/_Main/BL/EDI/Broker_GlobalOTDTable_Forecast.qbl
@@ -18,9 +18,12 @@
       EDIMLColumn ID { Attribute: ID ValueType: String }
       EDIMLColumn Price { Attribute: Price ValueType: Real }
       EDIMLColumn PriorityName { Attribute: PriorityName ValueType: String }
+      EDIMLColumn ProductGrade { Attribute: ProductGrade ValueType: String }
       EDIMLColumn ProductID { Attribute: ProductID ValueType: String }
       EDIMLColumn Quantity { Attribute: Quantity ValueType: Real }
       EDIMLColumn SalesSegmentName { Attribute: SalesSegmentName ValueType: String }
+      EDIMLColumn SegmentPriority { Attribute: SegmentPriority ValueType: String }
+      EDIMLColumn SheetProfitability { Attribute: SheetProfitability ValueType: String }
       EDIMLColumn StartDate { Attribute: StartDate ValueType: Date }
       EDIMLColumn StockingPointID { Attribute: StockingPointID ValueType: String }
       EDIMLColumn UnitOfMeasureName { Attribute: UnitOfMeasureName ValueType: String }
@@ -45,6 +48,10 @@
         OthersMayUpdateColumn: true
         ValueType: String
       }
+      EDIODBCLinkColumn CHECKMSG
+      {
+        ValueType: String
+      }
       EDIODBCLinkColumn CURRENCYID
       {
         OthersMayUpdateColumn: true
@@ -59,6 +66,14 @@
       {
         OthersMayUpdateColumn: true
         ValueType: String
+      }
+      EDIODBCLinkColumn ISCHECKED
+      {
+        ValueType: Number
+      }
+      EDIODBCLinkColumn ISPASS
+      {
+        ValueType: Number
       }
       EDIODBCLinkColumn PRICE
       {
@@ -146,9 +161,12 @@
       EDIColumnMatch { InputColumn: ID OutputColumn: ID }
       EDIColumnMatch { InputColumn: PRICE OutputColumn: Price }
       EDIColumnMatch { InputColumn: PRIORITYNAME OutputColumn: PriorityName }
+      EDIColumnMatch { InputColumn: PRODUCTGRADE OutputColumn: ProductGrade }
       EDIColumnMatch { InputColumn: PRODUCTID OutputColumn: ProductID }
       EDIColumnMatch { InputColumn: QUANTITY OutputColumn: Quantity }
       EDIColumnMatch { InputColumn: SALESEGMENTNAME OutputColumn: SalesSegmentName }
+      EDIColumnMatch { InputColumn: SEGMENTPRIORITY OutputColumn: SegmentPriority }
+      EDIColumnMatch { InputColumn: SHEETPROFITABILITY OutputColumn: SheetProfitability }
       EDIColumnMatch
       {
         InputColumn: STARTDATE
diff --git a/_Main/BL/InfoMessages.qbl b/_Main/BL/InfoMessages.qbl
index aa2917b..2d06a81 100644
--- a/_Main/BL/InfoMessages.qbl
+++ b/_Main/BL/InfoMessages.qbl
@@ -10,6 +10,10 @@
   {
     DefaultText: 'Please input validate value !'
   }
+  InfoMessage PriorityFactor_CheckNameNull
+  {
+    DefaultText: '浼樺厛绾у洜瀛愬悕绉颁笉鑳戒负绌恒��'
+  }
   InfoMessage PriorityFactor_CheckNameValid
   {
     DefaultText: '璇ヤ紭鍏堢骇鍥犲瓙鍚嶇О宸插瓨鍦紒'
diff --git a/_Main/BL/Relations/Relation_Flag_MacroPlan_MacroPlan_Flag.qbl b/_Main/BL/Relations/Relation_Flag_MacroPlan_MacroPlan_Flag.qbl
new file mode 100644
index 0000000..efc9566
--- /dev/null
+++ b/_Main/BL/Relations/Relation_Flag_MacroPlan_MacroPlan_Flag.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation Flag_MacroPlan_MacroPlan_Flag
+{
+  #keys: '1[414996.0.51027441]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide MacroPlan
+  {
+    #keys: '3[414996.0.51027443][414996.0.51027442][414996.0.51027444]'
+    Cardinality: '0to1'
+    ObjectDefinition: Flag
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide Flag
+  {
+    #keys: '3[414996.0.51027446][414996.0.51027445][414996.0.51027447]'
+    Cardinality: '1toN'
+    ObjectDefinition: MacroPlan
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_PriorityFactorDetails_PriorityFactor_PriorityFactor_PriorityFactorD.qbl b/_Main/BL/Relations/Relation_PriorityFactorDetail_PriorityFactor_PriorityFactor_PriorityFactorDe.qbl
similarity index 72%
rename from _Main/BL/Relations/Relation_PriorityFactorDetails_PriorityFactor_PriorityFactor_PriorityFactorD.qbl
rename to _Main/BL/Relations/Relation_PriorityFactorDetail_PriorityFactor_PriorityFactor_PriorityFactorDe.qbl
index f58818b..5da1a69 100644
--- a/_Main/BL/Relations/Relation_PriorityFactorDetails_PriorityFactor_PriorityFactor_PriorityFactorD.qbl
+++ b/_Main/BL/Relations/Relation_PriorityFactorDetail_PriorityFactor_PriorityFactor_PriorityFactorDe.qbl
@@ -1,6 +1,6 @@
 Quintiq file version 2.0
 #parent: #root
-Relation PriorityFactorDetails_PriorityFactor_PriorityFactor_PriorityFactorDetails
+Relation PriorityFactorDetail_PriorityFactor_PriorityFactor_PriorityFactorDetail
 {
   #keys: '1[414382.0.444850082]'
   DefaultRelationStrategy
@@ -10,10 +10,10 @@
   {
     #keys: '3[414382.0.444850084][414382.0.444850083][414382.0.444850085]'
     Cardinality: '0to1'
-    ObjectDefinition: PriorityFactorDetails
+    ObjectDefinition: PriorityFactorDetail
     OwningSide: 'Reference'
   }
-  RelationSide.RightSide PriorityFactorDetails
+  RelationSide.RightSide PriorityFactorDetail
   {
     #keys: '3[414382.0.444850087][414382.0.444850086][414382.0.444850088]'
     Cardinality: '1toN'
diff --git a/_Main/BL/Relations/Relation_PriorityResult_CustomerOrder_CustomerOrder_PriorityResult.qbl b/_Main/BL/Relations/Relation_PriorityResult_CustomerOrder_CustomerOrder_PriorityResult.qbl
new file mode 100644
index 0000000..35f6d74
--- /dev/null
+++ b/_Main/BL/Relations/Relation_PriorityResult_CustomerOrder_CustomerOrder_PriorityResult.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation PriorityResult_CustomerOrder_CustomerOrder_PriorityResult
+{
+  #keys: '1[414996.0.57846264]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide CustomerOrder
+  {
+    #keys: '3[414996.0.57846266][414996.0.57846265][414996.0.57846267]'
+    Cardinality: '0to1'
+    ObjectDefinition: PriorityResult
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide PriorityResult
+  {
+    #keys: '3[414996.0.57846269][414996.0.57846268][414996.0.57846270]'
+    Cardinality: '0to1'
+    ObjectDefinition: CustomerOrder
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Type_Flag/Attribute_flag.qbl b/_Main/BL/Type_Flag/Attribute_flag.qbl
new file mode 100644
index 0000000..3953c87
--- /dev/null
+++ b/_Main/BL/Type_Flag/Attribute_flag.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute flag
+{
+  #keys: '3[414996.0.51027432][414996.0.51027431][414996.0.51027433]'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_Flag/DefaultValue_flag.qbl b/_Main/BL/Type_Flag/DefaultValue_flag.qbl
new file mode 100644
index 0000000..7fec89a
--- /dev/null
+++ b/_Main/BL/Type_Flag/DefaultValue_flag.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  ISOValue: 'false'
+  TargetAttribute: flag
+}
diff --git a/_Main/BL/Type_Flag/_ROOT_Type_Flag.qbl b/_Main/BL/Type_Flag/_ROOT_Type_Flag.qbl
new file mode 100644
index 0000000..9b19c84
--- /dev/null
+++ b/_Main/BL/Type_Flag/_ROOT_Type_Flag.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type Flag
+{
+  #keys: '5[414996.0.33484648][414996.0.33484646][0.0.0][414996.0.33484647][414996.0.33484649]'
+  BaseType: Object
+  Description: '鏍囧織浣�'
+  StructuredName: 'Flags'
+}
diff --git a/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl b/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl
deleted file mode 100644
index 5a4ba17..0000000
--- a/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl
+++ /dev/null
@@ -1,45 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Method SetIsLinkedWithFinishedGoodAttributes
-{
-  Description: 'Method to traverse the supply chain to determine if there are any products that are not used to produce finished goods.'
-  TextBody:
-  [*
-    // Reset IsLinkedWithFinishedGood
-    traverse( this, Global_MappingProduct_MP, instance )
-    {
-      instance.IsLinkedWithFinishedGood( false );
-    }
-    
-    traverse( this, Global_MappingOperation, instance )
-    {
-      instance.IsLinkedWithFinishedGood( false );
-    }
-    
-    traverse( this, Global_MappingOperationBOM, instance )
-    {
-      instance.IsLinkedWithFinishedGood( false );
-    }
-    
-    productspool := selectset( this, Global_MappingProduct_MP, product,
-                               product.ProductMajorType() <> "鎴愬搧" );
-    operationspool := this.Global_MappingOperation( relget );
-    operationbomspool := this.Global_MappingOperationBOM( relget );
-    
-    // Traverse each finished good and search for linked products/operations/lanes
-    traverse( this, Global_MappingProduct_MP, product,
-              product.ProductMajorType() = "鎴愬搧" )
-    {
-      uniquebomids := construct( Strings );
-      product.IsLinkedWithFinishedGood( false );
-      product.SetIsLinkedWithFinishedGoodAttributes_Recursive( 0, // depth
-                                                               100, // maxdepth
-                                                               productspool,
-                                                               operationspool,
-                                                               operationbomspool,
-                                                               uniquebomids );
-      uniquebomids := uniquebomids.Unique();
-      product.BOMCount( uniquebomids.Size() );
-    }
-  *]
-}
diff --git a/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes_DEBUG.qbl b/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes_DEBUG.qbl
new file mode 100644
index 0000000..09c33d2
--- /dev/null
+++ b/_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes_DEBUG.qbl
@@ -0,0 +1,75 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetIsLinkedWithFinishedGoodAttributes_DEBUG
+{
+  Description: 'Method to traverse the supply chain to determine if there are any products that are not used to produce finished goods.'
+  TextBody:
+  [*
+    // Reset IsLinkedWithFinishedGood
+    traverse( this, Global_MappingProduct_MP, instance )
+    {
+      instance.IsLinkedWithFinishedGood( false );
+      instance.BOMCount( 0 );
+      instance.BOMIDs( "" );
+      
+      instance.IsLinkedWithFGCrossBusiness( false );
+      instance.BOMCountCrossBusiness( 0 );
+      instance.BOMIDsCrossBusiness( "" );
+    }
+    
+    traverse( this, Global_MappingOperation, instance )
+    {
+      instance.IsLinkedWithFinishedGood( false );
+      instance.IsLinkedWithFGCrossBusiness( false );
+    }
+    
+    traverse( this, Global_MappingOperationBOM, instance )
+    {
+      instance.IsLinkedWithFinishedGood( false );
+      instance.IsLinkedWithFGCrossBusiness( false );
+    }
+    
+    finishedgoods := selectset( this, Global_MappingProduct_MP, product,
+                                product.ProductMajorType() = "鎴愬搧" );
+    numfinishedgoods := finishedgoods.Size();
+    index := 1;
+    
+    // Traverse each finished good and search for linked products/operations/lanes
+    traverse( finishedgoods, Elements, product )
+    {
+      if( not product.IsLinkedWithFinishedGood() )
+      {
+        info( "KKK", this.DefinitionName(), "SetIsLinkedWithFinishedGoodAttributes",
+              "| Processing Product:", product.ID(), "(", index, "/", numfinishedgoods, ")" );
+        uniquebomids := construct( Strings );
+        product.SetIsLinkedWithFinishedGoodAttributes_Recursive_DEBUG( 0, // depth
+                                                                 100, // maxdepth
+                                                                 uniquebomids,
+                                                                 false // isallowcrossbusinesstype
+                                                               );
+        uniquebomids := uniquebomids.Difference( product.ID() ).Unique();
+        product.BOMCount( uniquebomids.Size() );
+        product.BOMIDs( uniquebomids.ToString( ";" ) );
+      }
+      
+      if( not product.IsLinkedWithFGCrossBusiness() )
+      {
+        info( "KKK", this.DefinitionName(), "SetIsLinkedWithFinishedGoodAttributes",
+              "| Processing Product (cross business type):", product.ID(), "(", index, "/", numfinishedgoods, ")" );
+        uniquebomidscrossbusiness := construct( Strings );
+        product.SetIsLinkedWithFinishedGoodAttributes_Recursive_DEBUG( 0, // depth
+                                                                 100, // maxdepth
+                                                                 uniquebomidscrossbusiness,
+                                                                 true // isallowcrossbusinesstype
+                                                               );
+        uniquebomidscrossbusiness := uniquebomidscrossbusiness.Difference( product.ID() ).Unique();
+        product.BOMCountCrossBusiness( uniquebomidscrossbusiness.Size() );
+        product.BOMIDsCrossBusiness( uniquebomidscrossbusiness.ToString( ";" ) );
+      }
+      
+      index++;
+    }
+    
+    info( "KKK", this.DefinitionName(), "SetIsLinkedWithFinishedGoodAttributes", "| Ended." );
+  *]
+}
diff --git a/_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_CreateCustomOrder.qbl b/_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_CreateCustomOrder.qbl
index f07437b..39682d8 100644
--- a/_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_CreateCustomOrder.qbl
+++ b/_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_CreateCustomOrder.qbl
@@ -34,12 +34,17 @@
                                                     false
                                                    );
       targetCustomerOrder.BusinessType( gmco.BusinessType() );
-      targetCustomerOrder.OrderType( gmco.OrderType() );
+      // CustomerPolicy
       targetCustomerOrder.IsAvailable( gmco.IsAvailable() );
+      // IsLocked
+      // LastModify
+      // LastModifyTime
+      // OrderTag
+      targetCustomerOrder.OrderTime( gmco.OrderTime() );
+      targetCustomerOrder.OrderType( gmco.OrderType() );
       targetCustomerOrder.ProductGrade( gmco.ProductGrade() );
       targetCustomerOrder.SegmentPriority( gmco.SegmentPriority() );
       targetCustomerOrder.SheetProfitability( gmco.SheetProfitability() );
-      targetCustomerOrder.OrderTime( gmco.OrderTime() );
     }
   *]
 }
diff --git a/_Main/BL/Type_Global_MappingForecast/Attribute_ProductGrade.qbl b/_Main/BL/Type_Global_MappingForecast/Attribute_ProductGrade.qbl
new file mode 100644
index 0000000..8badfce
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingForecast/Attribute_ProductGrade.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ProductGrade
+{
+  #keys: '3[414996.0.21578321][414996.0.21578320][414996.0.21578322]'
+  Description: '浜у搧绛夌骇'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_Global_MappingForecast/Attribute_SegmentPriority.qbl b/_Main/BL/Type_Global_MappingForecast/Attribute_SegmentPriority.qbl
new file mode 100644
index 0000000..0a38886
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingForecast/Attribute_SegmentPriority.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute SegmentPriority
+{
+  #keys: '3[414996.0.21578344][414996.0.21578343][414996.0.21578345]'
+  Description: '缁嗗垎甯傚満浼樺厛绾�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_Global_MappingForecast/Attribute_SheetProfitability.qbl b/_Main/BL/Type_Global_MappingForecast/Attribute_SheetProfitability.qbl
new file mode 100644
index 0000000..244baca
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingForecast/Attribute_SheetProfitability.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute SheetProfitability
+{
+  #keys: '3[414996.0.21578334][414996.0.21578333][414996.0.21578335]'
+  Description: '澶у紶鐩堝埄'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_Global_MappingOperation/Attribute_IsLinkedWithFGCrossBusiness.qbl b/_Main/BL/Type_Global_MappingOperation/Attribute_IsLinkedWithFGCrossBusiness.qbl
new file mode 100644
index 0000000..5725fee
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingOperation/Attribute_IsLinkedWithFGCrossBusiness.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsLinkedWithFGCrossBusiness
+{
+  #keys: '3[157968.0.1171600004][157968.0.1171600003][157968.0.1171600005]'
+  Description: 'Updated procedurally for checking whether this object is used to produce a finished good cross business type.'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_Global_MappingOperationBOM/Attribute_IsLinkedWithFGCrossBusiness.qbl b/_Main/BL/Type_Global_MappingOperationBOM/Attribute_IsLinkedWithFGCrossBusiness.qbl
new file mode 100644
index 0000000..b20b273
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingOperationBOM/Attribute_IsLinkedWithFGCrossBusiness.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsLinkedWithFGCrossBusiness
+{
+  #keys: '3[157968.0.1171600022][157968.0.1171600021][157968.0.1171600023]'
+  Description: 'Updated procedurally for checking whether this object is used to produce a finished good cross business type.'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMCountCrossBusiness.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMCountCrossBusiness.qbl
new file mode 100644
index 0000000..e85ba06
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMCountCrossBusiness.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute BOMCountCrossBusiness
+{
+  #keys: '3[157968.0.1171600059][157968.0.1171600058][157968.0.1171600060]'
+  Description: 'Number of unique BOM used to produce this finished good cross business types.'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMIDs.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMIDs.qbl
new file mode 100644
index 0000000..d4dcf3a
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMIDs.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute BOMIDs
+{
+  #keys: '3[157968.0.1171600062][157968.0.1171600061][157968.0.1171600063]'
+  Description: 'Unique BOM IDs used to produce this finished good.'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMIDsCrossBusiness.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMIDsCrossBusiness.qbl
new file mode 100644
index 0000000..e48b8de
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_BOMIDsCrossBusiness.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute BOMIDsCrossBusiness
+{
+  #keys: '3[157968.0.1171600056][157968.0.1171600055][157968.0.1171600057]'
+  Description: 'Unique BOM IDs used to produce this finished good cross business types.'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Attribute_IsLinkedWithFGCrossBusiness.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_IsLinkedWithFGCrossBusiness.qbl
new file mode 100644
index 0000000..2e2ebdc
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Attribute_IsLinkedWithFGCrossBusiness.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsLinkedWithFGCrossBusiness
+{
+  #keys: '3[157968.0.1171600039][157968.0.1171600038][157968.0.1171600040]'
+  Description: 'Updated procedurally for checking whether this object is used to produce a finished good cross business type.'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl
deleted file mode 100644
index f0425fa..0000000
--- a/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl
+++ /dev/null
@@ -1,91 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Method SetIsLinkedWithFinishedGoodAttributes_Recursive (
-  Number depth,
-  Number maxdepth,
-  Global_MappingProduct_MPs productspool,
-  Global_MappingOperations operationspool,
-  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.'
-  TextBody:
-  [*
-    if( not this.IsLinkedWithFinishedGood() )
-    {
-      if( this.ProductMajorType() <> "鎴愬搧" )
-      {
-        uniquebomids_o.Add( this.ID() );
-      }
-      
-      depth := depth + 1;
-      this.IsLinkedWithFinishedGood( true );
-      
-      if( depth <= maxdepth )
-      {
-        operations := selectset( operationspool, Elements, operation,
-                                 not operation.IsLinkedWithFinishedGood()
-                                 and operation.BusinessType() = this.BusinessType()
-                                 and operation.ProductID() = this.ID() );
-        operationspool.Remove( operations );
-        
-        traverse( operations, Elements, operation )
-        {
-          operation.IsLinkedWithFinishedGood( true );
-          
-          operationboms := selectset( operationbomspool, Elements, operationbom,
-                                      not operationbom.IsLinkedWithFinishedGood()
-                                      and operationbom.BusinessType() = operation.BusinessType()
-                                      and operationbom.OrganCode() = operation.OrganCode()
-                                      and operationbom.ProcessSection() = operation.ProcessSection()
-                                      and operationbom.ProductCode() = operation.ProductID() );
-          operationbomspool.Remove( operationboms );
-          
-          traverse( operationboms, Elements, operationbom )
-          {
-            operationbom.IsLinkedWithFinishedGood( true );
-            
-            componentproduct := Global_MappingProduct_MP::FindTypeIndexIDAndBusinessType( operationbom.ComponentCode(),
-                                                                                          operationbom.BusinessType() );
-            
-            if( guard( not componentproduct.IsLinkedWithFinishedGood(), false ) )
-            {
-              productspool.Remove( componentproduct );
-              componentproduct.SetIsLinkedWithFinishedGoodAttributes_Recursive( depth,
-                                                                                maxdepth,
-                                                                                productspool,
-                                                                                operationspool,
-                                                                                operationbomspool,
-                                                                                uniquebomids_o );
-            }
-            
-            if( operationbom.AlternativeMaterialCode() <> ""
-                and operationbom.AlternativeMaterialCode() <> operationbom.ComponentCode() )
-            {
-              alternativeproduct := Global_MappingProduct_MP::FindTypeIndexIDAndBusinessType( operationbom.AlternativeMaterialCode(),
-                                                                                              operationbom.BusinessType() );
-              
-              if( guard( not alternativeproduct.IsLinkedWithFinishedGood(), false ) )
-              {
-                productspool.Remove( alternativeproduct );
-                alternativeproduct.SetIsLinkedWithFinishedGoodAttributes_Recursive( depth,
-                                                                                    maxdepth,
-                                                                                    productspool,
-                                                                                    operationspool,
-                                                                                    operationbomspool,
-                                                                                    uniquebomids_o );
-              }
-            }
-          }
-        }
-      }
-      else
-      {
-        debuginfo( "Product:", this.ID(),
-                   "| BusinessType:", this.BusinessType(),
-                   "| Max depth reached, stop searching... (", depth, ")" );
-      }
-    }
-  *]
-}
diff --git a/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive_DEBUG.qbl b/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive_DEBUG.qbl
new file mode 100644
index 0000000..9dc5d75
--- /dev/null
+++ b/_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive_DEBUG.qbl
@@ -0,0 +1,167 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetIsLinkedWithFinishedGoodAttributes_Recursive_DEBUG (
+  Number depth,
+  Number maxdepth,
+  output Strings uniquebomids_o,
+  Boolean isallowcrossbusinesstype
+)
+{
+  Description: 'Method to traverse the supply chain recursively to determine if there are any products that are not used to produce finished goods.'
+  TextBody:
+  [*
+    info( 'KKK2', this.DefinitionName(), "SetIsLinkedWithFinishedGoodAttributes_Recursive",
+          "| Depth:", depth,
+          "| Product:", this.ID(),
+          "| BusinessType:", this.BusinessType(),
+          "| isallowcrossbusinesstype:", isallowcrossbusinesstype,
+          "| IsLinkedWithFGCrossBusiness:", this.IsLinkedWithFGCrossBusiness(),
+          "| IsLinkedWithFinishedGood:", this.IsLinkedWithFinishedGood() );
+    if( ifexpr( isallowcrossbusinesstype,
+                not this.IsLinkedWithFGCrossBusiness(),
+                not this.IsLinkedWithFinishedGood() ) )
+    {
+      depthlocal := depth + 1;
+      
+      if( uniquebomids_o.Find( this.ID() ) < 0 )
+      {
+        uniquebomids_o.Add( this.ID() );
+      }
+      
+      if( isallowcrossbusinesstype )
+      {
+        this.IsLinkedWithFGCrossBusiness( true );
+      }
+      else
+      {
+        this.IsLinkedWithFinishedGood( true );
+      }
+      
+      if( depthlocal <= maxdepth )
+      {
+        uniquebomids_local := construct( Strings );
+        operations := selectset( this.GlobalOTDTable(), Global_MappingOperation, operation,
+                                 ( isallowcrossbusinesstype
+                                   or operation.BusinessType() = this.BusinessType() )
+                                 and operation.ProductID() = this.ID() );
+        
+        traverse( operations, Elements, operation )
+        {
+          if( isallowcrossbusinesstype )
+          {
+            operation.IsLinkedWithFGCrossBusiness( true );
+          }
+          else
+          {
+            operation.IsLinkedWithFinishedGood( true );
+          }
+          
+          operationboms := selectset( this.GlobalOTDTable(), Global_MappingOperationBOM, operationbom,
+                                      operationbom.BusinessType() = operation.BusinessType()
+                                      and operationbom.OrganCode() = operation.OrganCode()
+                                      and operationbom.ProcessSection() = operation.ProcessSection()
+                                      and operationbom.ProductCode() = operation.ProductID() );
+          
+          traverse( operationboms, Elements, operationbom )
+          {
+            if( isallowcrossbusinesstype )
+            {
+              operationbom.IsLinkedWithFGCrossBusiness( true );
+            }
+            else
+            {
+              operationbom.IsLinkedWithFinishedGood( true );
+            }
+            
+            traverse( this.GlobalOTDTable(), Global_MappingProduct_MP, componentproduct,
+                      componentproduct.ID() = operationbom.ComponentCode()
+                      and ( isallowcrossbusinesstype
+                            or componentproduct.BusinessType() = operationbom.BusinessType() ) )
+            {
+              componentproduct.SetIsLinkedWithFinishedGoodAttributes_Recursive_DEBUG( depthlocal,
+                                                                                maxdepth,
+                                                                                uniquebomids_local,
+                                                                                isallowcrossbusinesstype );
+            }
+            
+            if( operationbom.AlternativeMaterialCode() <> ""
+                and operationbom.AlternativeMaterialCode() <> operationbom.ComponentCode() )
+            {
+              traverse( this.GlobalOTDTable(), Global_MappingProduct_MP, alternativeproduct,
+                        alternativeproduct.ID() = operationbom.AlternativeMaterialCode()
+                        and ( isallowcrossbusinesstype
+                              or alternativeproduct.BusinessType() = operationbom.BusinessType() ) )
+              {
+                alternativeproduct.SetIsLinkedWithFinishedGoodAttributes_Recursive_DEBUG( depthlocal,
+                                                                                    maxdepth,
+                                                                                    uniquebomids_local,
+                                                                                    isallowcrossbusinesstype );
+              }
+            }
+            
+            info( 'KKK2', this.DefinitionName(), "SetIsLinkedWithFinishedGoodAttributes_Recursive",
+                  "| Depth:", depthlocal - 1,
+                  "| BusinessType:", operation.BusinessType(),
+                  "| OrganCode:", operation.OrganCode(),
+                  "| ProcessSection:", operation.ProcessSection(),
+                  "| ProductID:", operation.ProductID(),
+                  "| isallowcrossbusinesstype:", isallowcrossbusinesstype,
+                  "| IsLinkedWithFGCrossBusiness:", this.IsLinkedWithFGCrossBusiness(),
+                  "| IsLinkedWithFinishedGood:", this.IsLinkedWithFinishedGood(),
+                  "| UniqueBOMIDs:", uniquebomids_local.Unique().ToString( ";" ) );
+          }
+        }
+        
+        uniquebomids := uniquebomids_local.Unique().Difference( this.ID() );
+        
+        if( isallowcrossbusinesstype )
+        {
+          this.BOMCountCrossBusiness( uniquebomids.Size() );
+          this.BOMIDsCrossBusiness( uniquebomids.ToString( ";" ) );
+        }
+        else
+        {
+          this.BOMCount( uniquebomids.Size() );
+          this.BOMIDs( uniquebomids.ToString( ";" ) );
+        }
+        
+        traverse( uniquebomids, Elements, uniquebomid,
+                  uniquebomids_o.Find( uniquebomid ) < 0 )
+        {
+          uniquebomids_o.Add( uniquebomid );
+        }
+      }
+      else
+      {
+        debuginfo( "Product:", this.ID(),
+                   "| BusinessType:", this.BusinessType(),
+                   "| IsAllowCrossBusinessType:", isallowcrossbusinesstype,
+                   "| Max depth reached, stop searching... (", depth, ")" );
+      }
+    }
+    else
+    {
+      if( uniquebomids_o.Find( this.ID() ) < 0 )
+      {
+        uniquebomids_o.Add( this.ID() );
+      }
+      
+      uniquebomids := construct( Strings );
+                
+      if( isallowcrossbusinesstype )
+      {
+        uniquebomids := this.BOMIDsCrossBusiness().Tokenize( ";" );
+      }
+      else
+      {
+        uniquebomids := this.BOMIDs().Tokenize( ";" );
+      }
+      
+      traverse( uniquebomids, Elements, uniquebomid,
+                uniquebomids_o.Find( uniquebomid ) < 0 )
+      {
+        uniquebomids_o.Add( uniquebomid );
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_MacroPlan/Method_OnCreate.qbl b/_Main/BL/Type_MacroPlan/Method_OnCreate.qbl
new file mode 100644
index 0000000..3c1e101
--- /dev/null
+++ b/_Main/BL/Type_MacroPlan/Method_OnCreate.qbl
@@ -0,0 +1,100 @@
+Quintiq file version 2.0
+#parent: #root
+Method OnCreate #extension
+{
+  TextBody:
+  [*
+    this.DatasetName( this.MDSMacroPlan().Name() );
+    //Create related object
+    // Initialize sanitycheck group
+    SanityCheckGroup::CreateSanityCheckGroups( this );
+    //Initialize calendar registry
+    this.InitializeCalendarRegistry();
+    
+    /* isfromdb is set to true so that default objects are created with
+       IsManuallyConfigured = false
+    */
+    isfromdb := true;
+    
+    // Period parameters
+    start := DateTime::ActualTime().StartOfYear();
+    PeriodParameter_MP::Create( '1',
+                                this,
+                                start,
+                                isfromdb );
+    
+    // GlobalParameters
+    this.GlobalParameters_MP( relnew, ID := '1', PeriodSpecificationForUnitActual := GlobalParameters_MP::GetDefaultPeriodSpecification() );
+    
+    // Create resource manager where it contains certain limit of data, applicable to 3ds cloud
+    this.ResourceManager_MP( relnew );
+    this.UpdateSizingParameterStatus();
+    
+    this.SmartPlanSetting( relnew );
+    this.IDHolder( relnew );
+    
+    // Create default sales segment
+    SalesSegment_MP::Create( this, null(SalesSegment_MP), GlobalParameters_MP::GetDefaultSalesSegment(), 0, isfromdb );
+    
+    // Create default period specification
+    PeriodSpecification_MP::Create( GlobalParameters_MP::GetDefaultPeriodSpecification(), 
+                                    this, GlobalParameters_MP::GetDefaultPeriodSpecTimeUnit(), 
+                                    1, 
+                                    DateTime::Now().StartOfYear(), 12, 18, isfromdb,
+                                    true,
+                                    false );
+    
+    // Create dummy period specification for leading periods
+    PeriodSpecification_MP::Create( GlobalParameters_MP::GetDefaultPlanningPeriodSpecification(), 
+                                    this, "", 
+                                    0, 
+                                    DateTime::Now().StartOfYear(), 0, 0, false,
+                                    false,
+                                    true );
+    
+    isproductcategory := false;
+    ProductLevel_MP::Create( GlobalParameters_MP::GetProductRoot(), isproductcategory, this, isfromdb );
+    SalesLevel_MP::Create( GlobalParameters_MP::GetRegionRoot(), this, isfromdb );
+    
+    this.CreateDefaultPriority();
+    
+    this.MPVersion( DomainModel::Domain().Version().Version() );
+    
+    rcv := RoutingConfiguratorView::Create( this.IDHolder().GetRoutingConfiguratorViewID(), this );
+    this.IDHolder().RoutingConfiguratorViewID( [Number]rcv.ID() )
+    
+    SCVConfiguration::Create( this );
+    
+    UnitOfMeasure_MP::CreateDefaultUOM( this );
+    Currency_MP::CreateBaseCurrency( this );
+    
+    // Create account cost drivers
+    AccountCostDriver::CreateAccountCostDrivers( this );
+    
+    // Create default shiftpattern
+    ShiftPattern::CreateDefaultShiftPattern( this );
+    
+    // DataExchangeFramework
+    dtd := DataTransformationDefinition::Create( this );
+    DataTransformationManufacturingDemand::Create( dtd );
+    
+    // Create MacroPlanPTF object
+    MacroPlanPTF::Create( this );
+    
+    // Create wizard manager
+    this.WizardManager( relnew, Id := "" );
+    
+    this.PreliminaryFeature( relnew );
+    
+    this.SetTime();
+    
+    // Create wizard for supply chain initialization
+    this.CreateSupplyChainWizard();
+    
+    // MEIO parameters
+    this.MEIO_Parameters( relnew );
+    
+    // Create World puzzle
+    this.FindCreateWorldPuzzle();
+  *]
+}
diff --git a/_Main/BL/Type_PriorityFactor/Method_CreatePrioitifyFacotrDetail.qbl b/_Main/BL/Type_PriorityFactor/Method_CreatePrioitifyFacotrDetail.qbl
new file mode 100644
index 0000000..1758e80
--- /dev/null
+++ b/_Main/BL/Type_PriorityFactor/Method_CreatePrioitifyFacotrDetail.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Method CreatePrioitifyFacotrDetail (
+  String PriorityFactoryDetailName,
+  String GradeTarget,
+  Boolean isRange,
+  String RangeMax,
+  String RangeMin,
+  String GradeDesc
+)
+{
+  TextBody: '// Akari Nov-7-2023 (created)'
+}
diff --git a/_Main/BL/Type_PriorityFactor/StaticMethod_InitData.qbl b/_Main/BL/Type_PriorityFactor/StaticMethod_InitData.qbl
index 6149423..da99caa 100644
--- a/_Main/BL/Type_PriorityFactor/StaticMethod_InitData.qbl
+++ b/_Main/BL/Type_PriorityFactor/StaticMethod_InitData.qbl
@@ -36,7 +36,7 @@
           
           traverse( priorityFactorList,Elements,e)
           {
-              PriorityFactorDetails::InitData( owner,e); 
+              PriorityFactorDetail::InitData( owner,e); 
           }
     
     }
diff --git a/_Main/BL/Type_PriorityFactorDetails/StaticMethod_GetDataByPriorityFactor.qbl b/_Main/BL/Type_PriorityFactorDetails/StaticMethod_GetDataByPriorityFactor.qbl
index c05523a..b27e4a5 100644
--- a/_Main/BL/Type_PriorityFactorDetails/StaticMethod_GetDataByPriorityFactor.qbl
+++ b/_Main/BL/Type_PriorityFactorDetails/StaticMethod_GetDataByPriorityFactor.qbl
@@ -3,14 +3,14 @@
 StaticMethod GetDataByPriorityFactor (
   PriorityFactor priorityFactor,
   MacroPlan owner
-) as owning PriorityFactorDetailss
+) as owning PriorityFactorDetails
 {
   Description: '鏍规嵁浜嬩紭鍏堢骇鍥犲瓙鑾峰彇浼樺厛绾у洜瀛愮粏鍒嗛泦鍚�'
   TextBody:
   [*
     // NBoTk Sep-18-2023 (created)
     
-    list := selectset( owner,PriorityFactor.PriorityFactorDetails,p,
+    list := selectset( owner,PriorityFactor.PriorityFactorDetail,p,
                        p.BusinessType() = priorityFactor.BusinessType() and priorityFactor.Name() = p.PriorityFactorName()
                        );
     
diff --git a/_Main/BL/Type_PriorityFactorDetails/StaticMethod_InitData.qbl b/_Main/BL/Type_PriorityFactorDetails/StaticMethod_InitData.qbl
index d015c1f..eadd506 100644
--- a/_Main/BL/Type_PriorityFactorDetails/StaticMethod_InitData.qbl
+++ b/_Main/BL/Type_PriorityFactorDetails/StaticMethod_InitData.qbl
@@ -18,85 +18,85 @@
     
     if( priorityFactor.Name() = "澶у紶鐩堝埄姘村钩" )
     {
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
                                             IsRange := false,GradingName := "澶х泩",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
                                                 IsRange := false,GradingName := "灏忕泩",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 0,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 0,
                                                 IsRange := false,GradingName := "鎸佸钩",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := -3,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := -3,
                                                 IsRange := false,GradingName := "灏忎簭",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := -5,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := -5,
                                                 IsRange := false,GradingName := "澶т簭",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
     }
     
     if( priorityFactor.Name() = "瀹㈡埛绛栫暐" )
     {
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
                                             IsRange := false,GradingName := "81%鈮鈮�100%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4,
                                                 IsRange := false,GradingName := "61%鈮鈮�80%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
                                                 IsRange := false,GradingName := "41%鈮鈮�60%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 2,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 2,
                                                 IsRange := false,GradingName := "21%鈮鈮�40%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
                                                 IsRange := false,GradingName := "1%鈮鈮�20%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
     }
     
     if( priorityFactor.Name() = "缁嗗垎甯傚満绛夌骇" )
     {
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
                                             IsRange := false,GradingName := "鎴樼暐",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
                                                 IsRange := false,GradingName := "閲嶇偣",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
                                                 IsRange := false,GradingName := "娼滃姏",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
     }
     
     if( priorityFactor.Name() = "璁㈠崟涓嬪崟鏃堕棿" )
     {
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
                                             IsRange := false,GradingName := "120",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4,
                                                 IsRange := false,GradingName := "90",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
                                                 IsRange := false,GradingName := "60",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 2,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 2,
                                                 IsRange := false,GradingName := "30",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
                                                 IsRange := false,GradingName := "0",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
     }
     
     if( priorityFactor.Name() = "闇�姹傜被鍨�" )
     {
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
                                             IsRange := false,GradingName := "鏈夐娴�",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
                                                 IsRange := false,GradingName := "鏃犻娴�",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
                                                 IsRange := false,GradingName := "绾娴�",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
     }
     
     if( priorityFactor.Name() = "瀹㈡埛绛夌骇" )
     {
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
                                             IsRange := false,GradingName := "鎴樼暐",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
                                                 IsRange := false,GradingName := "閲嶇偣",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
                                                 IsRange := false,GradingName := "娼滃姏",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
     }
     
     if( priorityFactor.Name() = "DOI" or priorityFactor.Name() = "DSI")
     {
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
                                             IsRange := false,GradingName := "<7",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
                                                 IsRange := false,GradingName := "<15",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
                                                 IsRange := false,GradingName := "<30",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
-        priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
+        priorityFactor.PriorityFactorDetail(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1,
                                                 IsRange := false,GradingName := ">30",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());                                                                                     
     }
   *]
diff --git a/_Main/BL/Type_PriorityFactorDetails/_ROOT_Type_PriorityFactorDetails.qbl b/_Main/BL/Type_PriorityFactorDetails/_ROOT_Type_PriorityFactorDetail.qbl
similarity index 75%
rename from _Main/BL/Type_PriorityFactorDetails/_ROOT_Type_PriorityFactorDetails.qbl
rename to _Main/BL/Type_PriorityFactorDetails/_ROOT_Type_PriorityFactorDetail.qbl
index 0551401..1ada706 100644
--- a/_Main/BL/Type_PriorityFactorDetails/_ROOT_Type_PriorityFactorDetails.qbl
+++ b/_Main/BL/Type_PriorityFactorDetails/_ROOT_Type_PriorityFactorDetail.qbl
@@ -1,10 +1,10 @@
 Quintiq file version 2.0
 #root
 #parent: #DomainModel
-Type PriorityFactorDetails
+Type PriorityFactorDetail
 {
   #keys: '5[414382.0.440655013][414382.0.440655011][0.0.0][414382.0.440655012][414382.0.440655014]'
   BaseType: Object
   Description: '浼樺厛绾у洜瀛愮粏鍒�'
-  StructuredName: 'PriorityFactorDetailss'
+  StructuredName: 'PriorityFactorDetails'
 }
diff --git a/_Main/BL/Type_PriorityResult/Function_CalcPriorityResultScore.qbl b/_Main/BL/Type_PriorityResult/Function_CalcPriorityResultScore.qbl
deleted file mode 100644
index cd7846f..0000000
--- a/_Main/BL/Type_PriorityResult/Function_CalcPriorityResultScore.qbl
+++ /dev/null
@@ -1,21 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Function CalcPriorityResultScore
-{
-  TextBody:
-  [*
-    // NBoTk Sep-21-2023 (created)
-    
-    businessTypeScore := max( this,PriorityResultBusinessTypeDetail,p,
-                              p.PriorityTotalScore()
-                              );
-    
-    groupScore := max( this,PriorityResultGroupDetail,p,
-                       p.PriorityTotalScore()
-                       );
-    
-    value := maxvalue( businessTypeScore,groupScore);
-    
-    this.PriorityResultScore( value );
-  *]
-}
diff --git a/_Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl b/_Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl
index d1f8df9..2372923 100644
--- a/_Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl
+++ b/_Main/BL/Type_PriorityResult/StaticMethod_GetDetailsValue.qbl
@@ -32,7 +32,7 @@
     {
             if( "瀹㈡埛绛栫暐" =  priorityFactor.Name())
             {
-                 obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "瀹㈡埛绛栫暐" and p.GradingName() = customerOrder.CustomerPolicy());
+                 obj := selectobject( priorityFactor,PriorityFactorDetail,p , p.PriorityFactorName() = "瀹㈡埛绛栫暐" and p.GradingName() = customerOrder.CustomerPolicy());
                  gradeTarget := 1.0;
                  if( not isnull( obj ) )
                  {
@@ -43,7 +43,7 @@
             
             if( "澶у紶鐩堝埄姘村钩" =  priorityFactor.Name())
             {
-                 obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "澶у紶鐩堝埄姘村钩" and  p.GradingName() = customerOrder.SheetProfitability());
+                 obj := selectobject( priorityFactor,PriorityFactorDetail,p , p.PriorityFactorName() = "澶у紶鐩堝埄姘村钩" and  p.GradingName() = customerOrder.SheetProfitability());
                  gradeTarget := 1.0;
                  if( not isnull( obj ) )
                  {
@@ -78,7 +78,7 @@
             
             if( "缁嗗垎甯傚満绛夌骇" =  priorityFactor.Name())
             {
-                 obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "缁嗗垎甯傚満绛夌骇" and p.GradingName() = customerOrder.SegmentPriority());
+                 obj := selectobject( priorityFactor,PriorityFactorDetail,p , p.PriorityFactorName() = "缁嗗垎甯傚満绛夌骇" and p.GradingName() = customerOrder.SegmentPriority());
                  gradeTarget := 1.0;
                  if( not isnull( obj ) )
                  {
@@ -90,7 +90,7 @@
             if( "闇�姹傜被鍨�" =  priorityFactor.Name())
             {     
                 // 鏈夐娴� 鏃犻娴� 绾娴�
-                 obj := selectobject( priorityFactor,PriorityFactorDetails,p,p.GradingName() = customerOrder.OrderType());
+                 obj := selectobject( priorityFactor,PriorityFactorDetail,p,p.GradingName() = customerOrder.OrderType());
                  gradeTarget := 1.0;
                  if( not isnull( obj ) )
                  {
@@ -116,8 +116,8 @@
                  // 涓嬪崟鏃堕棿
                  orderTime := customerOrder.OrderTime();
                  days := orderTime.TotalInDays() - customerOrder.EndDate().TotalInDays();
-                 obj := null( PriorityFactorDetails);
-                 sortDetail := selectsortedset( priorityFactor,PriorityFactorDetails,p,[Number]p.GradingName());
+                 obj := null( PriorityFactorDetail);
+                 sortDetail := selectsortedset( priorityFactor,PriorityFactorDetail,p,[Number]p.GradingName());
                  traverse( sortDetail,Elements,e )
                  {
                        if( days >= [Number]e.GradingName() )
diff --git a/_Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl b/_Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl
index c8cc95d..bfd7213 100644
--- a/_Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl
+++ b/_Main/BL/Type_PriorityResult/StaticMethod_calculatePriorityResult.qbl
@@ -12,15 +12,13 @@
     // NBoTk Sep-26-2023 (created)
     
     // 鍏堝垹闄ゅ巻鍙茬殑璺戝垎璇︽儏
-    traverse( macroPlan,PriorityResult,p)
-    {
+    traverse( macroPlan,PriorityResult,p){
           p.PriorityResultBusinessTypeDetail(relflush );
           p.Delete(); 
     }
     
     // 璁$畻瀹㈡埛璁㈠崟鐨勪紭鍏堢骇寰楀垎 鍥炲~鏉冮噸鏁版嵁 鐢熸垚鏂扮殑Priority鏄庣粏鏁版嵁
-    traverse( macroPlan,SalesDemand.astype( CustomerOrder ),e)
-    {
+    traverse( macroPlan,SalesDemand.astype( CustomerOrder ),e){
          // 浜嬩笟閮ㄤ俊鎭�
          businessType := e.BusinessType();
          
@@ -34,100 +32,72 @@
          priorityResult := macroPlan.PriorityResult(relnew,CustomerOrderID := e.ID(),BusinessType := businessType,Customer := e.CustomerName(),CustomerID := e.CustomerID(),
                                                      DemandDate := e.EndDate(),ProductID := e.ProductID(),Quantity := e.Quantity(),SalesSegmentName := e.SalesSegmentName(),
                                                      StockingPointID := e.StockingPointID(),UnitOfMeasureName := e.UnitOfMeasureName()
-                                                     );    
-           
+                                                     );
+         priorityResult.CustomerOrder(relset, e);
          // 鍒ゆ柇鏄泦鍥� 杩樻槸浜嬩笟閮�
-         if( businessType.FindString( "闆嗗洟",0 ) <> -1)
-         {
+         if( businessType.FindString( "闆嗗洟",0 ) <> -1){
               priorityResult.PriorityResultGroupDetail( relnew,BusinessType := businessType,Customer := e.CustomerName(),CustomerID := e.CustomerID(),
                                                         DemandDate := e.EndDate(),PriorityPolicyName := priorityPolicyName,PriorityResultScore := value,
                                                         Quantity := e.Quantity(),SalesSegmentName := e.SalesSegmentName(),StockingPointID := e.StockingPointID(),
                                                         UnitOfMeasureName := e.UnitOfMeasureName(),PriorityTotalScore := value
                                                         );
-         }
-         else
-         {
+         }else{
                priorityResult.PriorityResultBusinessTypeDetail( relnew,BusinessType := businessType,Customer := e.CustomerName(),CustomerID := e.CustomerID(),
                                                                 DemandDate := e.EndDate(),PriorityPolicyName := priorityPolicyName,PriorityResultScore := value,
                                                                 Quantity := e.Quantity(),SalesSegmentName := e.SalesSegmentName(),StockingPointID := e.StockingPointID(),
                                                                 UnitOfMeasureName := e.UnitOfMeasureName(),PriorityTotalScore := value 
                                                                 );      
-         }                                                                                                                                       
+         }
     }
     
     // 浼樺厛绾у洜瀛愬鐞嗗畬鎴愬悗 鎺掑簭鍥炲~鏁版嵁
+    
+    traverse( macroPlan,PriorityResult,e){
+      businessTypeScore := max( e,PriorityResultBusinessTypeDetail,p,
+                                p.PriorityTotalScore()
+                                );
+    
+      groupScore := max( e,PriorityResultGroupDetail,p,
+                         p.PriorityTotalScore()
+                         );
+      value := maxvalue( businessTypeScore,groupScore);
+      e.PriorityResultScore( value );
+    }
+    
     resultList := selectsortedset( macroPlan,PriorityResult,result,
                                    true,
-                                   result.PriorityResultScore()
+                                   -result.PriorityResultScore()
                                    )
     
-    // Quintiq浼樺厛绾у垎10绾� 闇�瑕佸垎娈佃绠� 鍚戜笂鍙栨暣
-    subLevel := round( resultList.Size() div 10);
-    subLevelCount := 0;
+    // Quintiq浼樺厛绾у垎10绾� 闇�瑕佸垎娈佃绠� 鍚戜笅鍙栨暣
+    if( resultList.Size() >= 10){
+        subListSize := resultList.Size() div 10;
+        overListSize := resultList.Size() mod 10;
     
-    priorityValue := 1;
-    if( resultList.Size() <= 10 )
-    {
-        traverse( resultList,Elements,e)
-        {
-            obj := selectobject( macroPlan,SalesDemand.astype( CustomerOrder ),order, 
-                         order.ID() = e.CustomerOrderID()
-                         );
-                         
-            // 璁㈠崟鏁版嵁涓嶄负绌哄啀鍋氬鐞�
-            if( not isnull( obj ) )
-            {
-                  obj.PriorityName([String]priorityValue);
-                  
-                  // 鍒涘缓浼樺厛绾ф暟鎹� 闇�瑕佸厛娓呴櫎涓婁竴娆$殑璁$畻缁撴灉
-                  // 鍒ゆ柇褰撳墠customerOrder鏄惁瀛樺湪
-                  oldPriority := selectobject( macroPlan,Priority,p,p.Name() = [String]priorityValue);
-                  if(isnull( oldPriority ) )
-                  {
-                        macroPlan.Priority(relnew,Weight := priorityValue,Name := [String]priorityValue);
-                  }        
+        count := 10;
+        point := 10;
+        count1 := 0;
+        flag := 0;
+        for( i := 0 ; i < resultList.Size() - overListSize ; i := i + subListSize){
+            subListCopy := subListSize;
+            if (count <= overListSize){
+                subListCopy := subListCopy + 1;
+                flag := flag + 1;
             }
-            
-            // 鍒ゆ柇璁$畻鍒嗘鏁伴噺涓嶲uintiq鍘熷浼樺厛绾�
-            //浼樺厛绾�+1
-            priorityValue := priorityValue + 1;
+            for( j := 0;j < subListCopy ; j++){
+                element := resultList.Element( count1 * subListSize + j + flag );
+                element.CustomerOrder().PriorityName( [String]point );
+            }
+            point --;
+            count --;
+            count1++;
         }
-    }
-    else
-    {
-        traverse( resultList,Elements,e)
-        {
-            obj := selectobject( macroPlan,SalesDemand.astype( CustomerOrder ),order, 
-                                 order.ID() = e.CustomerOrderID()
-                                 );
-            
-            // 璁㈠崟鏁版嵁涓嶄负绌哄啀鍋氬鐞�
-            if( not isnull( obj ) )
-            {
-                  obj.PriorityName([String]priorityValue);
-                  
-                  // 鍒涘缓浼樺厛绾ф暟鎹� 闇�瑕佸厛娓呴櫎涓婁竴娆$殑璁$畻缁撴灉
-                  // 鍒ゆ柇褰撳墠customerOrder鏄惁瀛樺湪
-                  oldPriority := selectobject( macroPlan,Priority,p,p.Name() = [String]priorityValue);
-                  if(isnull( oldPriority ) )
-                  {
-                        macroPlan.Priority(relnew,Weight := priorityValue,Name := [String]priorityValue);
-                  }        
-            }
-        
-            // 鍒ゆ柇璁$畻鍒嗘鏁伴噺涓嶲uintiq鍘熷浼樺厛绾�
-            subLevelCount := subLevelCount + 1;
-            if( subLevelCount = subLevel )
-            {
-                // 褰撳埌杈惧垎娈垫暟閲忓悗 浼樺厛绾�+1 鍒嗘璁℃暟浠�0寮�濮�
-                if( priorityValue < 10 )
-                {
-                      priorityValue := priorityValue + 1;
-                }
-                subLevelCount := 0;
-            }
-        }
-    
+    }else {
+      point := 10;
+      traverse( resultList,Elements,element){
+        element.CustomerOrder().PriorityName([String]point);
+        point --;
+      }
     }
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Component_pnlContent.def
index d907ade..d449667 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Component_pnlContent.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Component_pnlContent.def
@@ -39,6 +39,36 @@
         Taborder: 2
       ]
     }
+    Component NewFlag
+    {
+      #keys: '[414996.0.58138242]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Taborder: 3
+        Visible: false
+      ]
+    }
+    Component EditFlag
+    {
+      #keys: '[414996.0.60522350]'
+      BaseType: 'WebCheckbox'
+      Properties:
+      [
+        Taborder: 4
+        Visible: false
+      ]
+    }
+    Component PriorityFactorNameCache
+    {
+      #keys: '[414996.0.60522537]'
+      BaseType: 'WebLabel'
+      Properties:
+      [
+        Taborder: 5
+        Visible: false
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_ClickBtnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_ClickBtnOK.def
index cb1792b..71e7e33 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_ClickBtnOK.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_ClickBtnOK.def
@@ -5,7 +5,6 @@
   #keys: '[414382.0.464433014]'
   Body:
   [*
-    
     btnOk.Enabled(false,'');
     
     // OnOk
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_New.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_New.def
index a0e37ff..94a1718 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_New.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Method_New.def
@@ -13,6 +13,8 @@
     
     DataHolderEditPriorityFactor.Data(&data);
     
+    NewFlag.Checked( true );
+    
     ApplicationMacroPlanner.ShowFormModal( this );
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlActions_btnOk_OnClick.def
index 8d24e23..c2a2b92 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlActions_btnOk_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlActions_btnOk_OnClick.def
@@ -7,23 +7,43 @@
   Precondition:
   [*
     feedback := Translations::FilllingCapacity_ValidateInput();
-    checkValue := not Coefficient.Text() = ''
+    checkValue := not Coefficient.Text() = '' and not PriorityFactorName.Text() = '';
     
-    if(not checkValue )
-    {
+    if(not checkValue ){
       feedback := Translations::PriorityFactor_CheckNameValid();
       editData := DataHolderEditPriorityFactor.Data();
       checkValue := not PriorityFactor::CheckNameValid( MacroPlan,editData.BusinessType(),[Real]Coefficient.Text(),PriorityFactorName.Text(),Desc.Text());
-    
     }
-    
+    if( PriorityFactorName.Text() = ''){
+      feedback := Translations::PriorityFactor_CheckNameNull();
+    }
     return checkValue
   *]
   QuillAction
   {
     Body:
     [*
-      Form.ClickBtnOK();
+      if( NewFlag.Checked() ){
+       // New
+        repeatOne := select( MacroPlan,PriorityFactor,pf,pf.Name() = PriorityFactorName.Text());
+        if( not isnull( repeatOne )){
+          WebMessageBox::Error( Translations::PriorityFactor_CheckNameValid() ); 
+        }else{
+          Form.ClickBtnOK();
+        }
+      }else {
+              if (EditFlag.Checked() and PriorityFactorNameCache.Text() <>PriorityFactorName.Text()){
+                  // Edit
+                  repeatOne:=select(MacroPlan, PriorityFactor, pf, pf.Name() = PriorityFactorName.Text());
+                  if (not isnull(repeatOne)){
+                      WebMessageBox::Error (Translations::PriorityFactor_CheckNameValid () );
+                  }else{
+                      Form.ClickBtnOK();
+                  }
+              }else{
+                  Form.ClickBtnOK();
+              }
+      }
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlContent_PriorityFactorName_OnChanged.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlContent_PriorityFactorName_OnChanged.def
new file mode 100644
index 0000000..d785d22
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlContent_PriorityFactorName_OnChanged.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: pnlContent/PriorityFactorName
+Response OnChanged () id:Response_pnlContent_PriorityFactorName_OnChanged
+{
+  #keys: '[414996.0.58353845]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebEditField_OnChanged'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      if( not EditFlag.Checked()){
+        PriorityFactorNameCache.Text(PriorityFactorName.Text());
+      }
+      EditFlag.Checked(true);
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Component_pnlContent.def
index 8f09095..1f2cbd2 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Component_pnlContent.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Component_pnlContent.def
@@ -11,7 +11,7 @@
       BaseType: 'WebEditField'
       Properties:
       [
-        DataBinding: 'DataHolderEditPriorityFactorDetails.Data.GradeTarget'
+        DataBinding: 'DataHolderEditPriorityFactorDetail.Data.GradeTarget'
         Label: '鍒嗙骇鐩爣鍊�'
         Taborder: 2
       ]
@@ -22,7 +22,7 @@
       BaseType: 'WebCheckbox'
       Properties:
       [
-        DataBinding: 'DataHolderEditPriorityFactorDetails.Data.IsRange'
+        DataBinding: 'DataHolderEditPriorityFactorDetail.Data.IsRange'
         Label: '鍒嗙骇鑼冨洿:'
         Taborder: 3
       ]
@@ -33,7 +33,7 @@
       BaseType: 'WebEditField'
       Properties:
       [
-        DataBinding: 'DataHolderEditPriorityFactorDetails.Data.RangeMax'
+        DataBinding: 'DataHolderEditPriorityFactorDetail.Data.RangeMax'
         Label: '鏈�澶у��'
         Taborder: 4
         Visible: false
@@ -45,7 +45,7 @@
       BaseType: 'WebEditField'
       Properties:
       [
-        DataBinding: 'DataHolderEditPriorityFactorDetails.Data.RangeMin'
+        DataBinding: 'DataHolderEditPriorityFactorDetail.Data.RangeMin'
         Label: '鏈�灏忓��'
         ReadOnly: true
         Taborder: 6
@@ -57,7 +57,7 @@
       BaseType: 'WebEditField'
       Properties:
       [
-        DataBinding: 'DataHolderEditPriorityFactorDetails.Data.GradeDesc'
+        DataBinding: 'DataHolderEditPriorityFactorDetail.Data.GradeDesc'
         FixedSize: false
         Label: '鎻忚堪'
         SizeRatio: 3
@@ -70,20 +70,9 @@
       BaseType: 'WebLabel'
       Properties:
       [
-        DataBinding: 'DataHolderEditPriorityFactorDetails.Data.PriorityFactorName'
+        DataBinding: 'DataHolderEditPriorityFactorDetail.Data.PriorityFactor.Name'
         Label: '浼樺厛绾у洜瀛�'
         Taborder: 0
-      ]
-    }
-    Component PriorityFactorDetailsName
-    {
-      #keys: '[414382.0.486013052]'
-      BaseType: 'WebLabel'
-      Properties:
-      [
-        DataBinding: 'DataHolderEditPriorityFactorDetails.Data.GradingName'
-        Label: '缁嗗垎鍚嶇О'
-        Taborder: 1
       ]
     }
     Component RangeMaxTest
@@ -107,6 +96,17 @@
         Taborder: 7
       ]
     }
+    Component PriorityFactorDetailsName
+    {
+      #keys: '[414996.0.36000637]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        DataBinding: 'DataHolderEditPriorityFactorDetail.Data.GradingName'
+        Label: '缁嗗垎鍚嶇О'
+        Taborder: 1
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_ClickBtnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_ClickBtnOK.def
index 2fa33f1..7d12c30 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_ClickBtnOK.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_ClickBtnOK.def
@@ -1,15 +1,17 @@
 Quintiq file version 2.0
 #parent: #root
-Method ClickBtnOK () id:Method_DialogEditPriorityFactorDetails_ClickBtnOK
+Method ClickBtnOK () id:Method_DialogEditPriorityFactorDetail_ClickBtnOK
 {
   #keys: '[414382.0.482495783]'
   Body:
   [*
     btnOk.Enabled(false,'');
     
+    
     // OnOk
     this.ApplyChanges();
-    DataHolderEditPriorityFactorDetails.Data().Commit();
+    DataHolderEditPriorityFactorDetail.Data( ).Commit();
+    
     this.Close();
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_Edit.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_Edit.def
index 512f652..b272824 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_Edit.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_Edit.def
@@ -1,8 +1,8 @@
 Quintiq file version 2.0
 #parent: #root
 Method Edit (
-  PriorityFactorDetails selection
-) id:Method_DialogEditPriorityFactorDetails_Edit
+  PriorityFactorDetail selection
+) id:Method_DialogEditPriorityFactorDetail_Edit
 {
   #keys: '[414382.0.482495781]'
   Body:
@@ -13,8 +13,8 @@
     {
         isRange.Checked(true);
     }
-    
-    DataHolderEditPriorityFactorDetails.Data( &data);
+    PriorityFactorDetailsName.Enabled( false,"" );
+    DataHolderEditPriorityFactorDetail.Data( &data );
     ApplicationMacroPlanner.ShowFormModal( this );
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_New.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_New.def
new file mode 100644
index 0000000..914b8a7
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Method_New.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method New (
+  PriorityFactor owner
+) id:Method_DialogEditPriorityFactorDetail_New
+{
+  #keys: '[414996.0.35320212]'
+  Body:
+  [*
+    data := owner.PriorityFactorDetail(relshadow);
+    
+    DataHolderEditPriorityFactorDetail.Data( &data );
+    
+    ApplicationMacroPlanner.ShowFormModal( this );
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnChanged.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnChanged.def
index 06616ab..93d57eb 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnChanged.def
@@ -20,9 +20,9 @@
           RangeMax.Visible(false);
           RangeMin.Visible(false);
           RangeMaxTest.Visible(true) 
-          RangeMaxTest.Text([String]DataHolderEditPriorityFactorDetails.Data().RangeMax());
+          RangeMaxTest.Text([String]DataHolderEditPriorityFactorDetail.Data().RangeMax());
           RangeMinText.Visible(true) 
-          RangeMinText.Text([String]DataHolderEditPriorityFactorDetails.Data().RangeMin());
+          RangeMinText.Text([String]DataHolderEditPriorityFactorDetail.Data().RangeMin());
       }
     *]
     GroupServerCalls: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnCreated.def
index ad0f874..76e527b 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnCreated.def
@@ -20,9 +20,9 @@
           RangeMax.Visible(false);
           RangeMin.Visible(false);
           RangeMaxTest.Visible(true) 
-          RangeMaxTest.Text([String]DataHolderEditPriorityFactorDetails.Data().RangeMax());
+          RangeMaxTest.Text([String]DataHolderEditPriorityFactorDetail.Data().RangeMax());
           RangeMinText.Visible(true) 
-          RangeMinText.Text([String]DataHolderEditPriorityFactorDetails.Data().RangeMin());
+          RangeMinText.Text([String]DataHolderEditPriorityFactorDetail.Data().RangeMin());
       }
     *]
     GroupServerCalls: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/_ROOT_Component_DialogEditPriorityFactorDetails.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/_ROOT_Component_DialogEditPriorityFactorDetail.def
similarity index 71%
rename from _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/_ROOT_Component_DialogEditPriorityFactorDetails.def
rename to _Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/_ROOT_Component_DialogEditPriorityFactorDetail.def
index 3668b68..c85ff9d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/_ROOT_Component_DialogEditPriorityFactorDetails.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/_ROOT_Component_DialogEditPriorityFactorDetail.def
@@ -1,7 +1,7 @@
 Quintiq file version 2.0
 #root
 #parent: MacroPlannerWebApp
-OrphanComponent DialogEditPriorityFactorDetails
+OrphanComponent DialogEditPriorityFactorDetail
 {
   #keys: '[414382.0.482374517]'
   BaseType: 'WebForm'
@@ -9,11 +9,11 @@
   [
     #child: pnlContent
     #child: pnlActions
-    Component DataHolderEditPriorityFactorDetails
+    Component DataHolderEditPriorityFactorDetail
     {
-      #keys: '[414382.0.482495927]'
+      #keys: '[414996.0.38864386]'
       BaseType: 'WebDataHolder'
-      Databinding: 'shadow[PriorityFactorDetails]*'
+      Databinding: 'shadow[PriorityFactorDetail]*'
       Properties:
       [
         Taborder: 2
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def
index d68b0fe..c543e5d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_listContextMenuSD.def
@@ -9,7 +9,7 @@
       BaseType: 'WebMenu'
       Properties:
       [
-        Taborder: 10
+        Taborder: 11
         Title: '浜嬩笟閮ㄤ紭鍏堢骇璁$畻'
       ]
     }
@@ -19,7 +19,7 @@
       BaseType: 'WebMenu'
       Properties:
       [
-        Taborder: 11
+        Taborder: 12
         Title: '淇敼瀹㈡埛璁㈠崟浼樺厛绾у洜瀛愪俊鎭�'
       ]
     }
@@ -31,7 +31,7 @@
       [
         Description: '璁㈠崟鎷嗚'
         Image: 'ARROW_FORK'
-        Taborder: 13
+        Taborder: 14
         Title: '鎷嗚'
       ]
     }
@@ -42,7 +42,17 @@
       Properties:
       [
         Separator: true
-        Taborder: 12
+        Taborder: 13
+      ]
+    }
+    Component MenuSyncInterfaceData
+    {
+      #keys: '[414996.0.32330708]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Taborder: 10
+        Title: '鍚屾鎺ュ彛鏁版嵁鍒癈ustomer orders'
       ]
     }
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Response_TIANMA_JITUAN_listContextMenuSD_MenuSyncInterfaceData_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Response_TIANMA_JITUAN_listContextMenuSD_MenuSyncInterfaceData_OnClick.def
new file mode 100644
index 0000000..2a411b7
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Response_TIANMA_JITUAN_listContextMenuSD_MenuSyncInterfaceData_OnClick.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: listContextMenuSD/MenuSyncInterfaceData
+Response OnClick () id:Response_TIANMA_JITUAN_listContextMenuSD_MenuSyncInterfaceData_OnClick
+{
+  #keys: '[414996.0.32370756]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      Global_MappingCustomOrder::CreateCustomOrder( GlobalOTDTable,MacroPlan );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_ListPriorityFactor.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_ListPriorityFactor.def
index 73da706..5241681 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_ListPriorityFactor.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_ListPriorityFactor.def
@@ -11,10 +11,10 @@
       BaseType: 'WebDataExtractor'
       Properties:
       [
-        DataType: 'structured[PriorityFactor]'
-        Source: 'DataHolderPriorityFactorSelect'
+        DataType: 'MacroPlan'
+        Source: 'MacroPlan'
         Taborder: 0
-        Transformation: 'Elements'
+        Transformation: 'PriorityFactor'
       ]
     }
     #child: listActionBarPagePriorityFactor
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_listContextMenuPriorityFactor.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_listContextMenuPriorityFactor.def
index 7d29277..f0daed3 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_listContextMenuPriorityFactor.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_listContextMenuPriorityFactor.def
@@ -16,6 +16,39 @@
         Title: '鍒濆鍖�'
       ]
     }
+    Component MenuNewPriorityFactor
+    {
+      #keys: '[414996.0.32331011]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'GEAR_ADD'
+        Taborder: 4
+        Title: 'New'
+      ]
+    }
+    Component MenuEditPriorityFactor
+    {
+      #keys: '[414996.0.32331061]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'GEAR_EDIT'
+        Taborder: 5
+        Title: 'Edit'
+      ]
+    }
+    Component MenuDeletePriorityFactor
+    {
+      #keys: '[414996.0.32331135]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'GEAR_DELETE'
+        Taborder: 6
+        Title: 'Delete'
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorSelect_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorSelect_OnDataChanged.def
deleted file mode 100644
index e005ec6..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorSelect_OnDataChanged.def
+++ /dev/null
@@ -1,17 +0,0 @@
-Quintiq file version 2.0
-#parent: DataHolderPriorityFactorSelect
-Response OnDataChanged () id:Response_FormPriorityFactor_DataHolderPriorityFactorSelect_OnDataChanged
-{
-  #keys: '[414382.0.593010798]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
-  QuillAction
-  {
-    Body:
-    [*
-      //data := selectset( MacroPlan,PriorityFactor,p,true);
-      //this.Data(&data);
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def
deleted file mode 100644
index 267db8a..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def
+++ /dev/null
@@ -1,17 +0,0 @@
-Quintiq file version 2.0
-#parent: DropDownStringListBusinessType
-Response OnCreated () id:Response_FormPriorityFactor_DropDownStringListBusinessType_OnCreated
-{
-  #keys: '[414382.0.539375553]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebComponent_OnCreated'
-  QuillAction
-  {
-    Body:
-    [*
-      //list := PriorityFactor::GetDataByBusinessType( MacroPlan, DropDownStringListBusinessType.Text());
-      //DataHolderPriorityFactorSelect.Data(&list);
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnSelectionChanged.def
deleted file mode 100644
index cbab0ed..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnSelectionChanged.def
+++ /dev/null
@@ -1,17 +0,0 @@
-Quintiq file version 2.0
-#parent: DropDownStringListBusinessType
-Response OnSelectionChanged () id:Response_FormPriorityFactor_DropDownStringListBusinessType_OnSelectionChanged
-{
-  #keys: '[414382.0.461060940]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged'
-  QuillAction
-  {
-    Body:
-    [*
-      //list := PriorityFactor::GetDataByBusinessType( MacroPlan, DropDownStringListBusinessType.Text());
-      //DataHolderPriorityFactorSelect.Data(&list);
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuDeletePriorityFactor_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuDeletePriorityFactor_OnClick.def
new file mode 100644
index 0000000..e344003
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuDeletePriorityFactor_OnClick.def
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+#parent: ListPriorityFactor
+Response OnClick (
+  structured[PriorityFactor] selection
+) id:Response_ListPriorityFactor_MenuDeletePriorityFactor_OnClick
+{
+  #keys: '[414996.0.35089240]'
+  CanBindMultiple: false
+  DefinitionID => /ListPriorityFactor/Responsedef_ListPriorityFactor_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'MenuDeletePriorityFactor'
+  QuillAction
+  {
+    Body:
+    [*
+      number := WebMessageBox::Question( "Are you sure delete this priority factor?","Yes|No" );
+      if( number = 0 ){
+        traverse( selection,Elements,element){
+          element.Delete(); 
+        } 
+      }
+    *]
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuEditPriorityFactor_OnClick\043325.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuEditPriorityFactor_OnClick\043325.def"
new file mode 100644
index 0000000..e285f6a
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuEditPriorityFactor_OnClick\043325.def"
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: ListPriorityFactor
+Response OnClick (
+  PriorityFactor selection
+) id:Response_ListPriorityFactor_MenuEditPriorityFactor_OnClick_325
+{
+  #keys: '[414996.0.34858367]'
+  CanBindMultiple: false
+  DefinitionID => /ListPriorityFactor/Responsedef_ListPriorityFactor_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'MenuEditPriorityFactor'
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogEditPriorityFactor );
+      dlg.Edit( selection);
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuNewPriorityFactor_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuNewPriorityFactor_OnClick.def
new file mode 100644
index 0000000..bf6db20
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuNewPriorityFactor_OnClick.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: ListPriorityFactor
+Response OnClick (
+  PriorityFactor selection
+) id:Response_ListPriorityFactor_MenuNewPriorityFactor_OnClick
+{
+  #keys: '[414996.0.39511535]'
+  CanBindMultiple: false
+  DefinitionID => /ListPriorityFactor/Responsedef_ListPriorityFactor_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'MenuNewPriorityFactor'
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogEditPriorityFactor );
+      dlg.New( MacroPlan,"" );
+    *]
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnClick\043106.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnClick\043106.def"
index 071de46..a6fccd7 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnClick\043106.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnClick\043106.def"
@@ -11,8 +11,8 @@
   {
     Body:
     [*
-      detaisls := PriorityFactorDetails::GetDataByPriorityFactor( selection, MacroPlan);
-      DataHolderPriorityFactorDetailsSelect.Data(&detaisls);
+      //detaisls := PriorityFactorDetails::GetDataByPriorityFactor( selection, MacroPlan);
+      //DataHolderPriorityFactorDetailsSelect.Data(&detaisls);
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnDoubleClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnDoubleClick.def
new file mode 100644
index 0000000..59c8756
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnDoubleClick.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: ListPriorityFactor
+Response OnDoubleClick (
+  PriorityFactor selection
+) id:Response_ListPriorityFactor_OnDoubleClick
+{
+  #keys: '[414996.0.62910306]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebList_OnDoubleClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogEditPriorityFactor );
+      dlg.Edit( selection);
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnDrop.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnDrop.def
new file mode 100644
index 0000000..9ec1767
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnDrop.def
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: ListPriorityFactor
+Response OnDrop (
+  PriorityFactorDetail source,
+  PriorityFactor target
+) id:Response_ListPriorityFactor_OnDrop
+{
+  #keys: '[414996.0.63148145]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebList_OnDrop'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      if( not isnull( source) and not isnull( target)){
+        
+      }
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnSelectionChanged.def
index 235a322..3826228 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnSelectionChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnSelectionChanged.def
@@ -11,9 +11,7 @@
   {
     Body:
     [*
-      info( "selecion change" );
-      detaisls := PriorityFactorDetails::GetDataByPriorityFactor( selection, MacroPlan);
-      DataHolderPriorityFactorDetailsSelect.Data(&detaisls);
+      DataHolderPriorityFactorSelect.Data(selection);
     *]
     GroupServerCalls: false
   }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_listContextMenuPriorityFactor_MenuNewPriorityFactor_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_listContextMenuPriorityFactor_MenuNewPriorityFactor_OnClick.def
new file mode 100644
index 0000000..564a038
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_listContextMenuPriorityFactor_MenuNewPriorityFactor_OnClick.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: listContextMenuPriorityFactor/MenuNewPriorityFactor
+Response OnClick () id:Response_listContextMenuPriorityFactor_MenuNewPriorityFactor_OnClick
+{
+  #keys: '[414996.0.32331254]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogEditPriorityFactor );
+      dlg.New( MacroPlan,"");
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def
index 7c5dda8..5cd684b 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def
@@ -11,22 +11,7 @@
     {
       #keys: '[414382.0.453562359]'
       BaseType: 'WebDataHolder'
-      Databinding: 'structured[PriorityFactor]*'
-      Children:
-      [
-        Component DataExtractorPriorityFactorSelect
-        {
-          #keys: '[414382.0.608512605]'
-          BaseType: 'WebDataExtractor'
-          Properties:
-          [
-            DataType: 'MacroPlan'
-            Source: 'MacroPlan'
-            Taborder: 0
-            Transformation: 'PriorityFactor'
-          ]
-        }
-      ]
+      Databinding: 'PriorityFactor'
       Properties:
       [
         Taborder: 1
@@ -48,7 +33,7 @@
     {
       #keys: '[414382.0.482103344]'
       BaseType: 'WebDataHolder'
-      Databinding: 'structured[PriorityFactorDetails]*'
+      Databinding: 'structured[PriorityFactorDetail]*'
       Properties:
       [
         Taborder: 3
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_ListPriorityFactorGrading.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_ListPriorityFactorGrading.def
index a28ed5d..8f3c40c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_ListPriorityFactorGrading.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_ListPriorityFactorGrading.def
@@ -11,10 +11,10 @@
       BaseType: 'WebDataExtractor'
       Properties:
       [
-        DataType: 'structured[PriorityFactorDetails]'
-        Source: 'DataHolderPriorityFactorGrading'
+        DataType: 'PriorityFactor'
+        Source: 'DataHolderPriorityFactor'
         Taborder: 0
-        Transformation: 'Elements'
+        Transformation: 'PriorityFactorDetail'
       ]
     }
     #child: listActionBarPagePriorityFactorGrading
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_listContextMenuPriorityFactorGrading.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_listContextMenuPriorityFactorGrading.def
index 33b6aa3..dce2b3d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_listContextMenuPriorityFactorGrading.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Component_listContextMenuPriorityFactorGrading.def
@@ -3,6 +3,42 @@
 {
   #keys: '[414382.0.479530873]'
   BaseType: 'listContextMenu'
+  Children:
+  [
+    Component MenuEditPriorityFactorGrading
+    {
+      #keys: '[414996.0.32342387]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'GEAR_EDIT'
+        Taborder: 4
+        Title: 'Edit'
+      ]
+    }
+    Component MenuDeletePriorityFactorGrading
+    {
+      #keys: '[414996.0.32342398]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'GEAR_DELETE'
+        Taborder: 5
+        Title: 'Delete'
+      ]
+    }
+    Component MenuNewPriorityFactorGrading
+    {
+      #keys: '[414996.0.40230778]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'GEAR_ADD'
+        Taborder: 3
+        Title: 'New'
+      ]
+    }
+  ]
   Properties:
   [
     Taborder: 0
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuDeletePriorityFactorGrading_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuDeletePriorityFactorGrading_OnClick.def
new file mode 100644
index 0000000..9470f26
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuDeletePriorityFactorGrading_OnClick.def
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+#parent: ListPriorityFactorGrading
+Response OnClick (
+  structured[PriorityFactorDetail] selction
+) id:Response_ListPriorityFactorGrading_MenuDeletePriorityFactorGrading_OnClick
+{
+  #keys: '[414996.0.36022233]'
+  CanBindMultiple: false
+  DefinitionID => /ListPriorityFactorGrading/Responsedef_ListPriorityFactorGrading_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'MenuDeletePriorityFactorGrading'
+  QuillAction
+  {
+    Body:
+    [*
+      number := WebMessageBox::Question( "Are you sure delete this priority factor?","Yes|No" );
+      if( number = 0 ){
+        traverse( selction,Elements,element){
+          element.Delete(); 
+        } 
+      }
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuEditPriorityFactorGrading_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuEditPriorityFactorGrading_OnClick.def
new file mode 100644
index 0000000..8128f71
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuEditPriorityFactorGrading_OnClick.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: ListPriorityFactorGrading
+Response OnClick (
+  PriorityFactorDetail selction
+) id:Response_ListPriorityFactorGrading_MenuEditPriorityFactorGrading_OnClick
+{
+  #keys: '[414996.0.32393877]'
+  CanBindMultiple: false
+  DefinitionID => /ListPriorityFactorGrading/Responsedef_ListPriorityFactorGrading_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'MenuEditPriorityFactorGrading'
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogEditPriorityFactorDetail );
+      dlg.Edit( selction );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuNewPriorityFactorGrading_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuNewPriorityFactorGrading_OnClick.def
new file mode 100644
index 0000000..2a27308
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_MenuNewPriorityFactorGrading_OnClick.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: ListPriorityFactorGrading
+Response OnClick () id:Response_ListPriorityFactorGrading_MenuNewPriorityFactorGrading_OnClick
+{
+  #keys: '[414996.0.42410722]'
+  CanBindMultiple: false
+  DefinitionID => /ListPriorityFactorGrading/Responsedef_ListPriorityFactorGrading_WebMenu_OnClick
+  GroupServerCalls: true
+  Initiator: 'MenuNewPriorityFactorGrading'
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogEditPriorityFactorDetail );
+      dlg.New( DataHolderPriorityFactor.Data( ));
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_OnDoubleClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_OnDoubleClick.def
new file mode 100644
index 0000000..b28abf3
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/Response_ListPriorityFactorGrading_OnDoubleClick.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: ListPriorityFactorGrading
+Response OnDoubleClick (
+  PriorityFactorDetail selection
+) id:Response_ListPriorityFactorGrading_OnDoubleClick
+{
+  #keys: '[414996.0.62960783]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebList_OnDoubleClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      dlg := construct( DialogEditPriorityFactorDetail );
+      dlg.Edit( selection );
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/_ROOT_Component_FormPriorityFactorGrading.def b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/_ROOT_Component_FormPriorityFactorGrading.def
index b9ab15b..3764fd4 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/_ROOT_Component_FormPriorityFactorGrading.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/_ROOT_Component_FormPriorityFactorGrading.def
@@ -7,21 +7,22 @@
   BaseType: 'WebForm'
   Children:
   [
-    Component DataHolderPriorityFactorGrading
+    #child: ListPriorityFactorGrading
+    Component DataHolderPriorityFactor
     {
-      #keys: '[414382.0.478480902]'
+      #keys: '[414996.0.35059952]'
       BaseType: 'WebDataHolder'
-      Databinding: 'structured[PriorityFactorDetails]*'
+      Databinding: 'PriorityFactor'
       Children:
       [
-        Component DataExtractorPriorityFactorGrading
+        Component DataExtractorPriorityFactor
         {
-          #keys: '[414382.0.478480916]'
+          #keys: '[414996.0.35059968]'
           BaseType: 'WebDataExtractor'
           Properties:
           [
-            DataType: 'structured[PriorityFactorDetails]'
-            Source: 'FormPriorityFactor.DataHolderPriorityFactorDetailsSelect'
+            DataType: 'PriorityFactor'
+            Source: 'FormPriorityFactor.DataHolderPriorityFactorSelect'
             Taborder: 0
           ]
         }
@@ -31,7 +32,6 @@
         Taborder: 0
       ]
     }
-    #child: ListPriorityFactorGrading
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Views/PriorityTest.vw b/_Main/UI/MacroPlannerWebApp/Views/PriorityTest.vw
index 68006ad..f338cc4 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/PriorityTest.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/PriorityTest.vw
@@ -35,6 +35,26 @@
               width: 150
             }
           }
+          FormBusinessType_PanelBusinessType
+          {
+            sizeRatio: 1
+          }
+          FormBusinessType_ListOrganCode
+          {
+          }
+          FormBusinessType_DataSetLevelOrganCode
+          {
+            groupDepth: -1
+            column_OrganCodeName
+            {
+              columnId: 'OrganCodeName'
+              dataPath: 'OrganCodeName'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+          }
         }
       }
       form_FormPriorityResult
@@ -417,7 +437,7 @@
               dataType: 'real'
               index: 1
               subtotals: ''
-              width: 496
+              width: 71
             }
             column_Desc
             {
@@ -554,2187 +574,14 @@
           }
         }
       }
-      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
     {
     }
+    index: 0
+    image: ''
     page: ''
     group: ''
-    index: 15
-    image: ''
     description: ''
   }
   formatversion: 2

--
Gitblit v1.9.3