From 5951fe0975513b70ce01c9d12e43fb69836269f7 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期二, 20 八月 2024 11:52:56 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev

---
 _Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_VersionName.qbl                                                                         |    8 +
 _Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_Product.qbl                                                                             |    8 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mCC_EngineRackRep.def |   16 ++
 _Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_PlanningInventory.qbl                                                                   |    8 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def |   16 ++
 _Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_Fac.qbl                                                                                 |    8 +
 _Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl                                                                                 |    8 
 _Main/BL/Relations/Relation_InterfacePlanInventoryDataPush_InterfaceDataset_InterfaceDataset_In.qbl                                            |   23 +++
 _Main/BL/Type_TransferPlanRow/StaticMethod_IdentifyTheFactory.qbl                                                                              |   21 +++
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuEngineLogisticsCostReport.def                               |   41 +++++
 _Main/BL/Relations/Relation_FinancialProductionRow_Product_MP_Product_MP_FinancialProductionRow.qbl                                            |    2 
 /dev/null                                                                                                                                      |   16 --
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mMachineLogistics.def |   16 ++
 _Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl                                                                     |   25 +++
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl                                                                          |   38 ++---
 _Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_FactoryName.qbl                                                                         |    8 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def                                               |   39 -----
 _Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl                                                                         |   71 ++++-----
 _Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_InventoryDate.qbl                                                                       |    8 +
 _Main/BL/Type_InterfacePlanInventoryDataPush/_ROOT_Type_InterfacePlanInventoryDataPush.qbl                                                     |    9 +
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mDL_EngineRackRep.def |   16 ++
 _Main/BL/Relations/Relation_FinancialSalesRow_Product_MP_Product_MP_FinancialSalesRow.qbl                                                      |    2 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def                                               |   10 +
 23 files changed, 295 insertions(+), 122 deletions(-)

diff --git a/_Main/BL/Relations/Relation_FinancialProductionRow_Product_MP_Product_MP_FinancialProductionRow.qbl b/_Main/BL/Relations/Relation_FinancialProductionRow_Product_MP_Product_MP_FinancialProductionRow.qbl
index 8d2d046..efe61d9 100644
--- a/_Main/BL/Relations/Relation_FinancialProductionRow_Product_MP_Product_MP_FinancialProductionRow.qbl
+++ b/_Main/BL/Relations/Relation_FinancialProductionRow_Product_MP_Product_MP_FinancialProductionRow.qbl
@@ -16,7 +16,7 @@
   RelationSide.RightSide FinancialProductionRow
   {
     #keys: '3[415136.0.992900299][415136.0.992900298][415136.0.992900300]'
-    Cardinality: '0to1'
+    Cardinality: '1toN'
     ObjectDefinition: Product_MP
     OwningSide: 'Reference'
   }
diff --git a/_Main/BL/Relations/Relation_FinancialSalesRow_Product_MP_Product_MP_FinancialSalesRow.qbl b/_Main/BL/Relations/Relation_FinancialSalesRow_Product_MP_Product_MP_FinancialSalesRow.qbl
index 52154b2..6c3823a 100644
--- a/_Main/BL/Relations/Relation_FinancialSalesRow_Product_MP_Product_MP_FinancialSalesRow.qbl
+++ b/_Main/BL/Relations/Relation_FinancialSalesRow_Product_MP_Product_MP_FinancialSalesRow.qbl
@@ -16,7 +16,7 @@
   RelationSide.RightSide FinancialSalesRow
   {
     #keys: '3[415136.0.993115881][415136.0.993115880][415136.0.993115882]'
-    Cardinality: '0to1'
+    Cardinality: '1toN'
     ObjectDefinition: Product_MP
     OwningSide: 'Reference'
   }
