From fcb023061a7be2ce3d954abc1eeed30faf71590e Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期一, 02 九月 2024 15:59:56 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev

---
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnOk_OnClick.def                                             |    2 
 _Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryMinQty.qbl                                                                              |    8 +
 _Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryMaxQty.qbl                                                                              |    8 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnCre.def |   20 ++
 _Main/BL/InfoMessages.qbl                                                                                                                         |    8 +
 _Main/BL/Type_InterfaceInventoryReport/Attribute_Power.qbl                                                                                        |    8 +
 _Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryDate.qbl                                                                                |    8 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnUse.def |   20 ++
 _Main/BL/Type_InterfaceInventoryReport/Attribute_Product.qbl                                                                                      |    8 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Component_pnlContent.def                                                         |    8 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Component_PanelNumberOfPeriods.def                                               |   24 +++
 _Main/BL/Type_LibCal_CalendarRegistry/Method_InitializeEventTypes.qbl                                                                             |    4 
 _Main/BL/Type_InterfaceInventoryReport/StaticMethod_GenerateData.qbl                                                                              |   57 ++++++++
 _Main/BL/Relations/Relation_InterfaceInventoryReport_Loginfo_InterfaceLoginfo_InventoryReport.qbl                                                 |   23 +++
 _Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl                                                                                 |    4 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditShiftDayTime/Response_pnlContent_dtsEnd_OnCreated.def                                       |   16 ++
 _Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def                                                                  |    2 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def                                                  |   11 +
 _Main/BL/Type_InterfaceInventoryReport/Attribute_FactoryName.qbl                                                                                  |    8 +
 _Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryAveQty.qbl                                                                              |    8 +
 _Main/BL/Relations/Relation_InterfaceInventoryReport_InterfaceDataset_InterfaceDataset_Inventor.qbl                                               |   23 +++
 _Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def                                           |    4 
 _Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryEndQty.qbl                                                                              |    8 +
 _Main/BL/Type_InterfaceInventoryReport/Attribute_InterfaceTime.qbl                                                                                |    8 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/_ROOT_Component_DialogCreateEditPeriodSpec.def                                   |   10 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditShiftDayTime/Response_pnlContent_dtsStart_OnCreated.def                                     |   16 ++
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def                                                                             |    2 
 _Main/BL/Type_InterfaceInventoryReport/Attribute_Generation.qbl                                                                                   |    8 +
 _Main/BL/Type_InterfaceInventoryReport/Attribute_VersionName.qbl                                                                                  |    8 +
 _Main/BL/Type_InterfaceInventoryReport/_ROOT_Type_InterfaceInventoryReport.qbl                                                                    |   10 +
 _Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def                                                |    1 
 _Main/BL/Type_InterfaceInventoryReport/Attribute_MLBMQB.qbl                                                                                       |    8 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def                                                  |    2 
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Method_OnOk.def                                                                            |    2 
 _Main/BL/Type_InterfaceInventoryReport/Attribute_Category.qbl                                                                                     |    8 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuInterfaceInventoryReport_OnCl.def    |   19 ++
 _Main/BL/Type_LibCal_EventEvent/StaticMethod_ValidateInput.qbl                                                                                    |    3 
 37 files changed, 385 insertions(+), 10 deletions(-)

diff --git a/_Main/BL/InfoMessages.qbl b/_Main/BL/InfoMessages.qbl
index 75a3a55..e9c488a 100644
--- a/_Main/BL/InfoMessages.qbl
+++ b/_Main/BL/InfoMessages.qbl
@@ -134,6 +134,10 @@
   {
     DefaultText: '/data-service/api/service/post-data/V1.101/f084aa52d19c48d090416936a94f1dab'
   }
