From 60a4f777fe6891b0ca85201ad1cf5567da16b16c Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期二, 10 九月 2024 14:33:17 +0800
Subject: [PATCH] 修复一些bug,新增一些功能

---
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_PanelGeneral.def                           |    8 +
 _Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick#613.def |    2 
 _Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Response_pnlUnit_Button671_OnClick#570.def             |    2 
 _Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def                        |   10 --
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Method_OnOK.def                                      |   79 +++++++++++++++
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/_ROOT_Component_DialogCreateEditForecast.def         |   10 ++
 _Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Component_pnlContent.def                               |   32 +-----
 _Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport#1.qbl                                 |   96 ++++++++++++++++--
 _Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def                                         |    2 
 /dev/null                                                                                                           |   16 ---
 _Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl                                                                  |    4 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_PanelOrigin.def                            |   26 +++++
 _Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl                                                        |    1 
 _Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl                                                                  |    2 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_pnlContent.def                             |    8 +
 15 files changed, 227 insertions(+), 71 deletions(-)

diff --git a/_Main/BL/Type_EmployeeCost/Attribute_StartDate.qbl b/_Main/BL/Type_EmployeeCost/Attribute_StartDate.qbl
deleted file mode 100644
index 16c94a8..0000000
--- a/_Main/BL/Type_EmployeeCost/Attribute_StartDate.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute StartDate
-{
-  #keys: '3[412672.1.2854645][412672.1.2854644][412672.1.2854646]'
-  ValueType: Date
-}
diff --git a/_Main/BL/Type_EmployeeCost/Attribute_TimeUnit.qbl b/_Main/BL/Type_EmployeeCost/Attribute_TimeUnit.qbl
deleted file mode 100644
index bf8dc85..0000000
--- a/_Main/BL/Type_EmployeeCost/Attribute_TimeUnit.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute TimeUnit
-{
-  #keys: '3[412672.1.2854655][412672.1.2854654][412672.1.2854656]'
-  ValueType: String
-}
diff --git a/_Main/BL/Type_EmployeeCost/DefaultValue_TimeUnit.qbl b/_Main/BL/Type_EmployeeCost/DefaultValue_TimeUnit.qbl
deleted file mode 100644
index b1b021c..0000000
--- a/_Main/BL/Type_EmployeeCost/DefaultValue_TimeUnit.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
-  ISOValue: '鏈�'
-  TargetAttribute: TimeUnit
-}
diff --git a/_Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl b/_Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl
index a056ac4..12fbb19 100644
--- a/_Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl
+++ b/_Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl
@@ -20,8 +20,8 @@
       columnXML1 := columnXML1 + '<cell value="' + cost.EmployeeType().Name() + '"/>'
       columnXML2 := columnXML2 + '<cell value="' + [String]cost.EmployeeNumber() + '"/>'
       columnXML3 := columnXML3 + '<cell value="' + cost.Unit().Name() + '"/>'
-      columnXML4 := columnXML4 + '<cell value="' + cost.StartDate().Format( "Y-M2-D2" ) + '"/>'
-      columnXML5 := columnXML5 + '<cell value="' + cost.TimeUnit() + '"/>'
+    //  columnXML4 := columnXML4 + '<cell value="' + cost.StartDate().Format( "Y-M2-D2" ) + '"/>'
+    //  columnXML5 := columnXML5 + '<cell value="' + cost.TimeUnit() + '"/>'
       columnXML6 := columnXML6 + '<cell value="' + cost.BaseSalary().Format( "N(Dec())" ) + '"/>'
     }
     columnXML1 := columnXML1 + "</column>";
diff --git a/_Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl b/_Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl
index fbd4e8e..c81d400 100644
--- a/_Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl
@@ -71,7 +71,7 @@
          }
       }
       if( not isnull( unit )){
-        unit.EmployeeCost( relnew,EmployeeType := employeeType,EmployeeNumber := employeeNumber,StartDate := startDate,TimeUnit := timeUnit,BaseSalary := baseSalary );
+        unit.EmployeeCost( relnew,EmployeeType := employeeType,EmployeeNumber := employeeNumber,BaseSalary := baseSalary );
       }
     }
   *]