diff --git a/_Main/BL/Relations/Relation_InterfacePlanInventoryDataPush_InterfaceDataset_InterfaceDataset_In.qbl b/_Main/BL/Relations/Relation_InterfacePlanInventoryDataPush_InterfaceDataset_InterfaceDataset_In.qbl
new file mode 100644
index 0000000..ffdf492
--- /dev/null
+++ b/_Main/BL/Relations/Relation_InterfacePlanInventoryDataPush_InterfaceDataset_InterfaceDataset_In.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation InterfacePlanInventoryDataPush_InterfaceDataset_InterfaceDataset_InterfacePlanInventoryDataPush
+{
+  #keys: '1[413988.0.1493874639]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide InterfaceDataset
+  {
+    #keys: '3[413988.0.1493874641][413988.0.1493874640][413988.0.1493874642]'
+    Cardinality: '0to1'
+    ObjectDefinition: InterfacePlanInventoryDataPush
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide InterfacePlanInventoryDataPush
+  {
+    #keys: '3[413988.0.1493874644][413988.0.1493874643][413988.0.1493874645]'
+    Cardinality: '1toN'
+    ObjectDefinition: InterfaceDataset
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
index a26e3e5..42c2471 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -30,16 +30,15 @@
     traverse( owner, FinancialProductionSource, source, not source.IsImport() ){//璐㈠姟浜ч噺鎶ヨ〃闈炲鍏�
       traverse( source, FinancialProductionReport, report, not report.IsShow() ){//璐㈠姟浜ч噺鎶ヨ〃涓嶆樉绀�
         traverse( report, FinancialProductionRow, row, row.Unit() = ccunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' ) ){//璐㈠姟浜ч噺鎶ヨ〃閲岀殑闀挎槬浜ч噺, 涓嶄负0
-          ccrow               := table.GetRow( row.Name() );
           product             := row.Product_MP();
           productparents      := product.GetAllParent();
           if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
             //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+            enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = ccunit );
             if( not isnull( enginecost ) ){
+              ccrow               := table.GetRow( row.Name() );
               products.Add( product );
               traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){
                 //鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环锛屽叆搴撻噺绛変簬闀挎槬浜ч噺
@@ -57,16 +56,15 @@
     traverse( owner, FinancialSalesSource, source, not source.IsImport() ){//璐㈠姟閿�閲忔姤琛ㄩ潪瀵煎叆
       traverse( source, FinancialSalesReport, report, not report.IsShow() ){//璐㈠姟閿�閲忔姤琛ㄤ笉鏄剧ず
         traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' ) ){//璐㈠姟閿�閲忔姤琛ㄩ噷鐨勯暱鏄ヤ骇閲�, 涓嶄负0
-          ccrow               := table.GetRow( row.Name() );
           product             := row.Product_MP();
           productparents      := product.GetAllParent();
           if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
             //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+            enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit 
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = ccunit );
             if( not isnull( enginecost ) ){
+              ccrow               := table.GetRow( row.Name() );
               products.Add( product );
               traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){
                 //鍑哄簱閲�/鍖呰瀹归噺*鍑哄簱鍗曚环锛屽叆搴撻噺绛変簬闀挎槬閿�閲�
@@ -94,21 +92,20 @@
           periodname         := periodtime.Format( "M2/D2/Y" );
           
           column             := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
-          traverse( trip, ProductInTrip, pit, pit.Quantity() = 0 ){
-            row              := table.GetRow( pit.ProductID() );
+          traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 ){
             product          := pit.Product_MP();
             productparents   := product.GetAllParent();
             if( exists( productparents, Elements, e, e.ID() = produtparent ) ){////鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
               //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-              enginecost       := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+              enginecost       := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower()
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit 
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = ccunit );
               //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
               transcost        := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = ccline 
                                                 and trans.Destination() = ccrent 
-                                                and exists( productparents, Elements, e, e.ID() = trans.Product() ) );
+                                                and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
               if( not isnull( enginecost ) and not isnull( transcost ) ){
+                row              := table.GetRow( pit.ProductID() );
                 products.Add( product );
                 //杩愯緭鏁伴噺/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环
                 quantity       := ceil( ceil( [Number]pit.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//鍥涜垗浜斿叆
@@ -125,22 +122,21 @@
       //鏄惁灞炰簬闀挎槬澶栫搴�
       isccrent               := table.IsInUnit( stockingpoint, ccrent );
       if( isccrent ){
-        traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() ){
+        traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() 
+                  and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ) ){
           //鑾峰彇琛�
           product            := pisp.Product_MP();
           productparents     := product.GetAllParent();
-          row                := table.GetRow( pisp.ProductID() );
           if( exists( productparents, Elements, e, e.ID() = produtparent ) ){////鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
             //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecost         := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+            enginecost         := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit 
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = ccunit );
             if( not isnull( enginecost ) ){
+              row                := table.GetRow( pisp.ProductID() );
               products.Add( product );
               //褰損roduct planning鐨勬棩鏈熷尯闂村湪闇�瑕佺殑鏃ユ湡鍖洪棿鍐� 
-              traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear
-                        ){
+              traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){
                 periodtime := pispip.Start().StartOfMonth().Date();
                 periodname := periodtime.Format( "M2/D2/Y" );
                 quantity   := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl
index bdd5f28..7df872f 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl
@@ -46,17 +46,16 @@
           periodname         := periodtime.Format( "M2/D2/Y" );
           
           column             := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
-          traverse( trip, ProductInTrip, pit, pit.Quantity() = 0 and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
+          traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 and not isnull( column ) and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
             quantity         := [Number]pit.Quantity();
             row              := table.GetRow( pit.ProductID() );
             product          := pit.Product_MP();
             productparents   := product.GetAllParent();
             if( isccrent ){//鐩殑鍦版槸闀挎槬澶栫搴�
               //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-              enginecost     := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+              enginecost     := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower()
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit 
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = ccunit );
               if( not isnull( enginecost ) ){
                 products.Add( product );
                 cell         := selectobject( row, Cell, cell, cell.Column() = column );
@@ -71,14 +70,13 @@
             }
             if( isdlrent ){//鐩殑鍦版槸澶ц繛澶栫搴�
               //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-              enginecost     := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+              enginecost     := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = dlunit 
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = dlunit  );
               //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
-              transcost      := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = dlline 
-                                                and trans.Destination() = dlrent 
-                                                and exists( productparents, Elements, e, e.ID() = trans.Product() ) );
+              transcost      := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = laneleg.OriginStockingPointID() 
+                                                and trans.Destination() = laneleg.DestinationStockingPointID() 
+                                                and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
               if( not isnull( enginecost ) and not isnull( transcost ) ){
                 products.Add( product );
                 cell         := selectobject( row, Cell, cell, cell.Column() = column );
@@ -95,17 +93,16 @@
     traverse( owner, FinancialProductionSource, source, not source.IsImport() ){//璐㈠姟浜ч噺鎶ヨ〃闈炲鍏�
       traverse( source, FinancialProductionReport, report, not report.IsShow() ){//璐㈠姟浜ч噺鎶ヨ〃涓嶆樉绀�
         traverse( report, FinancialProductionRow, row, row.Unit() = dlunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' ) ){//璐㈠姟浜ч噺鎶ヨ〃閲岀殑澶ц繛浜ч噺, 涓嶄负0
-          ccrow               := table.GetRow( row.Name() );
           product             := row.Product_MP();
           products.Add( product );
           productparents      := product.GetAllParent();
           if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
             //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecost        := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+            enginecost        := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = dlunit
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = dlunit );
             if( not isnull( enginecost ) ){
+              ccrow               := table.GetRow( row.Name() );
               traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){
                 column        := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() );
                 //澶ц繛澶栫搴撳叆搴撹垂鐢�
@@ -120,17 +117,16 @@
     traverse( owner, FinancialSalesSource, source, not source.IsImport() ){//璐㈠姟閿�閲忔姤琛ㄩ潪瀵煎叆
       traverse( source, FinancialSalesReport, report, not report.IsShow() ){//璐㈠姟閿�閲忔姤琛ㄤ笉鏄剧ず
         traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' ) ){//璐㈠姟閿�閲忔姤琛ㄩ噷鐨勫ぇ杩炰骇閲�, 涓嶄负0
-          ccrow               := table.GetRow( row.Name() );
           product             := row.Product_MP();
           productparents      := product.GetAllParent();
           if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
             products.Add( product );
             //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecost        := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+            enginecost        := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = dlunit
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = dlunit );
             if( not isnull( enginecost ) ){
+              ccrow               := table.GetRow( row.Name() );
               traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){
                 column        := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() );
                 //澶ц繛澶栫搴撳嚭搴撹垂鐢�
@@ -154,18 +150,17 @@
         iscc                   := table.IsInUnit( destisp, ccunit );
         if( isdl and iscc ){
           //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-          enginecost           := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+          enginecost           := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = ccunit );
           //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
-          transcost            := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = dlline 
-                                                  and trans.Destination() = dlrent 
-                                                  and exists( productparents, Elements, e, e.ID() = trans.Product() ) );
+          transcost            := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = tprow.SourceStockpoingPointID() 
+                                                  and trans.Destination() = tprow.TargetStockpoingPointID() 
+                                                  and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
           if( not isnull( enginecost ) and not isnull( transcost ) ){
             row                := table.GetRow( product.ID() );
             products.Add( product );
-            traverse( tprow,TransferPlanCell, tpcell, tpcell.TransferPlanColumn().ColumnDate() <> Date::MinDate() ){
+            traverse( tprow,TransferPlanCell, tpcell, tpcell.TransferPlanColumn().ColumnDate() <> Date::MinDate() and [Number]tpcell.Value() > 0){
               periodtime       := tpcell.TransferPlanColumn().ColumnDate().StartOfMonth();
               periodname       := periodtime.Format( "M2/D2/Y" );
               column           := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
@@ -179,7 +174,7 @@
       }
     }
     //闀挎槬鐭�旇繍杈撹垂鐢細瀹㈡埛闇�姹傛暟閲�/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环锛屽鎴烽渶姹傛暟閲忓彇鑷猣orecast閲宻ales segment涓洪暱鏄ョ殑鏁伴噺姹囨�伙紝鍐嶇敤鍏紡璁$畻锛屾湀搴﹁繘琛屾眹鎬伙紙鍙栧鎴烽渶姹傛暟閲忔崲绠楁垚杞︽锛�
-    traverse( owner, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.SalesSegment_MP() ) and forecast.StartDate() < startofnextyear ){
+    traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.Quantity() > 0 and not isnull( forecast.SalesSegment_MP() ) and forecast.StartDate() < startofnextyear ){
       salessegment            := forecast.SalesSegment_MP();
       parentsalessegments     := salessegment.GetAllParent();
       //鏄惁灞炰簬闀挎槬
@@ -188,16 +183,15 @@
         product               := forecast.Product_MP();
         productparents        := product.GetAllParent();
         if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-          row                 := table.GetRow( forecast.ProductID() );
           products.Add( forecast.Product_MP() );
           
           //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-          enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+          enginecost          := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                  and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit
-                                                 and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                 and engine.Factory() = ccunit );
           if( not isnull( enginecost ) ){
-            traverse( forecast, PlanningSalesDemandInPeriod, psdip ){
+            row                 := table.GetRow( forecast.ProductID() );
+            traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() > 0 ){
               periodtime       := psdip.StartDate().StartOfMonth();
               periodname       := periodtime.Format( "M2/D2/Y" );
         //      info( '-------------------------', periodname, periodtime );
@@ -220,14 +214,15 @@
       //鏄惁灞炰簬澶ц繛澶栫搴�
       isdlrent                := stockingpoint.ID() = dlrent or unit.ID() = dlrent or exists( parentunits, Elements, punit, punit.ID() = dlrent );
       if( isccrent or isdlrent ){
-        traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() ){
+        traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() 
+                  and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ) ){
           //鑾峰彇琛�
           product             := pisp.Product_MP();
           productparents      := product.GetAllParent();
           if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
             row               := table.GetRow( pisp.ProductID() );
             products.Add( pisp.Product_MP() );
-            traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear ){
+            traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0  ){
               periodtime      := pispip.Start().StartOfMonth().Date();
               periodname      := periodtime.Format( "M2/D2/Y" );
               column          := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
@@ -235,20 +230,18 @@
               
               if( isccrent ){
                 //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-                enginecost     := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+                enginecost     := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                    and engine.MLB_MQB() = product.MQBMLB()
-                                                   and engine.Factory() = ccunit 
-                                                   and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                   and engine.Factory() = ccunit );
                  if( not isnull( enginecost ) ){
                    cost        := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
                    cell.CCRentStorageCost( cell.CCRentStorageCost() + cost );
                  }
               } else {
                 //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-                enginecost     := selectobject( owner, LogisticsCostEngine, engine, engine.Generation() = product.Generation() 
+                enginecost     := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
                                                    and engine.MLB_MQB() = product.MQBMLB()
-                                                   and engine.Factory() = dlunit 
-                                                   and exists( productparents, Elements, e, e.ID() = engine.Product() ) );
+                                                   and engine.Factory() = dlunit  );
                  if( not isnull( enginecost ) ){
                    cost        := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
                    cell.DLRentStorageCost( cell.DLRentStorageCost() + cost );;
diff --git a/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_Fac.qbl b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_Fac.qbl
new file mode 100644
index 0000000..3448d61
--- /dev/null
+++ b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_Fac.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Fac
+{
+  #keys: '3[413988.0.1493874711][413988.0.1493874710][413988.0.1493874712]'
+  Description: '宸ュ巶绠�鍐�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_FactoryName.qbl b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_FactoryName.qbl
new file mode 100644
index 0000000..72c6407
--- /dev/null
+++ b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_FactoryName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute FactoryName
+{
+  #keys: '3[413988.0.1493874701][413988.0.1493874700][413988.0.1493874702]'
+  Description: '宸ュ巶鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_InventoryDate.qbl b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_InventoryDate.qbl
new file mode 100644
index 0000000..b79c4d2
--- /dev/null
+++ b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_InventoryDate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute InventoryDate
+{
+  #keys: '3[413988.0.1493874665][413988.0.1493874664][413988.0.1493874666]'
+  Description: '搴撳瓨鏃ユ湡'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_PlanningInventory.qbl b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_PlanningInventory.qbl
new file mode 100644
index 0000000..3c8d228
--- /dev/null
+++ b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_PlanningInventory.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute PlanningInventory
+{
+  #keys: '3[413988.0.1493874681][413988.0.1493874680][413988.0.1493874682]'
+  Description: '瀵瑰簲鏃ユ湡鐨勮鍒掑簱瀛樻暟閲�'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_Product.qbl b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_Product.qbl
new file mode 100644
index 0000000..73358d3
--- /dev/null
+++ b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_Product.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Product
+{
+  #keys: '3[413988.0.1493874655][413988.0.1493874654][413988.0.1493874656]'
+  Description: '鐗╂枡鍙�'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_VersionName.qbl b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_VersionName.qbl
new file mode 100644
index 0000000..790f6ec
--- /dev/null
+++ b/_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_VersionName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute VersionName
+{
+  #keys: '3[413988.0.1493874691][413988.0.1493874690][413988.0.1493874692]'
+  Description: '鐗堟湰鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl b/_Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl
new file mode 100644
index 0000000..a1631c3
--- /dev/null
+++ b/_Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GenerateData (
+  MacroPlan macroPlan,
+  InterfaceDataset interfaceDataset
+)
+{
+  TextBody:
+  [*
+    interfaceDataset.InterfacePlanInventoryDataPush( relflush );
+    
+    traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pispmp, not pispmp.IsSystem() and pispmp.IsLeaf() ) {
+      traverse ( pispmp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, not pispippl.IsPeriodFrozen() ) {
+        interfaceDataset.InterfacePlanInventoryDataPush( relnew,
+                                                         Product           := pispmp.ProductID(),
+                                                         InventoryDate     := pispippl.Start().Date(),
+                                                         PlanningInventory := [Number]pispippl.InventoryLevelEnd(),
+                                                         VersionName       := macroPlan.ScenarioName(),
+                                                         FactoryName       := ifexpr( pispmp.StockingPointID().Regex( "澶ц繛" ) or pispmp.StockingPointID().Regex( "DL" ), "澶ц繛宸ュ巶", "闀挎槬宸ュ巶" ),
+                                                         Fac               := ifexpr( pispmp.StockingPointID().Regex( "澶ц繛" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" )
+                                                        );
+      } 
+    }
+  *]
+}
diff --git a/_Main/BL/Type_InterfacePlanInventoryDataPush/_ROOT_Type_InterfacePlanInventoryDataPush.qbl b/_Main/BL/Type_InterfacePlanInventoryDataPush/_ROOT_Type_InterfacePlanInventoryDataPush.qbl
new file mode 100644
index 0000000..1f38056
--- /dev/null
+++ b/_Main/BL/Type_InterfacePlanInventoryDataPush/_ROOT_Type_InterfacePlanInventoryDataPush.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type InterfacePlanInventoryDataPush
+{
+  #keys: '5[413988.0.1493874636][413988.0.1493874634][0.0.0][413988.0.1493874635][413988.0.1493874637]'
+  BaseType: Object
+  StructuredName: 'InterfacePlanInventoryDataPushs'
+}
diff --git a/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl b/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl
index 3fa0a72..882d9cb 100644
--- a/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl
+++ b/_Main/BL/Type_TransferPlanCell/StaticMethod_GenerateReport.qbl
@@ -16,14 +16,14 @@
       traverse ( u, Lane.LaneLeg.Trip, t ) {
         traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 ) {
           // 鎵捐
-          tpr := TransferPlanRow::FindTransferPlanRowTypeIndex( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().Name(),
-                                                                t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().Name(),
+          tpr := TransferPlanRow::FindTransferPlanRowTypeIndex( TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ),
+                                                                TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ),
                                                                 pit.Product_MP().ID() );
           if ( isnull( tpr ) ) {
             tpr := macroPlan.TransferPlanRow( relnew, 
                                               RowNr                   := rowNr,
-                                              SourceStockpoingPointID := t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().Name(),
-                                              TargetStockpoingPointID := t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().Name(),
+                                              SourceStockpoingPointID := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP() ),
+                                              TargetStockpoingPointID := TransferPlanRow::IdentifyTheFactory( t.LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP() ),
                                               ProductID               := pit.Product_MP().ID() );     
           }
           
diff --git a/_Main/BL/Type_TransferPlanRow/StaticMethod_IdentifyTheFactory.qbl b/_Main/BL/Type_TransferPlanRow/StaticMethod_IdentifyTheFactory.qbl
new file mode 100644
index 0000000..88a5405
--- /dev/null
+++ b/_Main/BL/Type_TransferPlanRow/StaticMethod_IdentifyTheFactory.qbl
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod IdentifyTheFactory (
+  StockingPoint_MP spmp
+) as String
+{
+  TextBody:
+  [*
+    factory := "";
+    
+    if ( spmp.Name().Regex( "闀挎槬" ) or spmp.Name().Regex( "CC" ) ) {
+      factory := "CC";
+    } else if ( spmp.Name().Regex( "澶ц繛" ) or spmp.Name().Regex( "DL" ) ) {
+      factory := "DL";
+    } else {
+      factory := "鎵句笉鍒板睘浜庡摢涓伐鍘�";
+    }
+    
+    return factory;
+  *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
index 6028da1..5977fc5 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
@@ -91,17 +91,6 @@
         Taborder: 6
       ]
     }
-    Component bMachineLogisticsCostReport
-    {
-      #keys: '[413988.0.1467117990]'
-      BaseType: 'WebButton'
-      Properties:
-      [
-        Image: 'LOCATION_PIN'
-        Label: '鏈哄姞鐗╂祦鎴愭湰鎶ヨ〃'
-        Taborder: 7
-      ]
-    }
     Component ButtonScenarioComparisonDemandComparison id:ButtonScenarioComparisonDemandComparison_256
     {
       #keys: '[412672.1.90201789]'
@@ -110,7 +99,7 @@
       [
         Image: 'EQUALS'
         Label: '闇�姹傚姣�'
-        Taborder: 8
+        Taborder: 7
       ]
     }
     Component ButtonScheduleSummaryReport
@@ -135,28 +124,6 @@
         Taborder: 9
       ]
     }
-    Component bCC_EngineRackReport
-    {
-      #keys: '[413988.0.1477120930]'
-      BaseType: 'WebButton'
-      Properties:
-      [
-        Image: 'SATELLITE'
-        Label: '闀挎槬鍙戝姩鏈烘枡鏋舵姤琛�'
-        Taborder: 10
-      ]
-    }
-    Component bDL_EngineRackReport
-    {
-      #keys: '[413988.0.1488511896]'
-      BaseType: 'WebButton'
-      Properties:
-      [
-        Image: 'EARTH_LOCATION'
-        Label: '澶ц繛鍙戝姩鏈烘枡鏋舵姤琛�'
-        Taborder: 11
-      ]
-    }
     Component ButtonEngineLogisticsCostReport
     {
       #keys: '[415136.0.989557433]'
@@ -169,7 +136,7 @@
       [
         Image: 'MONEY2'
         Label: '鍙戝姩鏈虹墿娴佹垚鏈姤琛�'
-        Taborder: 12
+        Taborder: 10
       ]
     }
     Component ButtonAnnualPlanReport
@@ -180,7 +147,7 @@
       [
         Image: 'DOCUMENT_HEART'
         Label: '鍏ㄥ勾璁″垝鎶ヨ〃'
-        Taborder: 13
+        Taborder: 11
       ]
     }
   ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuEngineLogisticsCostReport.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuEngineLogisticsCostReport.def
index 90dcee1..e126415 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuEngineLogisticsCostReport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuEngineLogisticsCostReport.def
@@ -12,8 +12,8 @@
       Properties:
       [
         Description: 'CC engine logistics cost report'
-        Image: 'MONEY2'
-        Taborder: 0
+        Image: 'MONEY_COINS2'
+        Taborder: 1
         Title: '闀挎槬鍙戝姩鏈虹墿娴佹垚鏈姤琛�'
       ]
     }
@@ -24,11 +24,44 @@
       Properties:
       [
         Description: 'DL engine logistics cost report'
-        Image: 'MONEY2'
-        Taborder: 1
+        Image: 'PIGGY_BANK'
+        Taborder: 2
         Title: '澶ц繛鍙戝姩鏈虹墿娴佹垚鏈姤琛�'
       ]
     }
+    Component mMachineLogisticsCostReport
+    {
+      #keys: '[413988.0.1492770837]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'LOCATION_PIN'
+        Taborder: 0
+        Title: '鏈哄姞鐗╂祦鎴愭湰鎶ヨ〃'
+      ]
+    }
+    Component mCC_EngineRackReport
+    {
+      #keys: '[413988.0.1492701081]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'SATELLITE'
+        Taborder: 3
+        Title: '闀挎槬鍙戝姩鏈烘枡鏋舵姤琛�'
+      ]
+    }
+    Component mDL_EngineRackReport
+    {
+      #keys: '[413988.0.1492780876]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'EARTH_LOCATION'
+        Taborder: 4
+        Title: '澶ц繛鍙戝姩鏈烘枡鏋舵姤琛�'
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
index ac50d15..77bd762 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
@@ -38,6 +38,16 @@
         Title: 'Finished engine inventory'
       ]
     }
+    Component mInterfacePlanInventoryDataPush
+    {
+      #keys: '[413988.0.1495640230]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Taborder: 3
+        Title: '璁″垝搴撳瓨鏁版嵁鎺ㄩ�佹帴鍙f祴璇�'
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_bCC_EngineRackReport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_bCC_EngineRackReport_OnClick.def
deleted file mode 100644
index 1a91ad9..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_bCC_EngineRackReport_OnClick.def
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: ActionBarGroupReport/bCC_EngineRackReport
-Response OnClick () id:Response_MacroPlanner_ActionBarGroupReport_bCC_EngineRackReport_OnClick
-{
-  #keys: '[413988.0.1477121059]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  GroupServerCalls: true
-  QuillAction
-  {
-    Body:
-    [*
-      ApplicationScope.ViewManager().ResetUserViewById( "CCEngineRackReport", true);
-    *]
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_bDL_EngineRackReport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_bDL_EngineRackReport_OnClick.def
deleted file mode 100644
index 470ceb9..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_bDL_EngineRackReport_OnClick.def
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: ActionBarGroupReport/bDL_EngineRackReport
-Response OnClick () id:Response_MacroPlanner_ActionBarGroupReport_bDL_EngineRackReport_OnClick
-{
-  #keys: '[413988.0.1488512018]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  GroupServerCalls: true
-  QuillAction
-  {
-    Body:
-    [*
-      ApplicationScope.ViewManager().ResetUserViewById( "DLEngineRackReport", true);
-    *]
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_bMachineLogisticsCostReport_OnCli.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_bMachineLogisticsCostReport_OnCli.def
deleted file mode 100644
index aa3b46f..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_bMachineLogisticsCostReport_OnCli.def
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: ActionBarGroupReport/bMachineLogisticsCostReport
-Response OnClick () id:Response_MacroPlanner_ActionBarGroupReport_bMachineLogisticsCostReport_OnClick
-{
-  #keys: '[413988.0.1467020680]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebButton_OnClick'
-  GroupServerCalls: true
-  QuillAction
-  {
-    Body:
-    [*
-      ApplicationScope.ViewManager().ResetUserViewById( "MachineLogisticsCostReport", true);
-    *]
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mCC_EngineRackRep.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mCC_EngineRackRep.def
new file mode 100644
index 0000000..3669d97
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mCC_EngineRackRep.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ContextMenuEngineLogisticsCostReport/mCC_EngineRackReport
+Response OnClick () id:Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mCC_EngineRackReport_OnClick
+{
+  #keys: '[413988.0.1494079933]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      ApplicationScope.ViewManager().ResetUserViewById( "CCEngineRackReport", true);
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mDL_EngineRackRep.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mDL_EngineRackRep.def
new file mode 100644
index 0000000..8b50fba
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mDL_EngineRackRep.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ContextMenuEngineLogisticsCostReport/mDL_EngineRackReport
+Response OnClick () id:Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mDL_EngineRackReport_OnClick
+{
+  #keys: '[413988.0.1494298669]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      ApplicationScope.ViewManager().ResetUserViewById( "DLEngineRackReport", true);
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mMachineLogistics.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mMachineLogistics.def
new file mode 100644
index 0000000..fcc2046
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mMachineLogistics.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ContextMenuEngineLogisticsCostReport/mMachineLogisticsCostReport
+Response OnClick () id:Response_MacroPlanner_ContextMenuEngineLogisticsCostReport_mMachineLogisticsCostReport_OnClick
+{
+  #keys: '[413988.0.1492720600]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  GroupServerCalls: true
+  QuillAction
+  {
+    Body:
+    [*
+      ApplicationScope.ViewManager().ResetUserViewById( "MachineLogisticsCostReport", true);
+    *]
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def
new file mode 100644
index 0000000..10c1fc2
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ContextMenuInterface/mInterfacePlanInventoryDataPush
+Response OnClick () id:Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_OnClick
+{
+  #keys: '[413988.0.1495640258]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      InterfacePlanInventoryDataPush::GenerateData( MacroPlan, InterfaceDataset );
+    *]
+    GroupServerCalls: false
+  }
+}

--
Gitblit v1.9.3