+  InfoMessage InterfaceDataset_InventoryReport_Name
+  {
+    DefaultText: 'Inventory report'
+  }
   InfoMessage InterfaceDataset_MachineStockData_Name
   {
     DefaultText: 'Machine stock data'
@@ -166,6 +170,10 @@
   {
     DefaultText: 'The import field is empty.'
   }
+  InfoMessage MP_ChangeLossSettingExcel_Import_PositiveInteger
+  {
+    DefaultText: 'The import ChangeLossNr is not positive integer.'
+  }
   InfoMessage MP_ChangeLossSettingExcel_Import_ProductNoExist
   {
     DefaultText: 'The entered product does not exist.'
diff --git a/_Main/BL/Relations/Relation_InterfaceInventoryReport_InterfaceDataset_InterfaceDataset_Inventor.qbl b/_Main/BL/Relations/Relation_InterfaceInventoryReport_InterfaceDataset_InterfaceDataset_Inventor.qbl
new file mode 100644
index 0000000..a65811a
--- /dev/null
+++ b/_Main/BL/Relations/Relation_InterfaceInventoryReport_InterfaceDataset_InterfaceDataset_Inventor.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation InterfaceInventoryReport_InterfaceDataset_InterfaceDataset_InventoryReport
+{
+  #keys: '1[415136.0.1094697716]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide InterfaceDataset
+  {
+    #keys: '3[415136.0.1094697718][415136.0.1094697717][415136.0.1094697719]'
+    Cardinality: '0to1'
+    ObjectDefinition: InterfaceInventoryReport
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide InventoryReport
+  {
+    #keys: '3[415136.0.1094697721][415136.0.1094697720][415136.0.1094697722]'
+    Cardinality: '1toN'
+    ObjectDefinition: InterfaceDataset
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_InterfaceInventoryReport_Loginfo_InterfaceLoginfo_InventoryReport.qbl b/_Main/BL/Relations/Relation_InterfaceInventoryReport_Loginfo_InterfaceLoginfo_InventoryReport.qbl
new file mode 100644
index 0000000..f912d91
--- /dev/null
+++ b/_Main/BL/Relations/Relation_InterfaceInventoryReport_Loginfo_InterfaceLoginfo_InventoryReport.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation InterfaceInventoryReport_Loginfo_InterfaceLoginfo_InventoryReport
+{
+  #keys: '1[415136.0.1094697729]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Loginfo
+  {
+    #keys: '3[415136.0.1094697731][415136.0.1094697730][415136.0.1094697732]'
+    Cardinality: '0to1'
+    ObjectDefinition: InterfaceInventoryReport
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide InventoryReport
+  {
+    #keys: '3[415136.0.1094697734][415136.0.1094697733][415136.0.1094697735]'
+    Cardinality: '1toN'
+    ObjectDefinition: InterfaceLoginfo
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
index 8e48b1d..c1c2c55 100644
--- a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
+++ b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
@@ -13,6 +13,10 @@
                 or excel.ChangeLossNr() = 0 ) ){
       error( Translations::MP_ChangeLossSettingExcel_Import_NullInputRequiredField() );
     }
+    //瀵煎叆鐨勬暟閲忓皬浜�0
+    if( exists( macroplan, ChangeLossSettingExcel, excel, excel.ChangeLossNr() < 0 ) ){
+      error( Translations::MP_ChangeLossSettingExcel_Import_PositiveInteger() );
+    }
     //瀵煎叆浜у搧鏄惁瀛樺湪
     if( exists( macroplan, ChangeLossSettingExcel, excel, not exists( macroplan, Product_MP, product, product.ID() = excel.Product1() or product.ID() = excel.Product2() ) ) ){
       error( Translations::MP_ChangeLossSettingExcel_Import_ProductNoExist() );
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_Category.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_Category.qbl
new file mode 100644
index 0000000..183169b
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_Category.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Category
+{
+  #keys: '3[415136.0.1094697746][415136.0.1094697745][415136.0.1094697747]'
+  Description: '鏃ユ湡绫诲瀷'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_FactoryName.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_FactoryName.qbl
new file mode 100644
index 0000000..2d33a63
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_FactoryName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute FactoryName
+{
+  #keys: '3[415136.0.1094697851][415136.0.1094697850][415136.0.1094697852]'
+  Description: '宸ュ巶鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_Generation.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_Generation.qbl
new file mode 100644
index 0000000..26de1f2
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_Generation.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Generation
+{
+  #keys: '3[415136.0.1094697756][415136.0.1094697755][415136.0.1094697757]'
+  Description: '鍙戝姩鏈轰唬鏁�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_InterfaceTime.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InterfaceTime.qbl
new file mode 100644
index 0000000..6b35628
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InterfaceTime.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute InterfaceTime
+{
+  #keys: '3[415136.0.1094697861][415136.0.1094697860][415136.0.1094697862]'
+  Description: '鎺ュ彛浜嬩欢'
+  ValueType: DateTime
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryAveQty.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryAveQty.qbl
new file mode 100644
index 0000000..8c5d670
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryAveQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute InventoryAveQty
+{
+  #keys: '3[415136.0.1094697834][415136.0.1094697833][415136.0.1094697835]'
+  Description: '骞冲潎搴撳瓨閲�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryDate.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryDate.qbl
new file mode 100644
index 0000000..7b2cd8f
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryDate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute InventoryDate
+{
+  #keys: '3[415136.0.1094697806][415136.0.1094697805][415136.0.1094697807]'
+  Description: '搴撳瓨鏃ユ湡'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryEndQty.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryEndQty.qbl
new file mode 100644
index 0000000..7d2fa38
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryEndQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute InventoryEndQty
+{
+  #keys: '3[415136.0.1094697796][415136.0.1094697795][415136.0.1094697797]'
+  Description: '鏈熸湯搴撳瓨閲�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryMaxQty.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryMaxQty.qbl
new file mode 100644
index 0000000..79eb29c
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryMaxQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute InventoryMaxQty
+{
+  #keys: '3[415136.0.1094697827][415136.0.1094697826][415136.0.1094697828]'
+  Description: '鏈�澶у簱瀛橀噺'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryMinQty.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryMinQty.qbl
new file mode 100644
index 0000000..9358da3
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_InventoryMinQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute InventoryMinQty
+{
+  #keys: '3[415136.0.1094697816][415136.0.1094697815][415136.0.1094697817]'
+  Description: '鏈�灏忓簱瀛橀噺'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_MLBMQB.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_MLBMQB.qbl
new file mode 100644
index 0000000..35c7c74
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_MLBMQB.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute MLBMQB
+{
+  #keys: '3[415136.0.1094697766][415136.0.1094697765][415136.0.1094697767]'
+  Description: '妯旱鍒�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_Power.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_Power.qbl
new file mode 100644
index 0000000..a758013
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_Power.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Power
+{
+  #keys: '3[415136.0.1094697776][415136.0.1094697775][415136.0.1094697777]'
+  Description: '鍔熺巼'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_Product.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_Product.qbl
new file mode 100644
index 0000000..389fbec
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_Product.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Product
+{
+  #keys: '3[415136.0.1094697786][415136.0.1094697785][415136.0.1094697787]'
+  Description: '鐗╂枡鍙�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/Attribute_VersionName.qbl b/_Main/BL/Type_InterfaceInventoryReport/Attribute_VersionName.qbl
new file mode 100644
index 0000000..f359ad9
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/Attribute_VersionName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute VersionName
+{
+  #keys: '3[415136.0.1094697841][415136.0.1094697840][415136.0.1094697842]'
+  Description: '鐗堟湰鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/StaticMethod_GenerateData.qbl b/_Main/BL/Type_InterfaceInventoryReport/StaticMethod_GenerateData.qbl
new file mode 100644
index 0000000..9c48e2d
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/StaticMethod_GenerateData.qbl
@@ -0,0 +1,57 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GenerateData (
+  const MacroPlan macroplan,
+  InterfaceDataset interfaceDataset,
+  String executor
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-30-2024 (created)
+    loginfo                := maxobject(  interfaceDataset, InterfaceLoginfo, loginfo, loginfo.Name() = Translations::InterfaceDataset_InventoryReport_Name(), loginfo.InterfaceDateTime() );
+    if( not isnull( loginfo ) ){
+      if( not loginfo.IsShow() ){
+        loginfo.Delete();
+      }else{
+        loginfo.Last( false );
+      }
+      interfaceDataset.InventoryReport( relflush );
+    }
+    nowdate                := DateTime::ActualTime();
+    loginfo                := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser         := executor
+                                                                 , Name                      := Translations::InterfaceDataset_InventoryReport_Name()
+                                                                 , InterfaceDateTime         := nowdate
+                                                                 , Message                   := '搴撳瓨鎶ヨ〃- 鏁版嵁涓彴'
+                                                                 , Last                      := true
+                                                                 , IsShow                    := false
+                                                                 , ReturnSuccess             := true
+                                                                 , ReturnMsg                 := 'Success'
+                                                                 , Success                   := true
+                                                                  );
+    traverse( macroplan, InventorySummarySource.InventorySummaryReport, report, not report.IsShow() ){
+      traverse( report,InventroySummaryRow, row ){
+        product           := selectobject( macroplan, Product_MP, product, product.ID() = row.Name() );
+        traverse( row, InventorySummaryCell, cell ){
+          column          := cell.InventorySummaryColumn();
+          inventory       :=interfaceDataset.InventoryReport( relnew, Category          := column.TimeUnit()
+                                                              , Generation              := product.Generation()
+                                                              , MLBMQB                  := product.MQBMLB()
+                                                              , Power                   := product.Power()
+                                                              , Product                 := product.ID()
+                                                              , InventoryDate           := column.Period()
+                                                              , InventoryEndQty         := cell.EndingInventory()
+                                                              , InventoryMinQty         := cell.MinimumInventory()
+                                                              , InventoryMaxQty         := cell.MaximumInventory()
+                                                              , InventoryAveQty         := cell.AverageInventory()
+                                                              , FactoryName             := row.Unit()
+                                                              , VersionName             := macroplan.ScenarioName()
+                                                              , InterfaceTime           := nowdate
+                                                              );
+          loginfo.InventoryReport( relinsert, inventory );
+        }
+      }
+    }
+    loginfo.TotalRow( loginfo.InventoryReport( relsize ) );
+  *]
+}
diff --git a/_Main/BL/Type_InterfaceInventoryReport/_ROOT_Type_InterfaceInventoryReport.qbl b/_Main/BL/Type_InterfaceInventoryReport/_ROOT_Type_InterfaceInventoryReport.qbl
new file mode 100644
index 0000000..8b6815e
--- /dev/null
+++ b/_Main/BL/Type_InterfaceInventoryReport/_ROOT_Type_InterfaceInventoryReport.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type InterfaceInventoryReport
+{
+  #keys: '5[415136.0.1094697713][415136.0.1094697711][0.0.0][415136.0.1094697712][415136.0.1094697714]'
+  BaseType: Object
+  Description: '搴撳瓨鎶ヨ〃'
+  StructuredName: 'InterfaceInventoryReports'
+}
diff --git a/_Main/BL/Type_LibCal_CalendarRegistry/Method_InitializeEventTypes.qbl b/_Main/BL/Type_LibCal_CalendarRegistry/Method_InitializeEventTypes.qbl
index 09529ad..26b72b8 100644
--- a/_Main/BL/Type_LibCal_CalendarRegistry/Method_InitializeEventTypes.qbl
+++ b/_Main/BL/Type_LibCal_CalendarRegistry/Method_InitializeEventTypes.qbl
@@ -6,8 +6,8 @@
   [*
     // Always create a general EventCategory.
     //LibCal_EventCategory::Create( this, LibCal_EventType::DEFAULT_TYPE() );
-    this.EventType( relnew,ID := "blank", Name := LibCal_EventType::DEFAULT_TYPE() );
-    
+    eventtype := this.EventType( relnew,ID := "blank", Name := LibCal_EventType::DEFAULT_TYPE() );
+    eventtype.SetRootEvent();
     // Create additional EventCategories.
     //LibCal_EventCategory::InitializeEventCategories( this );
   *]
diff --git a/_Main/BL/Type_LibCal_EventEvent/StaticMethod_ValidateInput.qbl b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_ValidateInput.qbl
index d06fde8..9d72e56 100644
--- a/_Main/BL/Type_LibCal_EventEvent/StaticMethod_ValidateInput.qbl
+++ b/_Main/BL/Type_LibCal_EventEvent/StaticMethod_ValidateInput.qbl
@@ -3,6 +3,7 @@
 StaticMethod ValidateInput (
   output String feedback,
   LibCal_CalendarRegistry owner,
+  LibCal_EventType eventtype,
   String id,
   String name
 ) as Boolean
@@ -12,7 +13,7 @@
     // 鐢勫叞楦� May-31-2024 (created)
     feedback := '';
     
-    if( exists( owner, EventType, et, et.ID() = id or et.Name() = name ) ){
+    if( exists( owner, EventType, et, ( et.ID() = id or et.Name() = name ) and ( isnull( eventtype ) or eventtype <> et ) ) ){
       feedback := Translations::MP_LibCal_EventType_Exist();
     }
         
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
index 5977fc5..6e2063a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
@@ -135,7 +135,7 @@
       Properties:
       [
         Image: 'MONEY2'
-        Label: '鍙戝姩鏈虹墿娴佹垚鏈姤琛�'
+        Label: '鐗╂祦鎴愭湰鎶ヨ〃'
         Taborder: 10
       ]
     }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
index da19376..3bde815 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
@@ -113,6 +113,17 @@
         Title: '瑁呴厤涓婄嚎璁″垝+鏈哄姞涓嬬嚎璁″垝-MS64'
       ]
     }
+    Component MenuInterfaceInventoryReport
+    {
+      #keys: '[415136.0.1097611829]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'WAREHOUSE'
+        Taborder: 10
+        Title: 'Inventory report'
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuInterfaceInventoryReport_OnCl.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuInterfaceInventoryReport_OnCl.def
new file mode 100644
index 0000000..204f33a
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuInterfaceInventoryReport_OnCl.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: ContextMenuInterface/MenuInterfaceInventoryReport
+Response OnClick () id:Response_MacroPlanner_ContextMenuInterface_MenuInterfaceInventoryReport_OnClick
+{
+  #keys: '[415136.0.1097612114]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      currentuser     := QuintiqUser::CurrentUser().DisplayName();
+      InterfaceInventoryReport::GenerateData( MacroPlan, InterfaceDataset, currentuser );
+      
+      WebMessageBox::Success( "鎺ㄩ�佹垚鍔燂紒" );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnOk_OnClick.def
index dfdc08e..e650a93 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnOk_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditEventType/Response_pnlActions_btnOk_OnClick.def
@@ -9,7 +9,7 @@
   [*
     owner := LibCal_GlobalState.dhGlobalCalendarRegistry().Data();
     
-    return LibCal_EventType::ValidateInput( feedback, owner, efID.Text(), efName.Text() );
+    return LibCal_EventType::ValidateInput( feedback, owner, dhDialogData.Data().WrappedInstance(), efID.Text(), efName.Text() );
   *]
   QuillAction
   {
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Component_PanelNumberOfPeriods.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Component_PanelNumberOfPeriods.def
new file mode 100644
index 0000000..2061912
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Component_PanelNumberOfPeriods.def
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+Component PanelNumberOfPeriods #extension
+{
+  Children:
+  [
+    Component EditFieldNrOfFuturePeriods #extension
+    {
+      Properties:
+      [
+        Taborder: 2
+      ]
+    }
+    Component DateSelectorNumberOfPeriods
+    {
+      #keys: '[413988.0.1518900544]'
+      BaseType: 'WebDateSelector'
+      Properties:
+      [
+        Label: 'EndDate'
+        Taborder: 1
+      ]
+    }
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Component_pnlContent.def
new file mode 100644
index 0000000..466f09c
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Component_pnlContent.def
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+Component pnlContent #extension
+{
+  Children:
+  [
+    #child: PanelNumberOfPeriods
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnCre.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnCre.def
new file mode 100644
index 0000000..89173db
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnCre.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: PanelNumberOfPeriods/DateSelectorNumberOfPeriods
+Response OnCreated () id:Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnCreated
+{
+  #keys: '[413988.0.1519140003]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      this.Date( MacroPlan.StartOfPlanning().Date() + DataHolderDialogData.Data().NrOfFuturePeriod() );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnUse.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnUse.def
new file mode 100644
index 0000000..11b5b4a
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnUse.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: PanelNumberOfPeriods/DateSelectorNumberOfPeriods
+Response OnUserChanged () id:Response_MacroPlanner_PanelNumberOfPeriods_DateSelectorNumberOfPeriods_OnUserChanged
+{
+  #keys: '[413988.0.1519178748]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebDateTimeFieldBase_OnUserChanged'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
+  QuillAction
+  {
+    Body:
+    [*
+      EditFieldNrOfFuturePeriods.Text( [String] ( this.Date() - MacroPlan.StartOfPlanning().Date() ) );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/_ROOT_Component_DialogCreateEditPeriodSpec.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/_ROOT_Component_DialogCreateEditPeriodSpec.def
new file mode 100644
index 0000000..3c89090
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditPeriodSpec/_ROOT_Component_DialogCreateEditPeriodSpec.def
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: LibMacroPlannerWebUI
+OrphanComponent DialogCreateEditPeriodSpec #extension
+{
+  Children:
+  [
+    #child: pnlContent
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditShiftDayTime/Response_pnlContent_dtsEnd_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditShiftDayTime/Response_pnlContent_dtsEnd_OnCreated.def
new file mode 100644
index 0000000..b9f4385
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditShiftDayTime/Response_pnlContent_dtsEnd_OnCreated.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: pnlContent/dtsEnd
+Response OnCreated () id:Response_pnlContent_dtsEnd_OnCreated
+{
+  #keys: '[415754.0.188441775]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      this.DateTime( DateTime::Construct( 2024, 1, 1 ) );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditShiftDayTime/Response_pnlContent_dtsStart_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditShiftDayTime/Response_pnlContent_dtsStart_OnCreated.def
new file mode 100644
index 0000000..c6c2392
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditShiftDayTime/Response_pnlContent_dtsStart_OnCreated.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: pnlContent/dtsStart
+Response OnCreated () id:Response_pnlContent_dtsStart_OnCreated
+{
+  #keys: '[415754.0.186290699]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebComponent_OnCreated'
+  QuillAction
+  {
+    Body:
+    [*
+      this.DateTime( DateTime::Construct( 2024, 1, 1 ) );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
index f3e8113..a9043c1 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
@@ -17,7 +17,7 @@
       AssemblyOnlinePlanPPPSPush::GenerateData( MacroPlan, InterfaceDataset, currentuser, isactive );
     }
     
-    
+    WebMessageBox::Success( "鎺ㄩ�佹垚鍔燂紒" );
     Form.Close();
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Method_OnOk.def
index 47c63f3..46c7a34 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Method_OnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Method_OnOk.def
@@ -18,7 +18,7 @@
     currentuser     := QuintiqUser::CurrentUser().DisplayName();
     
     AOnlineAndMOfflinePlanMS64::GenerateData( InterfaceDataset, ddslFactory.Text(), dsStartDate.Date(), dsEndDate.Date(), efVersionFrom.Text(), efVersionTo.Text(), cbActiveVersion.Checked(), dhProducts.Data(), currentuser );
-    
+    WebMessageBox::Success( "鎺ㄩ�佹垚鍔燂紒" );
     Form.Close();
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
index 45026ea..83c953c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
@@ -11,7 +11,7 @@
     handle          := mdsinstance.GetMDSHandle()
     macroplan       := handle.AsMacroPlan();
     AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), macroplan, dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName() );
-    
+    WebMessageBox::Success( "鎺ㄩ�佹垚鍔燂紒" );
     Form.Close();
   *]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def
index 40877ed..ab59320 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_ListCalendarEventTypes.def
@@ -49,7 +49,9 @@
   ]
   Properties:
   [
-    CheckboxBehavior: 'include descendants'
+    CheckboxBehavior: 'must have descendants'
+    CheckboxCopy: true
+    CheckboxDecoration: 'detailed'
     SelectionCheckboxes: true
     Taborder: 1
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
index 842cdd6..f0cf4a9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
@@ -95,7 +95,6 @@
       [
         Identifier: 'Cell:sec'
         ObjectType: 'LibCal_SubscriberEventCell'
-        Precondition: 'object.LibCal_SubscriberEventColumn().Index() > 1'
         Taborder: 5
         Tooltip: "VALUE(guard( object.GetMatrixTooltip() , '' ))"
       ]

--
Gitblit v1.9.3