diff --git a/_Main/BL/Type_LocalCell_Default/Method_SetBreakDayOverTimeDurction.qbl b/_Main/BL/Type_LocalCell_Default/Method_SetBreakDayOverTimeDurction.qbl
deleted file mode 100644
index 8a81702..0000000
--- a/_Main/BL/Type_LocalCell_Default/Method_SetBreakDayOverTimeDurction.qbl
+++ /dev/null
@@ -1,36 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Method SetBreakDayOverTimeDurction (
-  String outcome
-)
-{
-  TextBody:
-  [*
-    // rislai Jul-10-2024 (created)
-    overtime := 0.0;
-    nextDayOvertime := 0.0;
-    if( outcome = "1" ){
-      overtime := 8;
-      nextDayOvertime := 0.0;
-    }else if( outcome = "2" ){
-      overtime := 15;
-      nextDayOvertime := 1;
-    }else if(outcome = "9+9"){
-      overtime := 16;
-      nextDayOvertime := 2;
-    }else if(outcome = "10+10"){
-      overtime := 17;
-      nextDayOvertime := 3;
-    }else if(outcome = "1(9)" or outcome = "1锛�9锛�"){
-      overtime := 9;
-      nextDayOvertime := 0;
-    }else if(outcome = "1(10)" or outcome = "1锛�10锛�"){
-      overtime := 10;
-      nextDayOvertime := 0;
-    }else if(outcome = "3"){
-      overtime := 15;
-      nextDayOvertime := 7.5;
-    }
-    this.RealValue( this.RealValue() + overtime + nextDayOvertime );
-  *]
-}
diff --git a/_Main/BL/Type_LocalCell_Default/Method_SetOvertimeDurction.qbl b/_Main/BL/Type_LocalCell_Default/Method_SetOvertimeDurction.qbl
deleted file mode 100644
index e5a7d36..0000000
--- a/_Main/BL/Type_LocalCell_Default/Method_SetOvertimeDurction.qbl
+++ /dev/null
@@ -1,36 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Method SetOvertimeDurction (
-  String outcome
-)
-{
-  TextBody:
-  [*
-    // rislai Jul-10-2024 (created)
-    overtime := 0.0;
-    nextDayOvertime := 0.0;
-    if( outcome = "1" ){
-      overtime := 0;
-      nextDayOvertime := 0.0;
-    }else if( outcome = "2" ){
-      overtime := 0;
-      nextDayOvertime := 0.0;
-    }else if(outcome = "9+9"){
-      overtime := 1;
-      nextDayOvertime := 1;
-    }else if(outcome = "10+10"){
-      overtime := 2;
-      nextDayOvertime := 2;
-    }else if(outcome = "1(9)" or outcome = "1锛�9锛�"){
-      overtime := 1;
-      nextDayOvertime := 0;
-    }else if(outcome = "1(10)" or outcome = "1锛�10锛�"){
-      overtime := 2;
-      nextDayOvertime := 0;
-    }else if(outcome = "3"){
-      overtime := 0;
-      nextDayOvertime := 0;
-    }
-    this.RealValue( this.RealValue() + overtime + nextDayOvertime );
-  *]
-}
diff --git "a/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport\0431.qbl" "b/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport\0431.qbl"
index ddece8a..e51d067 100644
--- "a/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport\0431.qbl"
+++ "b/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport\0431.qbl"
@@ -42,32 +42,104 @@
       
       unitIndexTree.Root().AddChild( unitIndexTree.GetHandle( unit.ID() ),i );
     }
+    
+    shiftPlanIndexTree := NamedValueTree::Create();
+    for( i := 0 ; i<shiftPlans.Size(); i++ ){
+      shiftPlan := shiftPlans.Element( i );
+      period := shiftPlan.UnitPeriodTime().Period_MP();
+      rowKey := shiftPlan.UnitPeriodTime().Unit().ID();
+      columnKey := period.StartDate().AsQUILL() + period.EndDate().AsQUILL();
+      shiftPlanHanlde := shiftPlanIndexTree.GetHandle( rowKey + columnKey );
+      shiftPlanIndexTree.Root().AddChild( shiftPlanHanlde, i );
+    }
+    
     traverse( shiftPlans,Elements,shiftPlan ){
       rowKey := shiftPlan.UnitPeriodTime().Unit().ID();
       row := rows.Element( rowIndexTree.Root().Child( rowIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
     
+      nextShiftPlan := constnull( ShiftPlan );
+      {
+        nextPeriod := shiftPlan.UnitPeriodTime().Period_MP().NextPeriod();
+        if( not isnull( nextPeriod )){
+          columnKey := nextPeriod.StartDate().AsQUILL() + nextPeriod.EndDate().AsQUILL();
+          nextShiftPlanHanlde := shiftPlanIndexTree.GetHandle( rowKey + columnKey );
+          nextShiftPlanIndex := guard( shiftPlanIndexTree.Root().Child( nextShiftPlanHanlde ),null( NamedValue ));
+          if( not isnull( nextShiftPlanIndex )){
+            nextShiftPlan := shiftPlans.Element( nextShiftPlanIndex.GetValueAsNumber() );
+          }
+        }
+      }
       // gongchangCell := LocalCell_Default::GetCell(  rowKey + column1.Name(), cellIndexTree, cells, row, column1 );
       // chanxianxCell := LocalCell_Default::GetCell(  rowKey + column2.Name(), cellIndexTree, cells, row, column2 );
-    
-      shengchanCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
-      week := shiftPlan.UnitPeriodTime().Period_MP().StartDate().DayOfWeek();
+      
+      // 宸ヤ綔鏃�
+      workingDayCell := LocalCell_Default::GetCell(  rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
+      // 鑺傚亣鏃ュ姞鐝� 
+      holidayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
+      // 浼戞伅鏃ュ姞鐝� 
+      breakDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
+      // 骞虫椂鍔犵彮
+      defaultDayOvertimeHourCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
+      
       if( shiftPlan.Outcome() <> "" ){
-        shengchanCell.RealValue( shengchanCell.RealValue() + 1 );
+        workingDayCell.RealValue( workingDayCell.RealValue() + 1 );
         if( shiftPlan.IsHoliday() ){
           // 鑺傚亣鏃ュ姞鐝� 
-          jiejiariCell := LocalCell_Default::GetCell(  rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
-          jiejiariCell.SetBreakDayOverTimeDurction( shiftPlan.Outcome() );
-        }else if( week = 6 or week = 7 ){
+          overtime := shiftPlan.GetBreakDayOvertimeHour( false );
+          holidayOvertimeHourCell.RealValue( holidayOvertimeHourCell.RealValue() + overtime );
+          if( not isnull( nextShiftPlan )){
+            nextDayOvertime := shiftPlan.GetBreakDayOvertimeHour( true );
+            if( nextShiftPlan.IsHoliday()){
+              // 涓嬩竴澶╂槸鑺傚亣鏃�
+              holidayOvertimeHourCell.RealValue( holidayOvertimeHourCell.RealValue() + nextDayOvertime );
+            }else if( shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄥ叚" ) or shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄦ棩" ) ){
+              // 涓嬩竴澶╂槸鍛ㄥ叚鎴栧懆鏃�
+              breakDayOvertimeHourCell.RealValue( breakDayOvertimeHourCell.RealValue() + nextDayOvertime );
+            }else{
+              // 涓嬩竴澶╂槸骞冲父鐨勫伐浣滄棩
+              nextDayOvertime := shiftPlan.GetDefaultDayOvertimeHour( true );
+              defaultDayOvertimeHourCell.RealValue( defaultDayOvertimeHourCell.RealValue() + nextDayOvertime );
+            }
+          }
+        }else if( shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄥ叚" ) or shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄦ棩" ) ){
           // 浼戞伅鏃ュ姞鐝� 
-          xiuxiCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
-          xiuxiCell.SetBreakDayOverTimeDurction( shiftPlan.Outcome() );
+          overtime := shiftPlan.GetBreakDayOvertimeHour( false );
+          breakDayOvertimeHourCell.RealValue( breakDayOvertimeHourCell.RealValue() + overtime );
+          if( not isnull( nextShiftPlan )){
+            nextDayOvertime := shiftPlan.GetBreakDayOvertimeHour( true );
+            if( nextShiftPlan.IsHoliday()){
+              // 涓嬩竴澶╂槸鑺傚亣鏃�
+              holidayOvertimeHourCell.RealValue( holidayOvertimeHourCell.RealValue() + nextDayOvertime );
+            }else if( shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄥ叚" ) or shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄦ棩" ) ){
+              // 涓嬩竴澶╂槸鍛ㄥ叚鎴栧懆鏃�
+              breakDayOvertimeHourCell.RealValue( breakDayOvertimeHourCell.RealValue() + nextDayOvertime );
+            }else{
+              // 涓嬩竴澶╂槸骞冲父鐨勫伐浣滄棩
+              nextDayOvertime := shiftPlan.GetDefaultDayOvertimeHour( true );
+              defaultDayOvertimeHourCell.RealValue( defaultDayOvertimeHourCell.RealValue() + nextDayOvertime );
+            }
+          }
         }else{
           // 骞虫椂鍔犵彮
-          jiabanCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
-          jiabanCell.SetOvertimeDurction( shiftPlan.Outcome() );
+          overtime := shiftPlan.GetDefaultDayOvertimeHour( false );
+          defaultDayOvertimeHourCell.RealValue( defaultDayOvertimeHourCell.RealValue() + overtime );
+          if( not isnull( nextShiftPlan )){
+            nextDayOvertime := shiftPlan.GetBreakDayOvertimeHour( true );
+            if( nextShiftPlan.IsHoliday()){
+              // 涓嬩竴澶╂槸鑺傚亣鏃�
+              holidayOvertimeHourCell.RealValue( holidayOvertimeHourCell.RealValue() + nextDayOvertime );
+            }else if( shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄥ叚" ) or shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄦ棩" ) ){
+              // 涓嬩竴澶╂槸鍛ㄥ叚鎴栧懆鏃�
+              breakDayOvertimeHourCell.RealValue( breakDayOvertimeHourCell.RealValue() + nextDayOvertime );
+            }else{
+              // 涓嬩竴澶╂槸骞冲父鐨勫伐浣滄棩
+              nextDayOvertime := shiftPlan.GetDefaultDayOvertimeHour( true );
+              defaultDayOvertimeHourCell.RealValue( defaultDayOvertimeHourCell.RealValue() + nextDayOvertime );
+            }
+          }
         }
       }else{
-        if( not shiftPlan.IsHoliday() and not ( week = 6 or week = 7 )){
+        if( not shiftPlan.IsHoliday() and not ( shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄥ叚" ) or shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄦ棩" ) )){
           qiangongCell := LocalCell_Default::GetCell(  rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
           qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
         }
diff --git a/_Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl b/_Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl
index 12ccccf..ab6d8ac 100644
--- a/_Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl
+++ b/_Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl
@@ -31,7 +31,6 @@
       overtime := 0;
       nextDayOvertime := 0;
     }
-    
     result := 0.0;
     if( isGetNextDay ){
       result := nextDayOvertime;
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_PanelGeneral.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_PanelGeneral.def
new file mode 100644
index 0000000..675e436
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_PanelGeneral.def
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+Component PanelGeneral #extension
+{
+  Children:
+  [
+    #child: PanelOrigin
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_PanelOrigin.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_PanelOrigin.def
new file mode 100644
index 0000000..03dc8d2
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_PanelOrigin.def
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+Component PanelOrigin
+{
+  #keys: '[414996.1.73340632]'
+  BaseType: 'WebPanel'
+  Children:
+  [
+    Component DropDownStringListOrigin
+    {
+      #keys: '[414996.1.73340713]'
+      BaseType: 'WebDropDownStringList'
+      Properties:
+      [
+        AllowEmpty: true
+        DataBinding: 'DataHolderDialogData.Data.Origin'
+        Label: 'Origin'
+        Strings: ';TRX;PPA;IDS'
+        Taborder: 0
+      ]
+    }
+  ]
+  Properties:
+  [
+    Taborder: 8
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_pnlContent.def
new file mode 100644
index 0000000..92726f6
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Component_pnlContent.def
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+Component pnlContent #extension
+{
+  Children:
+  [
+    #child: PanelGeneral
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Method_OnOK.def
new file mode 100644
index 0000000..fe5df19
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/Method_OnOK.def
@@ -0,0 +1,79 @@
+Quintiq file version 2.0
+#parent: #root
+Method OnOK () derived id:Method_DialogCreateEditForecast_OnOK #extension
+{
+  BaseType => //DialogCreateEditSalesDemand/Method_DialogCreateEditSalesDemand_OnOK
+  Body:
+  [*
+    Form.ApplyChanges();
+    this.SetAttributeAfterApplyData();
+    
+    data := DataHolderDialogData.Data();
+    selection := DataHolderSalesDemands.Data().Copy();
+    isbatchedit := selection.Size() >1; 
+    
+    
+    if( isnull( data.WrappedInstance() ) )
+    {
+      data.ID( MacroPlan.IDHolder().GetSalesDemandID( "User_", "" ) );
+      forecast := Forecast::Create( data.ID(),
+                           DropDownListProduct.Data(),
+                           DropDownListStockingPoint.Data(),
+                           data.StartDate(),
+                           data.EndDate(),
+                           data.Quantity(),
+                           data.Price(),
+                           data.Priority(),
+                           data.SalesSegment_MP(),
+                           data.Currency_MP(),
+                           data.UnitOfMeasure_MP(),
+                           false,
+                           true,
+                           data.DemandUncertaintyPercentage(),
+                           data.IsExcludedFromFulfillmentKPI(),
+                           false 
+                           );
+      forecast.Origin( DropDownStringListOrigin.Text() );
+                   
+    }
+    
+    else
+    {
+      quantity := ApplicationMacroPlanner.FormatStringToReal( EditFieldQuantityUom.Text(), 0.0 );
+      forecasts := selectset( selection, Elements.astype( Forecast ), forecast, true );
+      Forecast::Update( forecasts,
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( DropDownListProduct ),
+                         DropDownListProduct.Data(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( DropDownListStockingPoint ),
+                         DropDownListStockingPoint.Data(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( DateSelectorStart ),
+                         data.StartDate(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( DateSelectorEnd ),
+                         data.EndDate(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( EditFieldQuantityUom ),
+                         quantity,
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( EditFieldPrice ),
+                         data.Price(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( DropDownListPriority ) or ApplicationMacroPlanner.IsActionLinkEnabledEdit( CheckBoxIsExcludedFromFulfillmentKPI ),
+                         data.Priority(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( EditFieldDemandUncertaintyPercentage ),
+                         data.DemandUncertaintyPercentage(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( DropDownListSalesSegment ),
+                         data.SalesSegment_MP(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( DropDownListCurrency ),
+                         data.Currency_MP(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( DropDownListUnitOfMeasurement ),
+                         data.UnitOfMeasure_MP(),
+                         not isbatchedit or ApplicationMacroPlanner.IsActionLinkEnabledEdit( CheckBoxIsExcludedFromFulfillmentKPI ),
+                         ifexpr( CheckBoxIsExcludedFromFulfillmentKPI.Enabled(), 
+                                 CheckBoxIsExcludedFromFulfillmentKPI.Checked(),
+                                 data.IsExcludedFromFulfillmentKPIUser() ),
+                         true );
+      traverse( forecasts,Elements,forecast ){
+        forecast.Origin( DropDownStringListOrigin.Text() );
+      }
+    
+    }
+    Form.Close();
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/_ROOT_Component_DialogCreateEditForecast.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/_ROOT_Component_DialogCreateEditForecast.def
new file mode 100644
index 0000000..dbf76ef
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditForecast/_ROOT_Component_DialogCreateEditForecast.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: LibMacroPlannerWebUI
+OrphanComponent DialogCreateEditForecast #extension
+{
+  Children:
+  [
+    #child: pnlContent
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Component_pnlContent.def
index 6efd64a..6476290 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Component_pnlContent.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Component_pnlContent.def
@@ -50,19 +50,10 @@
       Properties:
       [
         DataBinding: 'dhEmployeeCost.Data.EmployeeNumber'
+        FixedSize: false
         Label: '浜烘暟'
+        MaximumColumns: 14
         Taborder: 2
-      ]
-    }
-    Component dsStartDate
-    {
-      #keys: '[412672.1.6911583]'
-      BaseType: 'WebDateSelector'
-      Properties:
-      [
-        DataBinding: 'dhEmployeeCost.Data.StartDate'
-        Label: '寮�濮嬫椂闂�'
-        Taborder: 5
       ]
     }
     Component efStandardWorkingDay
@@ -74,20 +65,7 @@
         DataBinding: 'MacroPlan.StandardWorkingDay'
         Enabled: false
         Label: '鏍囧噯宸ヤ綔澶╂暟'
-        Taborder: 7
-      ]
-    }
-    Component efTimeUnit
-    {
-      #keys: '[412672.1.7276817]'
-      BaseType: 'WebEditField'
-      Properties:
-      [
-        DataBinding: 'dhEmployeeCost.Data.TimeUnit'
-        Enabled: false
-        Label: '鏍囧噯鏃堕棿鍗曞厓'
-        Taborder: 6
-        Text: '鏈�'
+        Taborder: 5
       ]
     }
     Component npBaseSalary
@@ -97,8 +75,10 @@
       Properties:
       [
         DataBinding: 'dhEmployeeCost.Data.BaseSalary'
+        FixedSize: false
         Label: '鍩烘湰宸ヨ祫'
-        Taborder: 8
+        MaximumColumns: 14
+        Taborder: 6
       ]
     }
     #child: pnlUnit
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def
index 7d2d977..494c839 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def
@@ -7,7 +7,7 @@
   [*
     ddlEmployeeType.Enabled( false,"" );
     npEmployeeNumber.Enabled( false,"" );
-    dsStartDate.Enabled( false,"" );
+    //dsStartDate.Enabled( false,"" );
     npBaseSalary.Enabled( false,"" );
     
     ddlUnit.Enabled( true,"" );
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Response_pnlUnit_Button671_OnClick\043570.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Response_pnlUnit_Button671_OnClick\043570.def"
index 19806d3..a2bf64f 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Response_pnlUnit_Button671_OnClick\043570.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Response_pnlUnit_Button671_OnClick\043570.def"
@@ -17,7 +17,7 @@
       this.Image( "LOCK" );
       ddlEmployeeType.Enabled( true,"" );
       npEmployeeNumber.Enabled( true,"" );
-      dsStartDate.Enabled( true,"" );
+      //dsStartDate.Enabled( true,"" );
       npBaseSalary.Enabled( true,"" );
       
       ddlUnit.Enabled( false,"" );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def
index 1350b9a..abb2e55 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Component_PanelRibbon504.def
@@ -52,16 +52,6 @@
         Taborder: 2
       ]
     }
-    Component ButtonRibbon
-    {
-      #keys: '[415720.0.38711791]'
-      BaseType: 'WebButton'
-      Properties:
-      [
-        Label: '瀹為檯鐢熶骇鏁版嵁鎺ュ彛鍚屾'
-        Taborder: 3
-      ]
-    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_ButtonRibbon_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_ButtonRibbon_OnClick.def
deleted file mode 100644
index c472499..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_ButtonRibbon_OnClick.def
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: PanelRibbon504/ButtonRibbon
-Response OnClick () id:Response_PanelRibbon504_ButtonRibbon_OnClick
-{
-  #keys: '[415720.0.38711805]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  QuillAction
-  {
-    Body:
-    [*
-      ActualDailyProductionData::Synchronize( MacroPlan,InterfaceDataset );
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick\043613.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick\043613.def"
index 99add2b..7e11636 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick\043613.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlanComparison/Response_PanelRibbon504_bComparison_OnClick\043613.def"
@@ -11,7 +11,7 @@
     [*
       opt := ddlOfflinePlanTable.Data();
       
-      dhComparisonData.Data( opt.Comparison( RecycleBin ));
+      dhComparisonData.Data( opt.Comparison( RecycleBin,Archive ));
     *]
     GroupServerCalls: false
   }

--
Gitblit v1.9.3