From f1de76007e7834e17d87712e3342efd84876c200 Mon Sep 17 00:00:00 2001
From: lihongji <3117313295@qq.com>
Date: 星期六, 12 十月 2024 16:32:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 _Main/BL/Type_AssemblyOnlinePlanVersion/Method_GenerateColumn.qbl                                                                              |   65 +
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_Product.qbl                                                                            |    7 
 _Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_InterfaceDataset_InterfaceDataset_Assembl.qbl                                            |   23 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def                                              |   11 
 _Main/BL/Type_DispatchShiftPlan/StaticMethod_Dispatch.qbl                                                                                      |   50 +
 _Main/BL/Type_AssemblyOnlinePlanVersion/_ROOT_Type_AssemblyOnlinePlanVersion.qbl                                                               |   10 
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_TimeUnit.qbl                                                                        |    6 
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_Unit.qbl                                                                            |    6 
 _Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl                                                                      |  400 ++++++-----
 _Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl                                                                          |    3 
 _Main/BL/Type_AssemblyOnlinePlanVersion/Method_GetRow.qbl                                                                                      |   20 
 _Main/BL/Type_AssemblyOnlinePlanVersion/Method_GetColumnByTimeUnit.qbl                                                                         |   16 
 _Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl                                                                                 |    4 
 _Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl                                                                          |   98 +-
 _Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_IsShow.qbl                                                                                   |    7 
 _Main/BL/Type_AssemblyOnlinePlanVersion/DefaultValue_ID.qbl                                                                                    |    6 
 _Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_Name.qbl                                                                                     |    8 
 _Main/BL/Relations/Relation_AssemblyOnlinePlanVersionSearch_InterfaceDataset_InterfaceDataset_A.qbl                                            |   23 
 _Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GenerateData.qbl                                                                          |   62 +
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft#88.def                                                                |   61 -
 _Main/BL/Type_AssemblyOnlinePlanVersion/DefaultValue_Name.qbl                                                                                  |    6 
 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuBatchSetShiftPattern_OnClick.def |   17 
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_Unit.qbl                                                                               |    8 
 _Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_Column_AssemblyOnlinePlanVersionColumn_Ve.qbl                                            |   26 
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_ProductionLine.qbl                                                                     |    7 
 _Main/UI/MacroPlannerWebApp/Views/BatchSetShiftPattern.vw                                                                                      |  386 +++++++++++
 _Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_TimeUnit.qbl                                                                                 |    7 
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/_ROOT_Type_AssemblyOnlinePlanVersionSearch.qbl                                                   |   10 
 _Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_StartDate.qbl                                                                                |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def                                                                          |    6 
 _Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_EndDate.qbl                                                                                  |    7 
 /dev/null                                                                                                                                      |  285 --------
 _Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GetDefaultName.qbl                                                                        |   10 
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_Product.qbl                                                                         |    6 
 _Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GetDefaultAllUnit.qbl                                                                     |   10 
 _Main/BL/Relations/Relation_DispatchShiftPlan_Archive_Archive_DispatchShiftPlan.qbl                                                            |   23 
 _Main/BL/Type_AssemblyOnlinePlanVersionRow/Method_InitializeCell.qbl                                                                           |   12 
 _Main/BL/Type_AssemblyOnlinePlanVersionRow/Method_Initialize.qbl                                                                               |   14 
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_EndDate.qbl                                                                            |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def                                                                    |   38 
 _Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl                                                                          |   64 +
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_TimeUnit.qbl                                                                           |    8 
 _Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_Row_AssemblyOnlinePlanVersionRow_Version.qbl                                             |   23 
 _Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_ID.qbl                                                                                       |    8 
 _Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl                                                                            |    9 
 _Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl                                                                           |   38 +
 _Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_StartDate.qbl                                                                          |    7 
 47 files changed, 1,272 insertions(+), 663 deletions(-)

diff --git a/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersionColumn_InterfaceDataset_InterfaceDataset_A.qbl b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersionColumn_InterfaceDataset_InterfaceDataset_A.qbl
deleted file mode 100644
index 5933f11..0000000
--- a/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersionColumn_InterfaceDataset_InterfaceDataset_A.qbl
+++ /dev/null
@@ -1,34 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation AssemblyOnlinePlanVersionColumn_InterfaceDataset_InterfaceDataset_AssemblyOnlinePlanVersionColumn
-{
-  #keys: '1[415136.0.1176550032]'
-  DeclarativeSequenceRelationStrategy
-  {
-    #keys: '13[0.0.0][415136.0.1176550051][415136.0.1176550045][415136.0.1176550052][415136.0.1176550046][415136.0.1176550053][415136.0.1176550047][415136.0.1176550054][415136.0.1176550048][415136.0.1176550055][415136.0.1176550049][415136.0.1176550056][415136.0.1176550050]'
-    SequenceElementSuffix: 'AssemblyOnlinePlanVersionColumn'
-    SequenceSuffix: 'AssemblyOnlinePlanVersionColumn'
-    SortAttributes:
-    [
-      DeclarativeSequenceRelationSortAttribute
-      {
-        #keys: '1[415136.0.1176550058]'
-        Attribute: 'ColumnDate'
-      }
-    ]
-  }
-  RelationSide.LeftSide InterfaceDataset
-  {
-    #keys: '3[415136.0.1176550034][415136.0.1176550033][415136.0.1176550035]'
-    Cardinality: '0to1'
-    ObjectDefinition: AssemblyOnlinePlanVersionColumn
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide AssemblyOnlinePlanVersionColumn
-  {
-    #keys: '3[415136.0.1176550037][415136.0.1176550036][415136.0.1176550038]'
-    Cardinality: '1toN'
-    ObjectDefinition: InterfaceDataset
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersionRow_InterfaceDataset_InterfaceDataset_Asse.qbl b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersionRow_InterfaceDataset_InterfaceDataset_Asse.qbl
deleted file mode 100644
index 7b963fb..0000000
--- a/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersionRow_InterfaceDataset_InterfaceDataset_Asse.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation AssemblyOnlinePlanVersionRow_InterfaceDataset_InterfaceDataset_AssemblyOnlinePlanVersionRow
-{
-  #keys: '1[415136.0.1176550018]'
-  DefaultRelationStrategy
-  {
-  }
-  RelationSide.LeftSide InterfaceDataset
-  {
-    #keys: '3[415136.0.1176550020][415136.0.1176550019][415136.0.1176550021]'
-    Cardinality: '0to1'
-    ObjectDefinition: AssemblyOnlinePlanVersionRow
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide AssemblyOnlinePlanVersionRow
-  {
-    #keys: '3[415136.0.1176550023][415136.0.1176550022][415136.0.1176550024]'
-    Cardinality: '1toN'
-    ObjectDefinition: InterfaceDataset
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersionSearch_InterfaceDataset_InterfaceDataset_A.qbl b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersionSearch_InterfaceDataset_InterfaceDataset_A.qbl
new file mode 100644
index 0000000..a609a97
--- /dev/null
+++ b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersionSearch_InterfaceDataset_InterfaceDataset_A.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation AssemblyOnlinePlanVersionSearch_InterfaceDataset_InterfaceDataset_AssemblyOnlinePlanVersionSearch
+{
+  #keys: '1[415136.0.1184120209]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide InterfaceDataset
+  {
+    #keys: '3[415136.0.1184120211][415136.0.1184120210][415136.0.1184120212]'
+    Cardinality: '0to1'
+    ObjectDefinition: AssemblyOnlinePlanVersionSearch
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide AssemblyOnlinePlanVersionSearch
+  {
+    #keys: '3[415136.0.1184120214][415136.0.1184120213][415136.0.1184120215]'
+    Cardinality: '0to1'
+    ObjectDefinition: InterfaceDataset
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_Column_AssemblyOnlinePlanVersionColumn_Ve.qbl b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_Column_AssemblyOnlinePlanVersionColumn_Ve.qbl
new file mode 100644
index 0000000..48d0b14
--- /dev/null
+++ b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_Column_AssemblyOnlinePlanVersionColumn_Ve.qbl
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+#parent: #root
+Relation AssemblyOnlinePlanVersion_Column_AssemblyOnlinePlanVersionColumn_Version
+{
+  #keys: '1[415136.0.1184171015]'
+  DeclarativeSequenceRelationStrategy
+  {
+    #keys: '13[0.0.0][415136.0.1184171034][415136.0.1184171028][415136.0.1184171035][415136.0.1184171029][415136.0.1184171036][415136.0.1184171030][415136.0.1184171037][415136.0.1184171031][415136.0.1184171038][415136.0.1184171032][415136.0.1184171039][415136.0.1184171033]'
+    SequenceElementSuffix: 'VersionColumn'
+    SequenceSuffix: 'VersionColumn'
+  }
+  RelationSide.LeftSide Column
+  {
+    #keys: '3[415136.0.1184171017][415136.0.1184171016][415136.0.1184171018]'
+    Cardinality: '1toN'
+    ObjectDefinition: AssemblyOnlinePlanVersion
+    OwningSide: 'Owned'
+  }
+  RelationSide.RightSide Version
+  {
+    #keys: '3[415136.0.1184171020][415136.0.1184171019][415136.0.1184171021]'
+    Cardinality: '0to1'
+    ObjectDefinition: AssemblyOnlinePlanVersionColumn
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_InterfaceDataset_InterfaceDataset_Assembl.qbl b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_InterfaceDataset_InterfaceDataset_Assembl.qbl
new file mode 100644
index 0000000..71f40c8
--- /dev/null
+++ b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_InterfaceDataset_InterfaceDataset_Assembl.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation AssemblyOnlinePlanVersion_InterfaceDataset_InterfaceDataset_AssemblyOnlinePlanVersion
+{
+  #keys: '1[415136.0.1184171001]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide InterfaceDataset
+  {
+    #keys: '3[415136.0.1184171003][415136.0.1184171002][415136.0.1184171004]'
+    Cardinality: '0to1'
+    ObjectDefinition: AssemblyOnlinePlanVersion
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide AssemblyOnlinePlanVersion
+  {
+    #keys: '3[415136.0.1184171006][415136.0.1184171005][415136.0.1184171007]'
+    Cardinality: '1toN'
+    ObjectDefinition: InterfaceDataset
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_Row_AssemblyOnlinePlanVersionRow_Version.qbl b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_Row_AssemblyOnlinePlanVersionRow_Version.qbl
new file mode 100644
index 0000000..503edde
--- /dev/null
+++ b/_Main/BL/Relations/Relation_AssemblyOnlinePlanVersion_Row_AssemblyOnlinePlanVersionRow_Version.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation AssemblyOnlinePlanVersion_Row_AssemblyOnlinePlanVersionRow_Version
+{
+  #keys: '1[415136.0.1184170985]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Row
+  {
+    #keys: '3[415136.0.1184170987][415136.0.1184170986][415136.0.1184170988]'
+    Cardinality: '1toN'
+    ObjectDefinition: AssemblyOnlinePlanVersion
+    OwningSide: 'Owned'
+  }
+  RelationSide.RightSide Version
+  {
+    #keys: '3[415136.0.1184170990][415136.0.1184170989][415136.0.1184170991]'
+    Cardinality: '0to1'
+    ObjectDefinition: AssemblyOnlinePlanVersionRow
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_DispatchShiftPlan_Archive_Archive_DispatchShiftPlan.qbl b/_Main/BL/Relations/Relation_DispatchShiftPlan_Archive_Archive_DispatchShiftPlan.qbl
new file mode 100644
index 0000000..f45c374
--- /dev/null
+++ b/_Main/BL/Relations/Relation_DispatchShiftPlan_Archive_Archive_DispatchShiftPlan.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation DispatchShiftPlan_Archive_Archive_DispatchShiftPlan
+{
+  #keys: '1[414996.1.121982603]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Archive
+  {
+    #keys: '3[414996.1.121982605][414996.1.121982604][414996.1.121982606]'
+    Cardinality: '0to1'
+    ObjectDefinition: DispatchShiftPlan
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide DispatchShiftPlan
+  {
+    #keys: '3[414996.1.121982608][414996.1.121982607][414996.1.121982609]'
+    Cardinality: '1toN'
+    ObjectDefinition: Archive
+    OwningSide: 'Owned'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_DispatchShiftPlan_RecycleBin_RecycleBin_DispatchShiftPlan.qbl b/_Main/BL/Relations/Relation_DispatchShiftPlan_RecycleBin_RecycleBin_DispatchShiftPlan.qbl
deleted file mode 100644
index 37b7f50..0000000
--- a/_Main/BL/Relations/Relation_DispatchShiftPlan_RecycleBin_RecycleBin_DispatchShiftPlan.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation DispatchShiftPlan_RecycleBin_RecycleBin_DispatchShiftPlan
-{
-  #keys: '1[414996.1.17706936]'
-  DefaultRelationStrategy
-  {
-  }
-  RelationSide.LeftSide RecycleBin
-  {
-    #keys: '3[414996.1.17706938][414996.1.17706937][414996.1.17706939]'
-    Cardinality: '0to1'
-    ObjectDefinition: DispatchShiftPlan
-    OwningSide: 'Reference'
-  }
-  RelationSide.RightSide DispatchShiftPlan
-  {
-    #keys: '3[414996.1.17706941][414996.1.17706940][414996.1.17706942]'
-    Cardinality: '1toN'
-    ObjectDefinition: RecycleBin
-    OwningSide: 'Owned'
-  }
-}
diff --git a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
index 6c48d50..a2c55cc 100644
--- a/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_AOnlineAndMOfflinePlanPIR/StaticMethod_GenerateData.qbl
@@ -3,7 +3,7 @@
 StaticMethod GenerateData (
   InterfaceDataset owner,
   String werk,
-  const MacroPlan macroplan,
+  String version,
   Date startdate,
   Date enddate,
   String executor
@@ -33,41 +33,43 @@
                                                       , ReturnMsg := 'Success'
                                                       , Success := true
                                                       );
-    pir                    := owner.AOnlineAndMOfflinePlanPIR( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := werk, Version := macroplan.ScenarioName(), StartDate := startdate, EndDate := enddate );
+    pir                    := owner.AOnlineAndMOfflinePlanPIR( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := werk, Version := version, StartDate := startdate, EndDate := enddate );
     loginfo.AOnlineAndMOfflinePlanPIR( relinsert, pir );
-    traverse( macroplan, AssemblyOnlinePlanColumn, column, column.ColumnDate() >= startdate and column.ColumnDate() <= enddate ){
-      traverse( column, AssemblyOnlinePlanCell, cell, ( werk = 'All' or cell.AssemblyOnlinePlanRow().ProductionLine().FindString( werk, 0 ) > -1 )
-                and cell.AssemblyOnlinePlanRow().Type() = '1' ){
-        quantityrow        := cell.AssemblyOnlinePlanRow();
-        if( not exists( productids, Elements, e, e = quantityrow.ProductID() ) ){
-          productids.Add( quantityrow.ProductID() );
-        }
-    
-        pir.PIRData( relnew, Product           := quantityrow.ProductID()
-                     , PlanningDate            := column.ColumnDate()
-                     , PlanningQty             := [Number]cell.Value());
-      }
-    }
-    
-    traverse( macroplan, OfflinePlanTable, table ){
-      traverse( table, OfflinePlanColumn, column, column.ColumnDate() >= startdate and column.ColumnDate() <= enddate ){
-        traverse( column, OfflinePlanCell, cell, ( werk = 'All' or cell.OfflinePlanRow().ProductionLine().FindString( werk, 0 ) > -1 )
-                  and ( cell.OfflinePlanRow().ProductionLine() <> 'DL_MOMO' or cell.OfflinePlanRow().ProductionLine() <> 'CC_MOMO' )
-                  and cell.OfflinePlanRow().Type() = '1' ){
-          row              := cell.OfflinePlanRow();
-          if( not exists( productids, Elements, e, e = row.ProductID() ) ){
-            productids.Add( row.ProductID() );
+    traverse( owner, AssemblyOnlinePlanVersion, verison, not verison.IsShow() ){
+      traverse( verison, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() >= startdate and column.StartDate() <= enddate ){
+        traverse( column, Cell, cell, ( werk = 'All' or cell.Row().ProductionLine().FindString( werk, 0 ) > -1 )
+                  and cell.Row().Type() = '1' ){
+          quantityrow        := cell.Row();
+          if( not exists( productids, Elements, e, e = quantityrow.ProductID() ) ){
+            productids.Add( quantityrow.ProductID() );
           }
-          pirdata          := selectobject(  pir, PIRData, pirdata, pirdata.Product() = row.ProductID() and pirdata.PlanningDate() = column.ColumnDate() );
-          if( isnull( pirdata ) ){
-            pirdata          := pir.PIRData( relnew, Product         := row.ProductID()
-                                             , PlanningDate            := column.ColumnDate()
-                                             , PlanningQty             := 0 );
-          }
-          pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Value() );
+      
+          pir.PIRData( relnew, Product           := quantityrow.ProductID()
+                       , PlanningDate            := column.StartDate()
+                       , PlanningQty             := [Number]cell.Value());
         }
       }
     }
+    
+    //traverse( version, OfflinePlanTable, table ){
+    //  traverse( table, OfflinePlanColumn, column, column.ColumnDate() >= startdate and column.ColumnDate() <= enddate ){
+    //    traverse( column, OfflinePlanCell, cell, ( werk = 'All' or cell.OfflinePlanRow().ProductionLine().FindString( werk, 0 ) > -1 )
+    //              and ( cell.OfflinePlanRow().ProductionLine() <> 'DL_MOMO' or cell.OfflinePlanRow().ProductionLine() <> 'CC_MOMO' )
+    //              and cell.OfflinePlanRow().Type() = '1' ){
+    //      row              := cell.OfflinePlanRow();
+    //      if( not exists( productids, Elements, e, e = row.ProductID() ) ){
+    //        productids.Add( row.ProductID() );
+    //      }
+    //      pirdata          := selectobject(  pir, PIRData, pirdata, pirdata.Product() = row.ProductID() and pirdata.PlanningDate() = column.ColumnDate() );
+    //      if( isnull( pirdata ) ){
+    //        pirdata          := pir.PIRData( relnew, Product         := row.ProductID()
+    //                                         , PlanningDate            := column.ColumnDate()
+    //                                         , PlanningQty             := 0 );
+    //      }
+    //      pirdata.PlanningQty( pirdata.PlanningQty() + [Number]cell.Value() );
+    //    }
+    //  }
+    //}
     traverse( productids, Elements, e ){
       for( date := startdate.StartOfWeek(); date <= enddate; date := ( date + Duration::Days( 1 ) ).Date() ){
         if( not exists( pir, PIRData, pirdata, pirdata.Product() = e and pirdata.PlanningDate() = date ) ){
diff --git a/_Main/BL/Type_AssemblyOnlinePlanCell0/StaticMethod_RefreshData.qbl b/_Main/BL/Type_AssemblyOnlinePlanCell0/StaticMethod_RefreshData.qbl
deleted file mode 100644
index 457a74f..0000000
--- a/_Main/BL/Type_AssemblyOnlinePlanCell0/StaticMethod_RefreshData.qbl
+++ /dev/null
@@ -1,36 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod RefreshData (
-  MacroPlan macroPlan,
-  OfflinePlanTable opt
-)
-{
-  TextBody:
-  [*
-    macroPlan.AssemblyOnlinePlanRow( relflush );
-    macroPlan.AssemblyOnlinePlanColumn( relflush );
-    
-    // 鎵捐閰嶇嚎琛�
-    oprs := selectsortedset( opt, OfflinePlanRow, tempOPR, tempOPR.ProductionLine() = "DL-MoMo" or tempOPR.ProductionLine() = "CC-MoMo", tempOPR.ProductionLine(), tempOPR.ProductID(), tempOPR.Type() );
-    opcs := selectsortedset( opt, OfflinePlanColumn, tempOPC, true, tempOPC.ColumnDate() );
-    
-    // 鐢熸垚琛ㄦ牸
-    traverse ( opcs, Elements, opc ) {
-      aopc := macroPlan.AssemblyOnlinePlanColumn( relnew, ColumnDate := opc.ColumnDate(), ColumnIndex := opc.ColumnIndex() );
-      traverse ( oprs, Elements, opr ) {
-        aopr := select( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductID() = opr.ProductID() and tempAOPR.ProductionLine() = opr.ProductionLine() and tempAOPR.Type() = opr.Type() );
-        if ( isnull( aopr ) ) {
-          aopr := macroPlan.AssemblyOnlinePlanRow( relnew, ProductID := opr.ProductID(), ProductionLine := opr.ProductionLine(), Type := opr.Type() );
-        }
-        
-        cellOPC := select( opr, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanColumn() = opc );
-        if ( not isnull( cellOPC ) ) {
-          cellAOPC := aopc.AssemblyOnlinePlanCell( relnew, Value := cellOPC.Value() );
-          cellAOPC.AssemblyOnlinePlanRow( relset, aopr );
-        }
-      }
-    }
-    
-    // 澶勭悊鏃ュ巻浜嬩欢
-  *]
-}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_ColumnDate.qbl b/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_ColumnDate.qbl
deleted file mode 100644
index b0847b4..0000000
--- a/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_ColumnDate.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute ColumnDate
-{
-  #keys: '3[415136.0.1174730129][415136.0.1174730128][415136.0.1174730130]'
-  ValueType: Date
-}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_EndDate.qbl b/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_EndDate.qbl
new file mode 100644
index 0000000..e6452cc
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_EndDate.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute EndDate
+{
+  #keys: '3[415136.0.1184120166][415136.0.1184120165][415136.0.1184120167]'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_StartDate.qbl b/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_StartDate.qbl
new file mode 100644
index 0000000..c463f8c
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_StartDate.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute StartDate
+{
+  #keys: '3[415136.0.1184120156][415136.0.1184120155][415136.0.1184120157]'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_TimeUnit.qbl b/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_TimeUnit.qbl
new file mode 100644
index 0000000..64a3f83
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanColumn0/Attribute_TimeUnit.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute TimeUnit
+{
+  #keys: '3[415136.0.1184120146][415136.0.1184120145][415136.0.1184120147]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_ID.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_ID.qbl
new file mode 100644
index 0000000..56650e3
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_ID.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ID
+{
+  #keys: '3[415136.0.1184170976][415136.0.1184170975][415136.0.1184170977]'
+  IsReadOnly: true
+  ValueType: String
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_IsShow.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_IsShow.qbl
new file mode 100644
index 0000000..fe07e2e
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_IsShow.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsShow
+{
+  #keys: '3[415136.0.1184120223][415136.0.1184120222][415136.0.1184120224]'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_Name.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_Name.qbl
new file mode 100644
index 0000000..4c79acc
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/Attribute_Name.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+  #keys: '3[415136.0.1184170979][415136.0.1184170978][415136.0.1184170980]'
+  Description: '鍚嶇О'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/DefaultValue_ID.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/DefaultValue_ID.qbl
new file mode 100644
index 0000000..049abc0
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/DefaultValue_ID.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: ID
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/DefaultValue_Name.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/DefaultValue_Name.qbl
new file mode 100644
index 0000000..86c3d59
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/DefaultValue_Name.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Name
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/Method_GenerateColumn.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/Method_GenerateColumn.qbl
new file mode 100644
index 0000000..92c1367
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/Method_GenerateColumn.qbl
@@ -0,0 +1,65 @@
+Quintiq file version 2.0
+#parent: #root
+Method GenerateColumn (
+  Dates periods,
+  String timeunit,
+  Date starttime,
+  Date endtime
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    mindate               := min( periods, Elements, period, period );
+    maxdate               := max( periods, Elements, period, period );
+    //鏌ヨ鏃ユ湡杩斿洖闇�瑕佸湪璁″垝鏃ユ湡涔嬪唴
+    if( starttime < mindate and endtime > maxdate ){
+      if( starttime < mindate ){
+        starttime             := mindate;
+      }
+      if( endtime > maxdate ){
+        endtime               := maxdate;
+      }
+      if( timeunit = Translations::MP_GlobalParameters_Day() ){
+        for( start := starttime; start <= endtime; start := start.DateTime().StartOfNextDay().Date() ){
+          periodname          := start.Format( "M2/D2/Y" );
+          if( not exists( this, Column, column, column.StartDate() = start ) ){
+            this.Column( relnew, ColumnName := periodname, StartDate := start, EndDate := start, TimeUnit := Translations::MP_GlobalParameters_Day() );
+          }
+        }
+      }else if( timeunit = Translations::MP_GlobalParameters_Week() ){
+    //    weekstartstr          := ' KW';
+        for( start := starttime; start <= endtime; start := start.StartOfNextWeek() ){
+          weekend             := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//.Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) )
+          
+          this.Column( relnew, ColumnName := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+        }
+      }else if( timeunit = Translations::MP_GlobalParameters_Month() ){
+        for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){
+          monthend            := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date();//.Concat( ' ' ).Concat( monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( '鏈�' ) )
+    //      us_locale := Locale::Construct( 'en_us' );
+          this.Column( relnew, ColumnName := monthend.Format( "M2/D2/Y" ), StartDate := start, EndDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() );
+        }
+      }
+    }
+    //weekstart             := periods.Element( 0 );
+    //monthstart            := periods.Element( 0 );
+    //traverse( periods, Elements, periodtime ){
+    //  periodname          := periodtime.Format( "M2/D2/Y" );
+    //  
+    //  this.Column( relnew, Name := periodname, StartDate := periodtime, EndDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() );
+    //  
+    //  if( periodtime = weekstart ){
+    //    weekperiodname    := weekstart.Format( "M2/D2/Y" );
+    //    this.Column( relnew, Name := weekperiodname, StartDate := weekstart, EndDate := ( weekstart + Duration::Days( 6 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() );
+    //    weekstart         := ( weekstart + Duration::Days( 7 ) ).Date();
+    //  }
+    //  if( periodtime = monthstart ){
+    //    monthperiodname   := monthstart.Format( "M2/D2/Y" );
+    //    enddate           := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date();
+    //    this.Column( relnew, Name := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() );
+    //    monthstart        := monthstart.StartOfNextMonth();
+    //  }
+    //}
+  *]
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/Method_GetColumnByTimeUnit.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/Method_GetColumnByTimeUnit.qbl
new file mode 100644
index 0000000..1b4a90e
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/Method_GetColumnByTimeUnit.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetColumnByTimeUnit (
+  String unit,
+  Date period
+) as AssemblyOnlinePlanVersionColumn
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-7-2024 (created)
+    
+    column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period and column.TimeUnit() = unit );
+    
+    return column;
+  *]
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/Method_GetRow.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/Method_GetRow.qbl
new file mode 100644
index 0000000..8e5337b
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/Method_GetRow.qbl
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetRow (
+  const AssemblyOnlinePlanRow aoprow
+) as AssemblyOnlinePlanVersionRow
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Oct-11-2024 (created)
+    row := selectobject( this, Row, row, row.ProductID() = aoprow.ProductID() and row.ProductionLine() = aoprow.ProductionLine() and row.Type() = aoprow.Type() );
+    
+    if( isnull( row ) ){
+      row := this.Row( relnew, ProductID := aoprow.ProductID(), ProductionLine := aoprow.ProductionLine(), Type := aoprow.Type() );
+      //鍒濆鍖栧崟鍏冩牸
+      row.InitializeCell();
+    }
+    
+    return row;
+  *]
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GenerateData.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GenerateData.qbl
new file mode 100644
index 0000000..0cbe54d
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GenerateData.qbl
@@ -0,0 +1,62 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GenerateData (
+  InterfaceDataset interface,
+  RecycleBin recycle,
+  const Archive archive
+)
+{
+  Description: '鐢熸垚鍙互涓嬪彂鐨勫鎴烽渶姹傦紙PPA+IDS锛夋暟鎹�'
+  TextBody:
+  [*
+    // 鐢勫叞楦� Aug-20-2024 (created)
+    interface.CustomerDemandIDS( relflush );
+    interface.CustomerDemandIDSSearch( relflush );
+    allunit               := CustomerDemandIDS::GetDefaultAllUnit();
+    interface.CustomerDemandIDSSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit );
+    idstable              := interface.CustomerDemandIDS( relnew, ID := '瀹㈡埛闇�姹�', Name := '瀹㈡埛闇�姹�' );
+    binaryValue           := TemplateManager::GetIDSFullTable( archive, Date::ActualDate().Year() );
+    source                := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
+    source.ReadStructure();
+    Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
+    cnv2 := StringToDate::StandardConverter();
+    cnv2.SetCustomConversion();
+    cnv2.CustomFormatString( "yyyy/MM/dd" );
+    idsdates              := selectuniquevalues( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() > 2, cnv2.Convert( column.Name() ) );
+    ppadates              := selectuniquevalues( interface, InterfaceForecast, forecast, forecast.Origin() = 'PPA', forecast.Date() );
+    //ppadates              := construct( Dates );
+    //traverse( macroplan, SalesDemand.astype( Forecast ), forecast, forecast.Origin() = 'PPA' ){
+    //  ppadates            := ppadates.Union( selectuniquevalues( forecast, PlanningSalesDemandInPeriod, salesdemand, salesdemand.StartDate() ) );
+    //}
+    periods               := idsdates.Union( ppadates );
+    periods               := selectuniquevalues( periods, Elements, e, e );
+    idstable.GenerateColumn( periods.Sort() );
+    traverse( recycle, GeneralExcelImportAndExportDataSource.GeneralExcelImportAndExportDataTable, table ){
+      traverse( table, GeneralExcelImportAndExportDataRow, row ){
+        productcell       := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
+        factorycell       := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 );
+        idsrow            := idstable.GetRowByUnit( productcell.Value(), factorycell.Value() );
+        traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){
+          period          := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() );
+          daycolumn       := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), period );
+          weekcolumn      := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Week(), period );
+          monthcolumn     := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Month(), period );
+          idsrow.SetCellValue( daycolumn, [Number]cell.Value() );
+          idsrow.SetCellValue( weekcolumn, [Number]cell.Value() );
+          idsrow.SetCellValue( monthcolumn, [Number]cell.Value() );
+        }
+      }
+    }
+    traverse( interface, InterfaceForecast, forecast, forecast.Origin() = 'PPA' ){
+      idsrow              := idstable.GetRowByUnit( forecast.PartNumber(), forecast.Factory() );
+      daycolumn           := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), forecast.Date() );
+      weekcolumn          := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Week(), forecast.Date() );
+      monthcolumn         := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Month(), forecast.Date() );
+      idsrow.SetCellValue( daycolumn, [Number]forecast.Quantity() );
+      idsrow.SetCellValue( weekcolumn, [Number]forecast.Quantity() );
+      idsrow.SetCellValue( monthcolumn, [Number]forecast.Quantity() );
+    }
+    
+    source.Delete();
+  *]
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GetDefaultAllUnit.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GetDefaultAllUnit.qbl
new file mode 100644
index 0000000..e912c3f
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GetDefaultAllUnit.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultAllUnit () const declarative as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '<All>';
+  *]
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GetDefaultName.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GetDefaultName.qbl
new file mode 100644
index 0000000..0193933
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_GetDefaultName.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultName () const declarative as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '瑁呴厤涓婄嚎璁″垝鍏ㄩ噺琛�';
+  *]
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl
new file mode 100644
index 0000000..a22c383
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/StaticMethod_RefreshData.qbl
@@ -0,0 +1,38 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod RefreshData (
+  InterfaceDataset interface,
+  const MacroPlan macroPlan
+)
+{
+  TextBody:
+  [*
+    //鏍规嵁褰撳墠鐗堟湰鐨勮閰嶄笂绾胯鍒�
+    allunit                := AssemblyOnlinePlanVersion::GetDefaultAllUnit();
+    name                   := AssemblyOnlinePlanVersion::GetDefaultName();
+    search                 := interface.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );
+    table                  := selectobject( interface, AssemblyOnlinePlanVersion, version, not version.IsShow() );
+    if( isnull( table ) ){
+      table                := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name );
+    }
+    showtable              := selectobject( interface, AssemblyOnlinePlanVersion, version, version.IsShow() );
+    if( isnull( table ) ){
+      showtable               := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name, IsShow := true );
+    }
+    aopcolumns             := selectuniquevalues(  macroPlan, AssemblyOnlinePlanColumn, aopcolumn, not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcolumn.ColumnDate() ), aopcolumn.ColumnDate() );
+    table.GenerateColumn( aopcolumns, search.TimeUnit(), search.StartDate(), search.EndDate() );
+    traverse( macroPlan, AssemblyOnlinePlanRow, aoprow ){
+      row                  := table.GetRow( aoprow );
+      traverse( aoprow, AssemblyOnlinePlanCell, aopcell ){
+        column             := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcell.AssemblyOnlinePlanColumn().ColumnDate() );
+        cell               := selectobject( row, Cell, cell, cell.Column() = column );
+        cell.InventoryWeight( aopcell.InventoryWeight() );
+        cell.ProductionSerialNumber( aopcell.ProductionSerialNumber() );
+        cell.Quantity( aopcell.Quantity() );
+        cell.Shift( aopcell.Shift() );
+        cell.Value( aopcell.Value() );
+      }
+    }
+    //showtable.Generate( search, products );
+  *]
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersion/_ROOT_Type_AssemblyOnlinePlanVersion.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersion/_ROOT_Type_AssemblyOnlinePlanVersion.qbl
new file mode 100644
index 0000000..e97100f
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersion/_ROOT_Type_AssemblyOnlinePlanVersion.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type AssemblyOnlinePlanVersion
+{
+  #keys: '5[415136.0.1184170973][415136.0.1184170971][0.0.0][415136.0.1184170972][415136.0.1184170974]'
+  BaseType: Object
+  Description: '瑁呴厤涓婄嚎璁″垝鍏ㄨ〃鏁版嵁'
+  StructuredName: 'AssemblyOnlinePlanVersions'
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionRow/Method_Initialize.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionRow/Method_Initialize.qbl
new file mode 100644
index 0000000..d56bd69
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionRow/Method_Initialize.qbl
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#parent: #root
+Method Initialize (
+  AssemblyOnlinePlanVersionColumn column
+)
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-24-2024 (created)
+    cell := column.Cell( relnew, InventoryWeight := 0, ProductionSerialNumber := 0, Quantity := 0, Shift := '', Value := '' );
+    
+    this.Cell( relinsert, cell );
+  *]
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionRow/Method_InitializeCell.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionRow/Method_InitializeCell.qbl
new file mode 100644
index 0000000..68b1fd4
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionRow/Method_InitializeCell.qbl
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+Method InitializeCell
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-28-2024 (created)
+    traverse( this.Version(), Column, column ){
+      this.Initialize( column );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_EndDate.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_EndDate.qbl
new file mode 100644
index 0000000..15f2999
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_EndDate.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute EndDate
+{
+  #keys: '3[415136.0.1184120182][415136.0.1184120181][415136.0.1184120183]'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_Product.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_Product.qbl
new file mode 100644
index 0000000..483a49a
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_Product.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Product
+{
+  #keys: '3[415136.0.1184120194][415136.0.1184120193][415136.0.1184120195]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_ProductionLine.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_ProductionLine.qbl
new file mode 100644
index 0000000..e30701a
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_ProductionLine.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ProductionLine
+{
+  #keys: '3[415136.0.1184120240][415136.0.1184120239][415136.0.1184120241]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_StartDate.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_StartDate.qbl
new file mode 100644
index 0000000..229b77e
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_StartDate.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute StartDate
+{
+  #keys: '3[415136.0.1184120197][415136.0.1184120196][415136.0.1184120198]'
+  ValueType: Date
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_TimeUnit.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_TimeUnit.qbl
new file mode 100644
index 0000000..dcece4b
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_TimeUnit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute TimeUnit
+{
+  #keys: '3[415136.0.1184120200][415136.0.1184120199][415136.0.1184120201]'
+  Description: '鏃ユ湡绫诲瀷'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_Unit.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_Unit.qbl
new file mode 100644
index 0000000..4ee17c5
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/Attribute_Unit.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Unit
+{
+  #keys: '3[415136.0.1184120203][415136.0.1184120202][415136.0.1184120204]'
+  Description: '浜х嚎'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_Product.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_Product.qbl
new file mode 100644
index 0000000..6e10c8e
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_Product.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Product
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_TimeUnit.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_TimeUnit.qbl
new file mode 100644
index 0000000..e29979e
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_TimeUnit.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: TimeUnit
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_Unit.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_Unit.qbl
new file mode 100644
index 0000000..7e60e2c
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/DefaultValue_Unit.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+  TargetAttribute: Unit
+}
diff --git a/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/_ROOT_Type_AssemblyOnlinePlanVersionSearch.qbl b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/_ROOT_Type_AssemblyOnlinePlanVersionSearch.qbl
new file mode 100644
index 0000000..14ab4a2
--- /dev/null
+++ b/_Main/BL/Type_AssemblyOnlinePlanVersionSearch/_ROOT_Type_AssemblyOnlinePlanVersionSearch.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type AssemblyOnlinePlanVersionSearch
+{
+  #keys: '5[415136.0.1184120179][415136.0.1184120177][0.0.0][415136.0.1184120178][415136.0.1184120180]'
+  BaseType: Object
+  Description: '鏌ヨ绫�'
+  StructuredName: 'AssemblyOnlinePlanVersionSearchs'
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
index 3f5377f..572e04a 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -46,8 +46,8 @@
                 enginecost    := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() );
                 if( not isnull( enginecost ) ){
                   //鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环锛屽叆搴撻噺绛変簬闀挎槬浜ч噺
-                  quantity          := ceil( cell.Quantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
-                  column            := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() );
+                  quantity    := ceil( cell.Quantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
+                  column      := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() );
                   //澶栫搴撳叆搴撹垂鐢� 
                   ccrow.SetRentEnterCost( column, quantity );
                 }
@@ -96,34 +96,23 @@
       destisp                := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.DestinationStockingPointID() );
       isccrent               := table.IsInUnit( destisp, ccrent );
       if( isccspline and isccrent ){
-        traverse( laneleg, Trip, trip, trip.Arrival().Date() < startofnextyear ){
-          periodtime         := trip.Arrival().StartOfMonth().Date();
-          periodname         := periodtime.Format( "M2/D2/Y" );
-          
-          column             := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
-          enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= trip.Arrival().Date() and engine.EndDate() >= trip.Arrival().Date() );
-          transcosts         := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= trip.Arrival().Date() and trans.EndDate() >= trip.Arrival().Date() );
+        traverse( table, Column, column ){
+          alltrips           := selectset( laneleg, Trip, trip, trip.Arrival().Date() < column.StartDate().StartOfNextMonth() and trip.Arrival().Date() >= column.StartDate() );
+          enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() );
+          transcosts         := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= column.StartDate() and trans.EndDate() >= column.StartDate() );
           if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
-            traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 ){
-              product          := pit.Product_MP();
-              productparents   := product.GetAllParent();
-              if( exists( productparents, Elements, e, e.ID() = produtparent ) ){////鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-                //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-                enginecost     := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower()
-                                                   and engine.MLB_MQB() = product.MQBMLB()
-                                                   and engine.Factory() = ccfactory );
-                //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
-                transcost      := selectobject( transcosts, Elements, trans, trans.Origin() = 'CC 鍘傚唴搴�' 
-                                                  and trans.Destination() = ccrent 
-                                                  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();//鍥涜垗浜斿叆
-                  
-                  row.SetFactoryToRentTransCost( column, quantity );
-                }
+            producttrips     := selectuniquevalues( alltrips, Elements.ProductInTrip, pit, pit.Quantity() <> 0 and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ), pit.ProductID() );
+            traverse( producttrips, Elements, producttrip ){
+              row            := table.GetRow( producttrip );
+              product        := selectobject( owner, Product_MP, product, product.ID() = producttrip );
+              products.Add( product );
+              quantity       := sum( alltrips, Elements.ProductInTrip, pit, pit.Product_MP() = product, pit.Quantity() );
+              enginecost     := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB() and engine.Factory() = ccfactory );
+              //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
+              transcost      := selectobject( transcosts, Elements, trans, trans.Origin() = 'CC 鍘傚唴搴�' and trans.Destination() = ccrent and exists( product.GetAllParent(), Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
+              if( not isnull( enginecost ) and not isnull( transcost ) ){
+                cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//鍥涜垗浜斿叆
+                row.SetFactoryToRentTransCost( column, cost );
               }
             }
           }
@@ -131,36 +120,31 @@
       }
     }
     //澶栫搴撲粨鍌ㄨ垂鐢細浠撳偍鏁伴噺/鍖呰瀹归噺*浠撳偍鍗曚环锛屽湪Actual inventories閲屽彇鍒伴暱鏄ュ绉熷簱璇ュ彂鍔ㄦ満鐨勪粨鍌ㄩ噺锛屾牴鎹彂鍔ㄦ満鍙锋壘鍒板搴旂殑Generation 鍜屾í绾靛埗锛屽湪鍙戝姩鏈烘垚鏈弬鏁拌〃閲屾壘鍒板搴旂殑浠撳偍鍗曚环鍜屽寘瑁呭閲忥紝鐢ㄥ叕寮忚绠楋紝鏈堝害杩涜姹囨��
-    traverse( owner, StockingPoint_MP, stockingpoint ){
-      //鏄惁灞炰簬闀挎槬澶栫搴�
-      isccrent                 := table.IsInUnit( stockingpoint, ccrent );
-      if( isccrent ){
-        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 ) ){////鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-            //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                 and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccfactory );
-            if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
-              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 and pispip.NewSupplyQuantity() <> 0 ){
-                enginecost     := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() );
-                if( not isnull( enginecost ) ){
-                  periodtime   := pispip.Start().StartOfMonth().Date();
-                  periodname   := periodtime.Format( "M2/D2/Y" );
-                  quantity     := ceil( [Number]pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
+    traverse( owner, StockingPoint_MP, stockingpoint, table.IsInUnit( stockingpoint, ccrent ) ){//鏄惁灞炰簬闀挎槬澶栫搴�
+      traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() and exists( pisp.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent )//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
+                and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.PlannedInventoryLevelEnd() <> 0 ) ){
+        //鑾峰彇琛�
+        product              := pisp.Product_MP();
+        //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
+        enginecosts          := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB()and engine.Factory() = ccfactory );
+        if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
+          row                := table.GetRow( pisp.ProductID() );
+          products.Add( product );
+          //褰損roduct planning鐨勬棩鏈熷尯闂村湪闇�瑕佺殑鏃ユ湡鍖洪棿鍐� 
+    //      traverse( table, Column, column ){
+    //        pispips          := selectset( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.PlannedInventoryLevelEnd() <> 0 
+    //                                       and pispip.Start().Date() < column.StartDate().StartOfNextMonth() and pispip.Start().Date() >= column.StartDate() );
+            
+          traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.PlannedInventoryLevelEnd() <> 0 ){
+            enginecost     := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() );
+            if( not isnull( enginecost ) ){
+              periodtime   := pispip.Start().StartOfMonth().Date();
+              periodname   := periodtime.Format( "M2/D2/Y" );
+              quantity     := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
                   
-                  column       := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
+              column       := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
                   
-                  row.SetRentStorageCost( column, quantity );
-                }
-              }    
+              row.SetRentStorageCost( column, quantity ); 
             }
           }
         }
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl
deleted file mode 100644
index fe1aaa7..0000000
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Initialize.qbl
+++ /dev/null
@@ -1,285 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod Initialize (
-  MacroPlan owner
-)
-{
-  TextBody:
-  [*
-    // 鐢勫叞楦� Aug-12-2024 (created)
-    owner.DLEngineLogisticsCostReport( relflush );
-    produtparent              := DLEngineLogisticsCostReport::GetDefaultProductParent();
-    name                      := DLEngineLogisticsCostReport::GetDefaultName();
-    allunit                   := DLEngineLogisticsCostReport::GetDefaultAllUnit();
-    ccunit                    := DLEngineLogisticsCostReport::GetDefaultCCUnit();
-    dlunit                    := DLEngineLogisticsCostReport::GetDefaultDLUnit();
-    dlline                    := DLEngineLogisticsCostReport::GetStockingPointDLLine();
-    ccrent                    := DLEngineLogisticsCostReport::GetStockingPointCCRent();
-    dlrent                    := DLEngineLogisticsCostReport::GetStockingPointCCRent();
-    
-    startofplanning           := owner.StartOfPlanning().Date();
-    //startofyear               := startofplanning.StartOfYear();
-    startofnextyear           := startofplanning.StartOfNextYear();
-    
-    table                     := owner.DLEngineLogisticsCostReport( relnew, ID := name, Name := name );
-    showtable                 := owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
-    search                    := owner.DLEngineLogisticsCostSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit );
-    
-    products                  := construct( Product_MPs );
-    
-    table.GenerateColumn( owner );
-    //鍙戝線闀挎槬鐨勯攢閲忛渶瑕佸湪trip plan閲岄潰鎵惧埌璧峰搴撳瓨鐐逛负澶ц繛瑁呴厤绾胯竟搴擄紝鐩殑鍦颁负闀挎槬澶栫搴撶殑浜у搧 绠楀嚭鍙戝線闀挎槬鐨勯攢閲忓悗锛屽湪鍙戝姩鏈烘垚鏈弬鏁拌〃閲屾壘鍒板搴旂殑鍖呰瀹归噺鍜岄暱鏄ュ叆搴撳崟浠凤紝鐢ㄥ叕寮忚绠楋紝鏈堝害杩涜姹囨��
-    //鍦� trip plan閲屾壘鍒板ぇ杩炶閰嶇嚎杈瑰簱鍒板ぇ杩炲绉熷簱鐨勮繍杈撴暟閲�//澶ц繛鍘傚唴搴撳埌澶栫搴�
-    traverse( owner, Unit.Lane.LaneLeg, laneleg ){
-      //璧峰搴撳瓨鐐规槸鍚︽槸澶ц繛瑁呴厤绾胯竟搴�
-      originsp               := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.OriginStockingPointID() );
-      isdlspline             := table.IsInUnit( originsp, dlline );
-      //鐩殑鍦版槸鍚︽槸闀挎槬澶栫搴�
-      destisp                := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.DestinationStockingPointID() );
-      isccrent               := table.IsInUnit( destisp, ccrent );
-      //鐩殑鍦版槸鍚︽槸澶ц繛澶栫搴�
-      destisp                := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.DestinationStockingPointID() );
-      isdlrent               := table.IsInUnit( destisp, dlrent );
-      if( isdlspline and ( isccrent or isdlrent ) ){
-        traverse( laneleg, Trip, trip, trip.Departure().Date() < startofnextyear ){//鐢变簬闇�瑕佽�冭檻浜у搧杩愯緭lead time锛屾瘡涓湀鐨勬眹鎬绘暟鎹渶瑕佹帹杩熶袱澶╄繘琛岃绠�
-          periodtime         := trip.Departure().StartOfMonth().Date();
-          periodname         := periodtime.Format( "M2/D2/Y" );
-          
-          column             := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
-          enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.StartDate() <= trip.Departure().Date() and engine.EndDate() >= trip.Departure().Date() );
-          transcosts         := selectset( owner, LogisticsCostTransport, trans, trans.StartDate() <= trip.Departure().Date() and trans.EndDate() >= trip.Departure().Date() );
-          if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
-            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( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower()
-                                                   and engine.MLB_MQB() = product.MQBMLB()
-                                                   and engine.Factory() = ccunit );
-                if( not isnull( enginecost ) ){
-                  products.Add( product );
-                  cell       := selectobject( row, Cell, cell, cell.Column() = column );
-                  cell.CCRentQty( cell.CCRentQty() + quantity );
-                  //闀挎槬澶栫搴撳叆搴撹垂鐢細鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环
-                  entercost  := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
-                  //闀挎槬澶栫搴撳嚭搴撹垂鐢�: 鍑哄簱閲�/鍖呰瀹归噺*鍑哄簱鍗曚环
-                  outcost    := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
-                  cell.CCRentInCost( cell.CCRentInCost() + entercost ); 
-                  cell.CCRentOutOfCost( cell.CCRentOutOfCost() + outcost ); 
-                }
-              }
-              if( isdlrent ){//鐩殑鍦版槸澶ц繛澶栫搴�
-                //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-                enginecost   := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                   and engine.MLB_MQB() = product.MQBMLB()
-                                                   and engine.Factory() = dlunit  );
-                //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
-                transcost    := selectobject( transcosts, Elements, 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 );
-                  //杩愯緭鏁伴噺/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环
-                  cost       := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//鍥涜垗浜斿叆
-                  cell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + cost );
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    //澶ц繛澶栫搴撳叆搴撹垂鐢細鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环锛屽叆搴撻噺绛変簬澶ц繛宸ュ巶璇ヤ骇鍝佷骇閲忓噺鍘诲彂寰�闀挎槬鐨勬暟閲�-newSupply
-    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' and cell.FinancialProductionColumn().IsDay() ) ){//璐㈠姟浜ч噺鎶ヨ〃閲岀殑澶ц繛浜ч噺, 涓嶄负0
-          product            := row.Product_MP();
-          productparents     := product.GetAllParent();
-          if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-            //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                 and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = dlunit );
-            if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
-              products.Add( product );
-              ccrow          := table.GetRow( row.Name() );
-              traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn().IsDay() ){
-                cellcolumn   := cell.FinancialProductionColumn();
-                enginecost   := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() );
-                if( not isnull( enginecost ) ){
-                  column     := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() );
-                  //澶ц繛澶栫搴撳叆搴撹垂鐢�
-                  ccrow.SetDLRentEnterCost( column, enginecost, cell );
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    //澶ц繛澶栫搴撳嚭搴撹垂鐢細鍑哄簱閲�/鍖呰瀹归噺*鍑哄簱鍗曚环锛屽嚭搴撻噺绛変簬澶ц繛宸ュ巶璇ヤ骇鍝侀攢閲忓噺鍘诲彂寰�闀挎槬鐨勬暟閲�-newSupply, 澶ц繛鍘傚唴搴擄紝澶ц繛澶栫搴�
-    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' and cell.FinancialSalesColumn().IsDay() ) ){//璐㈠姟閿�閲忔姤琛ㄩ噷鐨勫ぇ杩炰骇閲�, 涓嶄负0
-          product            := row.Product_MP();
-          productparents     := product.GetAllParent();
-          if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-            //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                 and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = dlunit );
-            if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
-              products.Add( product );
-              ccrow          := table.GetRow( row.Name() );
-              traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn().IsDay() ){
-                cellcolumn   := cell.FinancialSalesColumn();
-                enginecost   := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() );
-                if(  not isnull( enginecost ) ){
-                  column     := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() );
-                  //澶ц繛澶栫搴撳嚭搴撹垂鐢�
-                  ccrow.SetDLRentOutCost( column, enginecost, cell );
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    //闀挎槬闀块�旇繍杈撹垂鐢細璋冩嫧鏁伴噺/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环锛岃皟鎷ㄨ鍒掗噷鎵惧埌璇ヤ骇鍝佷粠DL鍒癈C鐨勮皟鎷ㄦ暟閲忥紝鍗宠捣濮嬪湴澶ц繛瑁呴厤绾胯竟搴擄紝鐩殑鍦颁负闀挎槬澶栫搴撳搴旂殑杩愯緭鏁伴噺锛屽湪鍙戝姩鏈烘垚鏈弬鏁拌〃鎵惧埌瀵瑰簲鐨勫寘瑁呭閲忥紝鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲忥紝鐢ㄥ叕寮忚绠楀緱鍑虹粨鏋滐紝鏈堝害杩涜姹囨��
-    traverse( owner, TransferPlanRow, tprow ){
-      product                 := selectobject( owner, Product_MP, product, product.ID() = tprow.ProductID() );
-      productparents          := product.GetAllParent();
-      if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-        //璧峰搴撳瓨鐐规槸鍚︽槸澶ц繛
-        originsp               := selectobject( owner, StockingPoint_MP, sp, sp.ID() = tprow.SourceStockpoingPointID() );
-        isdl                   := table.IsInUnit( originsp, dlunit );
-        //鐩殑鍦板簱瀛樼偣鏄惁鏄暱鏄�
-        destisp                := selectobject( owner, StockingPoint_MP, sp, sp.ID() = tprow.TargetStockpoingPointID() );
-        iscc                   := table.IsInUnit( destisp, ccunit );
-        if( isdl and iscc ){
-          //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-          enginecosts          := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                 and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit );
-          //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
-          transcosts           := selectset( 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( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
-            row                := table.GetRow( product.ID() );
-            products.Add( product );
-            traverse( tprow,TransferPlanCell, tpcell, tpcell.TransferPlanColumn().ColumnDate() <> Date::MinDate() and [Number]tpcell.Value() > 0){
-              tpcolumndate     := tpcell.TransferPlanColumn().ColumnDate();
-              enginecost       := selectobject( enginecosts, Elements, engine, engine.StartDate() <= tpcolumndate and engine.EndDate() >= tpcolumndate );
-              transcost        := selectobject( transcosts, Elements, trans, trans.StartDate() <= tpcolumndate and trans.EndDate() >= tpcolumndate );
-              if( not isnull( enginecost ) and not isnull( transcost ) ){
-                periodtime     := tpcolumndate.StartOfMonth();
-                periodname     := periodtime.Format( "M2/D2/Y" );
-                column         := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
-                 
-                cost           := ceil( ceil( [Number]tpcell.Value() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();
-                cell           := selectobject( row, Cell, cell, cell.Column() = column );
-                cell.CCLongTransCost( cell.CCLongTransCost() + cost ); 
-              }
-            }
-          }
-        }
-      }
-    }
-    //闀挎槬鐭�旇繍杈撹垂鐢細瀹㈡埛闇�姹傛暟閲�/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环锛屽鎴烽渶姹傛暟閲忓彇鑷猣orecast閲宻ales segment涓洪暱鏄ョ殑鏁伴噺姹囨�伙紝鍐嶇敤鍏紡璁$畻锛屾湀搴﹁繘琛屾眹鎬伙紙鍙栧鎴烽渶姹傛暟閲忔崲绠楁垚杞︽锛�
-    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();
-      //鏄惁灞炰簬闀挎槬
-      iscc                    := salessegment.Name() = ccunit or exists( parentsalessegments, Elements, psalessegment, psalessegment.Name() = ccunit );
-      if( iscc ){
-        product               := forecast.Product_MP();
-        productparents        := product.GetAllParent();
-        if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-          //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-          enginecosts         := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                 and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccunit );
-          if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
-            products.Add( forecast.Product_MP() );
-            row               := table.GetRow( forecast.ProductID() );
-            traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() > 0 ){
-              enginecost      := selectobject( enginecosts, Elements, engine, engine.StartDate() <= psdip.StartDate() and engine.EndDate() >= psdip.StartDate() );
-              if( not isnull( enginecost ) ){
-                periodtime    := psdip.StartDate().StartOfMonth();
-                periodname    := periodtime.Format( "M2/D2/Y" );
-          //      info( '-------------------------', periodname, periodtime );
-                column         := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
-          //      info( '-------------------------', column.Name() );
-                cost           := ceil( [Number]psdip.Quantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
-                cell           := selectobject( row, Cell, cell, cell.Column() = column );
-                cell.CCShorTransCost( cell.CCShorTransCost() + cost ); 
-              }
-            }
-          }
-        }
-      }
-    }
-    //澶栫搴撲粨鍌ㄨ垂鐢細浠撳偍鏁伴噺/鍖呰瀹归噺*浠撳偍鍗曚环锛屽湪Actual inventories閲屽彇鍒伴暱鏄ュ绉熷簱/澶ц繛澶栫搴撹鍙戝姩鏈虹殑浠撳偍閲忥紝鏍规嵁鍙戝姩鏈哄彿鎵惧埌瀵瑰簲鐨凣eneration 鍜屾í绾靛埗锛屽湪鍙戝姩鏈烘垚鏈弬鏁拌〃閲屾壘鍒板搴旂殑浠撳偍鍗曚环鍜屽寘瑁呭閲忥紝鐢ㄥ叕寮忚绠楋紝鏈堝害杩涜姹囨��
-    traverse( owner, StockingPoint_MP, stockingpoint ){
-      unit                    := stockingpoint.Unit();
-      parentunits             := unit.GetAllParent();
-      //鏄惁灞炰簬闀挎槬澶栫搴�
-      isccrent                := stockingpoint.ID() = ccrent or unit.ID() = ccrent or exists( parentunits, Elements, punit, punit.ID() = ccrent );
-      //鏄惁灞炰簬澶ц繛澶栫搴�
-      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() 
-                  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() );
-            enginecosts       := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB() );
-            if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
-              products.Add( pisp.Product_MP() );
-              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 );
-                cell          := selectobject( row, Cell, cell, cell.Column() = column );
-                
-                if( isccrent ){
-                  //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-                  enginecost     := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date()
-                                                     and engine.Factory() = ccunit );
-                   if( not isnull( enginecost ) ){
-                     cost        := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
-                     cell.CCRentStorCost( cell.CCRentStorCost() + cost ); 
-                   }
-                } else {
-                  //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-                  enginecost     := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date()
-                                                     and engine.Factory() = dlunit  );
-                   if( not isnull( enginecost ) ){
-                     cost        := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
-                     cell.DLRentStorCost( cell.DLRentStorCost() + cost );
-                   }
-                }
-              }   
-            }
-          }
-        }
-      }
-    }
-    rows := selectsortedset( table, Row, row, row.Name() );
-    i    := 0;
-    traverse( rows, Elements, e ){
-      e.RowNr( i );
-      i := i + 1;
-    }
-    info( '-------------------------------------end---------------------------------' );
-    //
-    showtable.Generate( search, products );
-  *]
-}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
index aa66e0d..cff8bf9 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
@@ -36,53 +36,60 @@
     //  unit                    := stockingpoint.Unit();
     //  parentunits             := unit.GetAllParent();
       //鏄惁灞炰簬闀挎槬澶栫搴撶敤浜庨暱鏄ュ绉熷簱浠撳偍璐圭敤
-      isccrent                := stockingpoint.ID().StartsWith( '闀挎槬' ) or stockingpoint.ID().StartsWith( 'CC' );
+    //  isccrent                := stockingpoint.ID().StartsWith( '闀挎槬' ) or stockingpoint.ID().StartsWith( 'CC' );
       //鏄惁灞炰簬澶ц繛鍙戝姩鏈虹殑闀挎槬澶栫搴撶敤浜庨暱鏄ュ叆搴�/鍑哄簱璐圭敤
       isdltoccrent            := stockingpoint.ID().StartsWith( '澶ц繛鍙戝姩鏈虹殑闀挎槬' );
       //鏄惁灞炰簬澶ц繛澶栫搴撶敤浜庡ぇ杩炲绉熷簱浠撳偍璐圭敤
-      isdlrent                := stockingpoint.ID().StartsWith( '澶ц繛' ) or stockingpoint.ID().StartsWith( 'DL' );
-      if( isccrent or isdlrent ){
-        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 ) ){
+      isdlrent                := not isdltoccrent and stockingpoint.ID().StartsWith( '澶ц繛' ) or stockingpoint.ID().StartsWith( 'DL' );
+    //  info( '--------------', isccrent, isdltoccrent, isdlrent );
+      if( isdlrent or isdltoccrent){
+        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 or pispip.PlannedInventoryLevelEnd() <> 0 ) ) ){
           //鑾峰彇琛�
           product             := pisp.Product_MP();
           productparents      := product.GetAllParent();
           if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
             row               := table.GetRow( pisp.ProductID() );
             enginecosts       := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB() );
+            transcosts        := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = '澶ц繛鍘傚唴搴�'
+                                                  and trans.Destination() = '澶ц繛澶栫搴�'
+                                                  and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
             if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
               products.Add( pisp.Product_MP() );
-              traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0  ){
+              traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear 
+                        and ( pispip.NewSupplyQuantity() <> 0 or pispip.PlannedInventoryLevelEnd() <> 0 ) ){
                 periodtime    := pispip.Start().StartOfMonth().Date();
                 periodname    := periodtime.Format( "M2/D2/Y" );
                 column        := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
                 cell          := selectobject( row, Cell, cell, cell.Column() = column );
                 
-                if( isccrent or isdltoccrent){
+                if( isdltoccrent){
                   //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
                   enginecost  := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date()
                                                      and engine.Factory() = ccfactory );
-                   if( not isnull( enginecost ) ){
-                     if( isccrent ){
-                       cost        := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
-                       cell.CCRentStorCost( cell.CCRentStorCost() + cost );//闀挎槬澶栫搴撲粨鍌ㄨ垂鐢�
-                     }else{
-                       cell.CCRentQty( cell.CCRentQty() + pispip.NewSupplyQuantity() );
+                   cell.CCRentQty( cell.CCRentQty() + pispip.NewSupplyQuantity() );
                        //闀挎槬澶栫搴撳叆搴撹垂鐢細鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环 
                        entercost  := ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
                        //闀挎槬澶栫搴撳嚭搴撹垂鐢�: 鍑哄簱閲�/鍖呰瀹归噺*鍑哄簱鍗曚环
                        outcost    := ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice();
                        cell.CCRentInCost( cell.CCRentInCost() + entercost );
                        cell.CCRentOutOfCost( cell.CCRentOutOfCost() + outcost );
-                     }
-                   }
+                       cost        := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
+                       cell.CCRentStorCost( cell.CCRentStorCost() + cost );//闀挎槬澶栫搴撲粨鍌ㄨ垂鐢�
                 } else {
                   //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
                   enginecost     := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date()
                                                      and engine.Factory() = dlfactory  );
                    if( not isnull( enginecost ) ){
-                     cost        := ceil( [Number]pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
+                     cost        := ceil( pispip.PlannedInventoryLevelEnd() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//鍥涜垗浜斿叆
                      cell.DLRentStorCost( cell.DLRentStorCost() + cost );//澶ц繛澶栫搴撲粨鍌ㄨ垂鐢�
+    //                 info( '**********************', pispip.NewSupplyQuantity() );
+                     row.SetDLRentEnterCost( column, enginecost, pispip.NewSupplyQuantity() );//澶ц繛澶栫搴撳叆搴撹垂鐢�
+                     transcost        := selectobject( transcosts, Elements, trans, trans.StartDate() <= pispip.Start().Date() and trans.EndDate() >= pispip.Start().Date() );
+                     if( not isnull( transcost ) ){
+                       cost := ceil( ceil( pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//鍥涜垗浜斿叆
+                       row.SetFactoryToRentTransCost( column, cost );
+                     }
                    }
                 }
               }   
@@ -92,177 +99,222 @@
       }
     }
     //鍦� trip plan閲屾壘鍒板ぇ杩炶閰嶇嚎杈瑰簱鍒板ぇ杩炲绉熷簱鐨勮繍杈撴暟閲�//澶ц繛鍘傚唴搴撳埌澶栫搴�
-    traverse( owner, Unit.Lane.LaneLeg, laneleg ){
-      //璧峰搴撳瓨鐐规槸鍚︽槸澶ц繛瑁呴厤绾胯竟搴�
-      isdlspline             := laneleg.OriginStockingPointID().EndsWith( '鍘傚唴搴�' ) and ( laneleg.OriginStockingPointID().StartsWith( '澶ц繛' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) );
-      //鐩殑鍦版槸鍚︽槸澶ц繛澶栫搴�
-      isdlrent               := laneleg.DestinationStockingPointID().EndsWith( '澶栫搴�' ) and ( laneleg.DestinationStockingPointID().StartsWith( '澶ц繛' ) or laneleg.DestinationStockingPointID().StartsWith( 'DL' ) );
-      if( isdlspline and isdlrent ){
-        traverse( laneleg, Trip, trip, trip.Departure().Date() < startofnextyear ){//鐢变簬闇�瑕佽�冭檻浜у搧杩愯緭lead time锛屾瘡涓湀鐨勬眹鎬绘暟鎹渶瑕佹帹杩熶袱澶╄繘琛岃绠�
-          periodtime         := trip.Departure().StartOfMonth().Date();
-          periodname         := periodtime.Format( "M2/D2/Y" );
-          
-          column             := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
-          enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= trip.Departure().Date() and engine.EndDate() >= trip.Departure().Date() );
-          transcosts         := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= trip.Departure().Date() and trans.EndDate() >= trip.Departure().Date() );
-          if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
-            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();
-              
-              //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
-              enginecost     := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                   and engine.MLB_MQB() = product.MQBMLB()
-                                                   and engine.Factory() = dlfactory  );
-              //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
-              transcost      := selectobject( transcosts, Elements, 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 );
-                //杩愯緭鏁伴噺/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环
-                cost         := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//鍥涜垗浜斿叆
-                cell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + cost );
-              }
-            }
-          }
-        }
-      }
-    }
-    //澶ц繛澶栫搴撳叆搴撹垂鐢細鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环锛屽叆搴撻噺绛変簬澶ц繛宸ュ巶璇ヤ骇鍝佷骇閲忓噺鍘诲彂寰�闀挎槬(澶ц繛鐨勯暱鏄ュ绉熷簱锛夌殑鏁伴噺-newSupply
-    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' and not cell.FinancialProductionColumn().IsDay() ) ){//璐㈠姟浜ч噺鎶ヨ〃閲岀殑澶ц繛浜ч噺, 涓嶄负0
-          product            := row.Product_MP();
-          productparents     := product.GetAllParent();
-          if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-            //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                 and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = dlfactory );
-            if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
-              products.Add( product );
-              ccrow          := table.GetRow( row.Name() );
-              traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and not cell.FinancialProductionColumn().IsDay() ){
-                cellcolumn   := cell.FinancialProductionColumn();
-                enginecost   := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() );
-                if( not isnull( enginecost ) ){
-                  column     := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() );
-                  //澶ц繛澶栫搴撳叆搴撹垂鐢�
-                  ccrow.SetDLRentEnterCost( column, enginecost, cell );
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    //澶ц繛澶栫搴撳嚭搴撹垂鐢細鍑哄簱閲�/鍖呰瀹归噺*鍑哄簱鍗曚环锛屽嚭搴撻噺绛変簬澶ц繛宸ュ巶璇ヤ骇鍝侀攢閲忓噺鍘诲彂寰�闀挎槬鐨勬暟閲�-newSupply, 澶ц繛鍘傚唴搴擄紝澶ц繛澶栫搴�
-    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' and not cell.FinancialSalesColumn().IsDay() ) ){//璐㈠姟閿�閲忔姤琛ㄩ噷鐨勫ぇ杩炰骇閲�, 涓嶄负0
-          product            := row.Product_MP();
-          productparents     := product.GetAllParent();
-          if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-            //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-            enginecosts      := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                 and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = dlfactory );
-            if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
-              products.Add( product );
-              ccrow          := table.GetRow( row.Name() );
-              traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and not cell.FinancialSalesColumn().IsDay() ){
-                cellcolumn   := cell.FinancialSalesColumn();
-                enginecost   := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() );
-                if(  not isnull( enginecost ) ){
-                  column     := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() );
-                  //澶ц繛澶栫搴撳嚭搴撹垂鐢�
-                  ccrow.SetDLRentOutCost( column, enginecost, cell );
-                }
-              }
-            }
-          }
-        }
-      }
-    }
+    //traverse( owner, Unit.Lane.LaneLeg, laneleg ){
+    //  isdlspline             := laneleg.OriginStockingPointID().EndsWith( '鍘傚唴搴�' ) and ( laneleg.OriginStockingPointID().StartsWith( '澶ц繛' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) );
+    //  //鐩殑鍦版槸鍚︽槸澶ц繛澶栫搴�
+    //  isdlrent               := laneleg.DestinationStockingPointID().EndsWith( '澶ц繛澶栫搴�' );
+    //  if( isdlspline and isdlrent ){
+    //    traverse( table, Column, column ){
+    //      alltrips          := selectset( laneleg, Trip, trip, trip.Arrival().Date() < column.StartDate().StartOfNextMonth() and trip.Arrival().Date() >= column.StartDate() );
+    ////      info( '--------------------', alltrips.Size(), column.StartDate() );
+    //      enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() );
+    //      transcosts         := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= column.StartDate() and trans.EndDate() >= column.StartDate() );
+    //      if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
+    //        producttrips      := selectuniquevalues( alltrips, Elements.ProductInTrip, pit, pit.Quantity() <> 0 and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ), pit.ProductID() );
+    ////        info( '--------------2---------------', producttrips.Size() );
+    //        traverse( producttrips, Elements, producttrip ){
+    //    
+    //          row          := table.GetRow( producttrip );
+    //          product         := selectobject( owner, Product_MP, product, product.ID() = producttrip );
+    //          products.Add( product );
+    //          quantity       := sum( alltrips, Elements.ProductInTrip, pit, pit.Product_MP() = product, pit.Quantity() );
+    //          enginecost     := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower()
+    //                                               and engine.MLB_MQB() = product.MQBMLB()
+    //                                               and engine.Factory() = ccfactory );
+    //            //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
+    //            transcost      := selectobject( transcosts, Elements, trans, trans.Origin() = laneleg.OriginStockingPointID() 
+    //                                              and trans.Destination() = laneleg.DestinationStockingPointID() 
+    //                                              and exists( product.GetAllParent(), Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
+    ////            info( '-------------------', not isnull( enginecost ) and not isnull( transcost ), isnull( transcost ), product.ID() );
+    //            if( not isnull( enginecost ) and not isnull( transcost ) ){
+    ////              info( '-------------------', product.ID(), transcost.LoadingCapacity() );
+    //              cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//鍥涜垗浜斿叆
+    //              info( quantity, ceil( quantity / enginecost.PackagingCapacity() ), ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) );
+    //              row.SetFactoryToRentTransCost( column, cost );
+    //            }
+    //        }
+    //      }
+    //    }
+    //traverse( owner, Unit.Lane.LaneLeg, laneleg ){
+    //  //璧峰搴撳瓨鐐规槸鍚︽槸澶ц繛瑁呴厤绾胯竟搴�
+    //  isdlspline             := laneleg.OriginStockingPointID().EndsWith( '鍘傚唴搴�' ) and ( laneleg.OriginStockingPointID().StartsWith( '澶ц繛' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) );
+    //  //鐩殑鍦版槸鍚︽槸澶ц繛澶栫搴�
+    //  isdlrent               := laneleg.DestinationStockingPointID().EndsWith( '澶栫搴�' ) and ( laneleg.DestinationStockingPointID().StartsWith( '澶ц繛' ) or laneleg.DestinationStockingPointID().StartsWith( 'DL' ) );
+    //  if( isdlspline and isdlrent ){
+    //    traverse( laneleg, Trip, trip, trip.Departure().Date() < startofnextyear ){//鐢变簬闇�瑕佽�冭檻浜у搧杩愯緭lead time锛屾瘡涓湀鐨勬眹鎬绘暟鎹渶瑕佹帹杩熶袱澶╄繘琛岃绠�
+    //      periodtime         := trip.Departure().StartOfMonth().Date();
+    //      periodname         := periodtime.Format( "M2/D2/Y" );
+    //      
+    //      column             := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
+    //      enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= trip.Departure().Date() and engine.EndDate() >= trip.Departure().Date() );
+    //      transcosts         := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= trip.Departure().Date() and trans.EndDate() >= trip.Departure().Date() );
+    //      if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
+    //        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();
+    //          
+    //          //鍦ㄥ彂鍔ㄦ満鎴愭湰鍙傛暟琛ㄦ壘鍒板搴旂殑鍖呰瀹归噺
+    //          enginecost     := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() 
+    //                                               and engine.MLB_MQB() = product.MQBMLB()
+    //                                               and engine.Factory() = dlfactory  );
+    //          //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
+    //          transcost      := selectobject( transcosts, Elements, 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 );
+    //            //杩愯緭鏁伴噺/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环
+    //            cost         := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//鍥涜垗浜斿叆
+    //            cell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + cost );
+    //          }
+    //        }
+    //      }
+    //    }
+    //  }
+    //}
+    
     //闀挎槬闀块�旇繍杈撹垂鐢細璋冩嫧鏁伴噺/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环锛岃皟鎷ㄨ鍒掗噷鎵惧埌璇ヤ骇鍝佷粠DL鍒癈C鐨勮皟鎷ㄦ暟閲忥紝鍗宠捣濮嬪湴澶ц繛瑁呴厤绾胯竟搴擄紝鐩殑鍦颁负闀挎槬澶栫搴撳搴旂殑杩愯緭鏁伴噺锛屽湪鍙戝姩鏈烘垚鏈弬鏁拌〃鎵惧埌瀵瑰簲鐨勫寘瑁呭閲忥紝鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲忥紝鐢ㄥ叕寮忚绠楀緱鍑虹粨鏋滐紝鏈堝害杩涜姹囨��
-    traverse( owner, TransferPlanRow, tprow ){
-      product                 := selectobject( owner, Product_MP, product, product.ID() = tprow.ProductID() );
-      productparents          := product.GetAllParent();
-      if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-        //璧峰搴撳瓨鐐规槸鍚︽槸澶ц繛(澶ц繛鍘傚唴搴擄級
-        isdl                   := tprow.SourceStockpoingPointID().EndsWith( '鍘傚唴搴�' ) and ( tprow.TargetStockpoingPointID().StartsWith( '澶ц繛' ) or tprow.TargetStockpoingPointID().StartsWith( 'DL' ) );
-        //鐩殑鍦板簱瀛樼偣鏄惁鏄暱鏄ワ紙闀挎槬澶栫搴擄級
-        iscc                   := tprow.TargetStockpoingPointID().EndsWith( '澶栫搴�' ) and ( tprow.TargetStockpoingPointID().StartsWith( '闀挎槬' ) or tprow.TargetStockpoingPointID().StartsWith( 'CC' ) );
+    traverse( owner, Unit.Lane.LaneLeg, laneleg ){
+    //  isdlspline             := laneleg.OriginStockingPointID().EndsWith( '鍘傚唴搴�' ) and ( laneleg.OriginStockingPointID().StartsWith( '澶ц繛' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) );
+    //  //鐩殑鍦版槸鍚︽槸澶ц繛澶栫搴�
+    //  isdlrent               := laneleg.DestinationStockingPointID().EndsWith( '澶ц繛澶栫搴�' );
+      //璧峰搴撳瓨鐐规槸鍚︽槸澶ц繛(澶ц繛鍘傚唴搴擄級
+      isdl                   := laneleg.OriginStockingPointID().EndsWith( '鍘傚唴搴�' ) and ( laneleg.OriginStockingPointID().StartsWith( '澶ц繛' ) or laneleg.OriginStockingPointID().StartsWith( 'DL' ) );
+      //鐩殑鍦板簱瀛樼偣鏄惁鏄暱鏄ワ紙闀挎槬澶栫搴擄級
+      iscc                   := laneleg.DestinationStockingPointID() = '澶ц繛鍙戝姩鏈虹殑闀挎槬澶栫搴�';
         if( isdl and iscc ){
-          //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
-          enginecosts          := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                 and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccfactory );
-          //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
-          transcosts           := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and 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( isdlspline and isdlrent ){
+        traverse( table, Column, column){//, column.StartDate().Month() = 1 
+          alltrips          := selectset( laneleg, Trip, trip, trip.Arrival().Date() < column.StartDate().StartOfNextMonth() and trip.Arrival().Date() >= column.StartDate() );
+    //      info( '--------------------', alltrips.Size(), column.StartDate() );
+          enginecosts        := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() );
+          transcosts         := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= column.StartDate() and trans.EndDate() >= column.StartDate() );
           if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
-            row                := table.GetRow( product.ID() );
-            products.Add( product );
-            traverse( tprow,TransferPlanCell, tpcell, tpcell.TransferPlanColumn().ColumnDate() <> Date::MinDate() and [Number]tpcell.Value() > 0){
-              tpcolumndate     := tpcell.TransferPlanColumn().ColumnDate();
-              enginecost       := selectobject( enginecosts, Elements, engine, engine.StartDate() <= tpcolumndate and engine.EndDate() >= tpcolumndate );
-              transcost        := selectobject( transcosts, Elements, trans, trans.StartDate() <= tpcolumndate and trans.EndDate() >= tpcolumndate );
-              if( not isnull( enginecost ) and not isnull( transcost ) ){
-                periodtime     := tpcolumndate.StartOfMonth();
-                periodname     := periodtime.Format( "M2/D2/Y" );
-                column         := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
-                 
-                cost           := ceil( ceil( [Number]tpcell.Value() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();
-                cell           := selectobject( row, Cell, cell, cell.Column() = column );
-                cell.CCLongTransCost( cell.CCLongTransCost() + cost );
-              }
+            producttrips      := selectuniquevalues( alltrips, Elements.ProductInTrip, pit, pit.Quantity() <> 0 and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ), pit.ProductID() );
+    //        info( '--------------2---------------', producttrips.Size() );
+            traverse( producttrips, Elements, producttrip ){//, producttrip = '6912'
+        
+              row          := table.GetRow( producttrip );
+              product         := selectobject( owner, Product_MP, product, product.ID() = producttrip );
+              products.Add( product );
+              quantity       := sum( alltrips, Elements.ProductInTrip, pit, pit.Product_MP() = product, pit.Quantity() );
+              enginecost     := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower()
+                                                   and engine.MLB_MQB() = product.MQBMLB()
+                                                   and engine.Factory() = ccfactory );
+                //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
+                transcost      := selectobject( transcosts, Elements, trans, trans.Origin() = laneleg.OriginStockingPointID() 
+                                                  and trans.Destination() = laneleg.DestinationStockingPointID() 
+                                                  and exists( product.GetAllParent(), Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
+    //            info( '-------------------', not isnull( enginecost ) and not isnull( transcost ), isnull( transcost ), product.ID() );
+                if( not isnull( enginecost ) and not isnull( transcost ) ){
+    //              info( '-------------------', product.ID(), transcost.LoadingCapacity() );
+                  cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//鍥涜垗浜斿叆
+    //              info( quantity, ceil( quantity / enginecost.PackagingCapacity() ), ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) );
+    //              row.SetFactoryToRentTransCost( column, cost );
+    cell           := selectobject( row, Cell, cell, cell.Column() = column );
+                  cell.CCLongTransCost( cell.CCLongTransCost() + cost )
+                }
             }
           }
         }
+    //traverse( owner, TransferPlanRow, tprow ){
+    //  product                 := selectobject( owner, Product_MP, product, product.ID() = tprow.ProductID() );
+    //  productparents          := product.GetAllParent();
+    //  if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
+    //    //璧峰搴撳瓨鐐规槸鍚︽槸澶ц繛(澶ц繛鍘傚唴搴擄級
+    //    isdl                   := tprow.SourceStockpoingPointID().EndsWith( '鍘傚唴搴�' ) and ( tprow.TargetStockpoingPointID().StartsWith( '澶ц繛' ) or tprow.TargetStockpoingPointID().StartsWith( 'DL' ) );
+    //    //鐩殑鍦板簱瀛樼偣鏄惁鏄暱鏄ワ紙闀挎槬澶栫搴擄級
+    //    iscc                   := tprow.TargetStockpoingPointID().EndsWith( '澶栫搴�' ) and ( tprow.TargetStockpoingPointID().StartsWith( '闀挎槬' ) or tprow.TargetStockpoingPointID().StartsWith( 'CC' ) );
+    //    if( isdl and iscc ){
+    //      //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
+    //      enginecosts          := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() 
+    //                                             and engine.MLB_MQB() = product.MQBMLB()
+    //                                             and engine.Factory() = ccfactory );
+    //      //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
+    //      transcosts           := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and 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( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
+    //        row                := table.GetRow( product.ID() );
+    //        products.Add( product );
+    //        traverse( tprow,TransferPlanCell, tpcell, tpcell.TransferPlanColumn().ColumnDate() <> Date::MinDate() and [Number]tpcell.Value() > 0){
+    //          tpcolumndate     := tpcell.TransferPlanColumn().ColumnDate();
+    //          enginecost       := selectobject( enginecosts, Elements, engine, engine.StartDate() <= tpcolumndate and engine.EndDate() >= tpcolumndate );
+    //          transcost        := selectobject( transcosts, Elements, trans, trans.StartDate() <= tpcolumndate and trans.EndDate() >= tpcolumndate );
+    //          if( not isnull( enginecost ) and not isnull( transcost ) ){
+    //            periodtime     := tpcolumndate.StartOfMonth();
+    //            periodname     := periodtime.Format( "M2/D2/Y" );
+    //            column         := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
+    //             
+    //            cost           := ceil( ceil( [Number]tpcell.Value() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();
+    //            cell           := selectobject( row, Cell, cell, cell.Column() = column );
+    //            cell.CCLongTransCost( cell.CCLongTransCost() + cost );
+    //          }
+    //        }
+    //      }
+    //    }
       }
     }
     //闀挎槬鐭�旇繍杈撹垂鐢細瀹㈡埛闇�姹傛暟閲�/鍖呰瀹归噺/瑁呰浇瀹归噺*杩愯緭鍗曚环锛屽鎴烽渶姹傛暟閲忓彇鑷猣orecast閲宻ales segment涓洪暱鏄ョ殑鏁伴噺姹囨�伙紝鍐嶇敤鍏紡璁$畻锛屾湀搴﹁繘琛屾眹鎬伙紙鍙栧鎴烽渶姹傛暟閲忔崲绠楁垚杞︽锛�
-    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();
-      //鏄惁灞炰簬闀挎槬
-      iscc                    := salessegment.Name().StartsWith( 'Changchun' ) or exists( parentsalessegments, Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) );
-      if( iscc ){
-        product               := forecast.Product_MP();
-        productparents        := product.GetAllParent();
-        if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//鏌ヨ浜у搧绫诲瀷鏄彂鍔ㄦ満
-          //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
+    allforecast                := selectset( owner, SalesDemand.astype( Forecast ), forecast, forecast.Quantity() > 0 and not isnull( forecast.SalesSegment_MP() ) and forecast.StartDate() < startofnextyear and //forecast.ProductID() = '6912' and forecast.StartDate().Month() = 1 and
+                                             ( forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' ) or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) ) or forecast.SalesSegment_MP().Name().StartsWith( 'Foshan' ) or forecast.SalesSegment_MP().Name().StartsWith( 'Tianjin' )
+                                                or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Foshan' ) or psalessegment.Name().StartsWith( 'Tianjin' ) ) )
+                                             and exists( forecast.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ) );
+    ccforecasts                := selectset( allforecast, Elements, forecast, forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' ) or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) )  );
+    ccproducts                 := selectuniquevalues( ccforecasts, Elements, forecast, forecast.ProductID() );
+    dlforecasts                 := selectset( allforecast, Elements, forecast, forecast.SalesSegment_MP().Name().StartsWith( 'Foshan' ) or forecast.SalesSegment_MP().Name().StartsWith( 'Tianjin' )
+                                                or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Foshan' ) or psalessegment.Name().StartsWith( 'Tianjin' ) ) );
+    dlproducts                 := selectuniquevalues( dlforecasts, Elements, forecast, forecast.ProductID() );;
+    traverse( ccproducts, Elements, ccproduct){
+      product                 := selectobject( owner, Product_MP, product, product.ID() = ccproduct );
+    //  info( '************', product.ID(), exists( ccforecasts, Elements, forecast, forecast.Quantity() > 0 ));
+      //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
           enginecosts         := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() 
-                                                 and engine.MLB_MQB() = product.MQBMLB()
-                                                 and engine.Factory() = ccfactory );
+                                                 and engine.MLB_MQB() = product.MQBMLB()and engine.Factory() = ccfactory );
           //鍦ㄨ繍杈撴垚鏈弬鏁拌〃閲屾壘鍒板彂鍔ㄦ満瀵瑰簲杩愯緭鍗曚环鍜岃杞藉閲�
           transcosts           := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = '闀挎槬澶栫搴�'
                                                   and trans.Destination() = '瀹㈡埛搴�'
-                                                  and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
-          if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
-            products.Add( forecast.Product_MP() );
-            row               := table.GetRow( forecast.ProductID() );
-            traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() > 0 ){
-              enginecost      := selectobject( enginecosts, Elements, engine, engine.StartDate() <= psdip.StartDate() and engine.EndDate() >= psdip.StartDate() );
-              transcost       := selectobject( transcosts, Elements, trans, trans.StartDate() <= psdip.StartDate() and trans.EndDate() >= psdip.StartDate() );
-              if( not isnull( enginecost ) ){
-                periodtime    := psdip.StartDate().StartOfMonth();
-                periodname    := periodtime.Format( "M2/D2/Y" );
-          //      info( '-------------------------', periodname, periodtime );
-                column         := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime );
-          //      info( '-------------------------', column.Name() );
-                cost           := ceil( ceil( [Number]psdip.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();
-                cell           := selectobject( row, Cell, cell, cell.Column() = column );
-                cell.CCShorTransCost( cell.CCShorTransCost() + cost );
-              }
-            }
-          }
+                                                  and exists( product.GetAllParent(), Elements, e, ifexpr( trans.Product().FindString( '鍙戝姩鏈�', 0 ) >= 0, e.ID() = produtparent,  e.ID() = trans.Product() ) ) );
+      if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){
+        row               := table.GetRow( ccproduct )
+        products.Add( product );
+        traverse( table, Column, column ){
+          allpsdips             := selectset( ccforecasts, Elements.PlanningSalesDemandInPeriod, psdip, psdip.ProductID() = ccproduct and psdip.Quantity() > 0 and psdip.StartDate() < column.StartDate().StartOfNextMonth() and psdip.StartDate() >= column.StartDate() );
+          enginecost      := selectobject( enginecosts, Elements, engine, engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() );
+          transcost       := selectobject( transcosts, Elements, trans, trans.StartDate() <= column.StartDate() and trans.EndDate() >= column.StartDate() );
+          if( not isnull( enginecost ) and not isnull( transcost ) ){
+            quantity        := sum( allpsdips, Elements, psdip, psdip.Quantity() );
+            cost           := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();
+             cell           := selectobject( row, Cell, cell, cell.Column() = column );
+             cell.CCShorTransCost( cell.CCShorTransCost() + cost );
+           }
+        }
+      }
+    }
+    //info( '***********1********', dlforecasts.Size() );
+    traverse( dlproducts, Elements, ccproduct){
+      
+      row               := table.GetRow( ccproduct )
+      product                 := selectobject( owner, Product_MP, product, product.ID() = ccproduct );
+      //鏌ヨ瀵瑰簲鐨勫彂鍔ㄦ満鎴愭湰
+          enginecosts         := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() 
+                                                 and engine.MLB_MQB() = product.MQBMLB()and engine.Factory() = dlfactory );
+      if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){
+        traverse( table, Column, column ){
+          allpsdips             := selectset( dlforecasts, Elements.PlanningSalesDemandInPeriod, psdip, psdip.ProductID() = ccproduct and psdip.Quantity() > 0 and psdip.StartDate() < column.StartDate().StartOfNextMonth() and psdip.StartDate() >= column.StartDate() );
+          enginecost      := selectobject( enginecosts, Elements, engine, engine.StartDate() <= column.StartDate() and engine.EndDate() >= column.StartDate() );
+          if( not isnull( enginecost ) ){
+            products.Add( product );
+            quantity        := sum( allpsdips, Elements, psdip, psdip.Quantity() );
+            
+            cost           := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice();
+    //        info( '******************', quantity, cost );
+    //         cell           := selectobject( row, Cell, cell, cell.Column() = column );
+             row.SetDLRentOutCost( column, cost );
+           }
         }
       }
     }
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl
index 8445a49..5552f74 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentEnterCost.qbl
@@ -3,14 +3,13 @@
 Method SetDLRentEnterCost (
   DLEngineLogisticsCostColumn column,
   LogisticsCostEngine enginecost,
-  FinancialProductionCell fpcell
+  Real quantity
 )
 {
   TextBody:
   [*
     // 鐢勫叞楦� Jun-24-2024 (created) 
     cell := selectobject( this, Cell, cell, cell.Column() = column );
-    quantity      := fpcell.Quantity() - cell.CCRentQty();
     //鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环锛屽叆搴撻噺绛変簬闀挎槬浜ч噺
     cost          := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
     othercost     := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OtherPrice();
diff --git a/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl
index 2c253f0..185441f 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostRow0/Method_SetDLRentOutCost.qbl
@@ -2,19 +2,14 @@
 #parent: #root
 Method SetDLRentOutCost (
   DLEngineLogisticsCostColumn column,
-  LogisticsCostEngine enginecost,
-  FinancialSalesCell fscell
+  Real quantity
 )
 {
   TextBody:
   [*
     // 鐢勫叞楦� Jun-24-2024 (created)
     cell := selectobject( this, Cell, cell, cell.Column() = column );
-    quantity      := [Number]fscell.Value() - cell.CCRentQty();
-    //鍏ュ簱閲�/鍖呰瀹归噺*鍏ュ簱鍗曚环锛屽叆搴撻噺绛変簬闀挎槬浜ч噺
-    cost          := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice();
-          
-    value := cell.DLRentOutOfCost() + cost;
+    value := cell.DLRentOutOfCost() + quantity;
     cell.DLRentOutOfCost( value );
   *]
 }
diff --git a/_Main/BL/Type_DispatchShiftPlan/StaticMethod_Dispatch.qbl b/_Main/BL/Type_DispatchShiftPlan/StaticMethod_Dispatch.qbl
index 35bca5a..5d69146 100644
--- a/_Main/BL/Type_DispatchShiftPlan/StaticMethod_Dispatch.qbl
+++ b/_Main/BL/Type_DispatchShiftPlan/StaticMethod_Dispatch.qbl
@@ -2,19 +2,27 @@
 #parent: #root
 StaticMethod Dispatch (
   const MacroPlan macroPlan,
-  RecycleBin owner,
+  Archive owner,
   String versionFlag
 )
 {
   TextBody:
   [*
     // Akari Aug-21-2024 (created)
-    owner.DispatchShiftPlan( relflush );
+    // owner.DispatchShiftPlan( relflush );
     // owner.RB_DispatchShiftPlanBroker().Source().FlatQuery( "truncate table A_DispatchShiftPlan" );
+    
+    dispatchShiftPlans := selectset( owner,DispatchShiftPlan,dispatchShiftPlan,true );
+    dispatchShiftPlanIndexTree := NamedValueTree::Create();
+    for( i := 0 ; i < dispatchShiftPlans.Size() ; i++){
+      dispatchShiftPlan := dispatchShiftPlans.Element( i );
+      dispatchShiftPlanHandle := dispatchShiftPlanIndexTree.GetHandle( dispatchShiftPlan.FactoryName() + dispatchShiftPlan.ProductLine() + dispatchShiftPlan.ShiftDate().AsQUILL() );
+      dispatchShiftPlanIndexTree.Root().AddChild( dispatchShiftPlanHandle,i );
+    }
     
     now := DateTime::Now();
     macroPlanName := macroPlan.MDSMacroPlan().Description();
-    traverse( macroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).ShiftPlan,shiftPlan ){
+    traverse( macroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).ShiftPlan,shiftPlan ,shiftPlan.UnitPeriodTime().Period_MP().StartDate() >= macroPlan.StartOfPlanning().Date()){
        factory := shiftPlan.UnitPeriodTime().Unit();
        while( factory.HasParent() ){
          temp1 := factory;
@@ -23,19 +31,31 @@
            factory := temp1;
          }
        }
-      
-       owner.DispatchShiftPlan( relnew,ID := OS:: GenerateGUIDAsString(),
-                                ProductLine := shiftPlan.UnitPeriodTime().Unit().ID(),
-                                ShiftDate := shiftPlan.UnitPeriodTime().Period_MP().StartDate(),
-                                Tips := shiftPlan.Remark(),
-                                VersionName := macroPlanName,
-                                VersionFlag := versionFlag,
-                                FactoryName := factory.ID(),
-                                InterfaceTime := now
-                                );
-                                
+       productLine :=  shiftPlan.UnitPeriodTime().Unit().ID();
+       shiftDate := shiftPlan.UnitPeriodTime().Period_MP().StartDate();
+       factoryName := factory.ID();
+       
+       dispatchShiftPlanHandle := dispatchShiftPlanIndexTree.GetHandle( factoryName + productLine + shiftDate.AsQUILL() );
+       dispatchShiftPlanIndex := guard( dispatchShiftPlanIndexTree.Root().Child( dispatchShiftPlanHandle ),null( NamedValue ));
+       if( not isnull( dispatchShiftPlanIndex )){
+         dispatchShiftPlan := dispatchShiftPlans.Element( dispatchShiftPlanIndex.GetValueAsNumber() );
+         dispatchShiftPlan.Tips( shiftPlan.Remark() );
+         dispatchShiftPlan.VersionName( macroPlanName );
+         dispatchShiftPlan.VersionFlag( versionFlag );
+         dispatchShiftPlan.InterfaceTime( now );
+       }else{
+         owner.DispatchShiftPlan( relnew,ID := OS:: GenerateGUIDAsString(),
+                                  ProductLine := productLine,
+                                  FactoryName := factory.ID(),
+                                  
+                                  ShiftDate := shiftDate,
+                                  Tips := shiftPlan.Remark(),
+                                  VersionName := macroPlanName,
+                                  VersionFlag := versionFlag,
+                                  InterfaceTime := now );
+       }
     }
     
-    owner.RB_DispatchShiftPlanBroker().AsyncExecute();
+    // owner.RB_DispatchShiftPlanBroker().AsyncExecute();
   *]
 }
diff --git a/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl b/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
index 257071d..64d6ac0 100644
--- a/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
@@ -37,8 +37,8 @@
       }else if( timeunit = Translations::MP_GlobalParameters_Month() ){
         for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){
           monthend            := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date();
-          
-          this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM" ).Concat( '/').Concat( [String]monthend.Month() ).Concat( '鏈�' ) ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() );
+          us_locale := Locale::Construct( 'en_us' );
+          this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( '鏈�' ) ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() );
         }
       }
     }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def
index f6224d2..0d25535 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuCapacities.def
@@ -27,5 +27,16 @@
         Tooltip: 'Event type'
       ]
     }
+    Component MenuBatchSetShiftPattern
+    {
+      #keys: '[414996.1.119140284]'
+      BaseType: 'WebMenu'
+      Properties:
+      [
+        Image: 'QUEUE'
+        Taborder: 8
+        Title: '鎵归噺璁剧疆浜х嚎鐝'
+      ]
+    }
   ]
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuBatchSetShiftPattern_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuBatchSetShiftPattern_OnClick.def
new file mode 100644
index 0000000..a6fab35
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuCapacities_MenuBatchSetShiftPattern_OnClick.def
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: ContextMenuCapacities/MenuBatchSetShiftPattern
+Response OnClick () id:Response_MacroPlanner_ContextMenuCapacities_MenuBatchSetShiftPattern_OnClick
+{
+  #keys: '[414996.1.119140372]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebMenu_OnClick'
+  QuillAction
+  {
+    Body:
+    [*
+      // Open view
+      ApplicationMacroPlanner.OpenView( 'BatchSetShiftPattern', ButtonCapacities );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft\04388.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft\04388.def"
index 48c5652..1567971 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft\04388.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSMS64/Component_pnlLeft\04388.def"
@@ -44,63 +44,7 @@
       [
         Checked: true
         Label: '鏄惁婵�娲荤増鏈�'
-        Taborder: 8
-      ]
-    }
-    Component ddlOriginMacroPlan
-    {
-      #keys: '[415136.0.1043064647]'
-      BaseType: 'WebDropDownList'
-      Databinding: 'ScenarioMP'
-      Children:
-      [
-        Component deMacroPlan id:deMacroPlan_640
-        {
-          #keys: '[415136.0.1043064648]'
-          BaseType: 'WebDataExtractor'
-          Properties:
-          [
-            DataType: 'ScenarioManager'
-            Source: 'ScenarioManager'
-            Taborder: 0
-            Transformation: 'ScenarioMP'
-          ]
-        }
-      ]
-      Properties:
-      [
-        DisplayField: 'Name'
-        Label: '浠庣増鏈�'
-        Taborder: 4
-        Visible: false
-      ]
-    }
-    Component ddlDestinationMacroPlan
-    {
-      #keys: '[415136.0.1043064790]'
-      BaseType: 'WebDropDownList'
-      Databinding: 'ScenarioMP'
-      Children:
-      [
-        Component deMacroPlan950
-        {
-          #keys: '[415136.0.1043064791]'
-          BaseType: 'WebDataExtractor'
-          Properties:
-          [
-            DataType: 'ScenarioManager'
-            Source: 'ScenarioManager'
-            Taborder: 0
-            Transformation: 'ScenarioMP'
-          ]
-        }
-      ]
-      Properties:
-      [
-        DisplayField: 'Name'
-        Label: '鍒扮増鏈�'
         Taborder: 6
-        Visible: false
       ]
     }
     Component efVersionFrom
@@ -110,7 +54,7 @@
       Properties:
       [
         Label: '浠庣増鏈�'
-        Taborder: 5
+        Taborder: 4
       ]
     }
     Component efVersionTo
@@ -120,7 +64,7 @@
       Properties:
       [
         Label: '鍒扮増鏈�'
-        Taborder: 7
+        Taborder: 5
       ]
     }
     Component ddslFactory
@@ -129,6 +73,7 @@
       BaseType: 'WebDropDownStringList'
       Properties:
       [
+        InitialValue: 'all;8200;8201'
         Label: '宸ュ巶浠g爜'
         Strings: 'All;DL;CC'
         Taborder: 1
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def
index 8940313..9065511 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Component_pnlLeft.def
@@ -36,44 +36,28 @@
         Taborder: 4
       ]
     }
-    Component ddlMacroPlan
-    {
-      #keys: '[415136.0.1043063334]'
-      BaseType: 'WebDropDownList'
-      Databinding: 'ScenarioMP'
-      Children:
-      [
-        Component deMacroPlan
-        {
-          #keys: '[415136.0.1043063336]'
-          BaseType: 'WebDataExtractor'
-          Properties:
-          [
-            DataType: 'ScenarioManager'
-            Source: 'ScenarioManager'
-            Taborder: 0
-            Transformation: 'ScenarioMP'
-          ]
-        }
-      ]
-      Properties:
-      [
-        DisplayField: 'Name'
-        Label: '鐗堟湰'
-        Taborder: 2
-      ]
-    }
     Component ddslFactory id:ddslFactory_424
     {
       #keys: '[415136.0.1047641312]'
       BaseType: 'WebDropDownStringList'
       Properties:
       [
+        InitialValue: 'all;8200;8201'
         Label: '宸ュ巶浠g爜'
         Strings: 'All;DL;CC'
         Taborder: 1
       ]
     }
+    Component efVersion
+    {
+      #keys: '[415136.0.1184400599]'
+      BaseType: 'WebEditField'
+      Properties:
+      [
+        Label: '鐗堟湰'
+        Taborder: 2
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
index 83c953c..f948597 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogZEDPPSPIR/Method_OnOk.def
@@ -6,11 +6,7 @@
   Body:
   [*
     Form.ApplyChanges();
-    componentmds    := ApplicationScope.ComponentMDS();
-    mdsinstance     := select( componentmds, ComponentMDSKinds.ComponentMDSInstances, m, m.MDSID().MDSKey() = ddlMacroPlan.Data().DatasetMDSID() );
-    handle          := mdsinstance.GetMDSHandle()
-    macroplan       := handle.AsMacroPlan();
-    AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), macroplan, dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName() );
+    AOnlineAndMOfflinePlanPIR::GenerateData( InterfaceDataset, ddslFactory.Text(), efVersion.Text(), dsStartDate.Date(), dsEndDate.Date(), QuintiqUser::CurrentUser().DisplayName() );
     WebMessageBox::Success( "鎺ㄩ�佹垚鍔燂紒" );
     Form.Close();
   *]
diff --git a/_Main/UI/MacroPlannerWebApp/Views/BatchSetShiftPattern.vw b/_Main/UI/MacroPlannerWebApp/Views/BatchSetShiftPattern.vw
new file mode 100644
index 0000000..e1a08c5
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Views/BatchSetShiftPattern.vw
@@ -0,0 +1,386 @@
+Quintiq file version 2.0
+{
+  viewcontents
+  {
+    forms
+    {
+      form_FormProductionLineBatchSetShiftPattern
+      {
+        title: 'QMacroPlanner::FormProductionLineBatchSetShiftPattern'
+        shown: true
+        componentID: 'QMacroPlanner::FormProductionLineBatchSetShiftPattern'
+        layout
+        {
+          mode: 'open'
+          rowPosition: 1
+          rowSpan: 23
+          columnPosition: 1
+          columnSpan: 9
+        }
+        components
+        {
+          FormProductionLineBatchSetShiftPattern_PanelProductionLineBatchSetShiftPattern
+          {
+            sizeRatio: 1
+          }
+          FormProductionLineBatchSetShiftPattern_PanelLeft
+          {
+            sizeRatio: 1
+          }
+          FormProductionLineBatchSetShiftPattern_ListUnit
+          {
+          }
+          FormProductionLineBatchSetShiftPattern_DataSetLevelProductionLineBatchSetShiftPattern
+          {
+            groupDepth: -1
+            sort: 'Name'
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 150
+            }
+          }
+          FormProductionLineBatchSetShiftPattern_PanelRight
+          {
+            sizeRatio: 1
+          }
+        }
+      }
+      form_FormKPI
+      {
+        title: 'KPI Dashboard'
+        shown: false
+        componentID: 'FormKPI'
+        layout
+        {
+          mode: 'dockright'
+          index: 0
+        }
+        components
+        {
+          FormKPI_PanelKPI
+          {
+            sizeRatio: 1
+            activeChild: 'PanelKPISelection'
+          }
+          FormKPI_PanelKPIDashboard
+          {
+            sizeRatio: 1
+          }
+          FormKPI_PanelKPISelection
+          {
+            sizeRatio: 1
+          }
+          FormKPI_ListKPISelection
+          {
+            QuillViewData
+            {
+              Food_KPISetting: 'Cost of sales;Fulfillment;Fulfillment target;Inventory holding cost;Labor cost;Margin;Safety stock;Sales;Sourcing cost;Total CO2 emission;Transportation cost;Volume'
+            }
+          }
+          FormKPI_DataSetLevelKPISelection
+          {
+            groupDepth: -1
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              title: 'All constraints'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              title: 'Name'
+              index: 1
+              subtotals: ''
+              width: 200
+            }
+          }
+        }
+      }
+      form_FormOptimizerStrategiesSlideIn
+      {
+        title: 'Optimizer Strategies'
+        shown: false
+        componentID: 'FormOptimizerStrategiesSlideIn'
+        layout
+        {
+          mode: 'dockright'
+          index: 1
+        }
+        components
+        {
+          FormOptimizerStrategiesSlideIn_ListOptimizerStrategiesSlideIn
+          {
+          }
+          FormOptimizerStrategiesSlideIn_DataSetLevelOptimizerStrategiesSlideIn
+          {
+            groupDepth: -1
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_ImgIsValid
+            {
+              columnId: 'ImgIsValid'
+              dataPath: 'ImgIsValid'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 32
+            }
+            column_Name
+            {
+              columnId: 'Name'
+              dataPath: 'Name'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 270
+            }
+          }
+        }
+      }
+      form_FormSanityCheck
+      {
+        title: 'Sanity Check'
+        shown: false
+        componentID: 'FormSanityCheck'
+        layout
+        {
+          mode: 'dockright'
+          index: 2
+        }
+        components
+        {
+          FormSanityCheck_PanelSanityCheckToolbar
+          {
+            sizeRatio: 1
+          }
+          FormSanityCheck_PanelSanityCheckContent
+          {
+            sizeRatio: 1
+          }
+          FormSanityCheck_PanelSanityCheckGroup
+          {
+            sizeRatio: 4
+          }
+          FormSanityCheck_ListSanityCheckGroup
+          {
+          }
+          FormSanityCheck_DataSetLevelSanityCheckGroup
+          {
+            groupDepth: -1
+            sort: 'DESC:IsShown,DESC:SanityCheckHighestCategory,DESC:_Expr3'
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Show
+            {
+              columnId: 'Show'
+              dataPath: 'Show'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 32
+            }
+            column_Category
+            {
+              columnId: 'Category'
+              dataPath: 'Category'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 32
+            }
+            column_Group
+            {
+              columnId: 'Group'
+              dataPath: 'Group'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 270
+            }
+            column__Expr3
+            {
+              columnId: '_Expr3'
+              dataPath: '_Expr3'
+              dataType: 'number'
+              index: 4
+              subtotals: ''
+              width: 95
+            }
+          }
+          FormSanityCheck_PanelSanityCheckMessage
+          {
+            sizeRatio: 5
+          }
+          FormSanityCheck_ListSanityCheckMessage
+          {
+          }
+          FormSanityCheck_DataSetLevelSanityCheckMessage
+          {
+            groupDepth: -1
+            sort: 'DESC:IsShown,SanityCheckGroup.Type,SanityCheckGroup.Group,Description'
+            column_All_constraints
+            {
+              columnId: 'All constraints'
+              dataPath: 'All constraints'
+              dataType: 'string'
+              index: 0
+              subtotals: ''
+              width: 32
+            }
+            column_Show
+            {
+              columnId: 'Show'
+              dataPath: 'Show'
+              dataType: 'string'
+              index: 1
+              subtotals: ''
+              width: 32
+            }
+            column_Category
+            {
+              columnId: 'Category'
+              dataPath: 'Category'
+              dataType: 'string'
+              index: 2
+              subtotals: ''
+              width: 32
+            }
+            column_Messages
+            {
+              columnId: 'Messages'
+              dataPath: 'Messages'
+              dataType: 'string'
+              index: 3
+              subtotals: ''
+              width: 32
+            }
+            column_Description
+            {
+              columnId: 'Description'
+              dataPath: 'Description'
+              dataType: 'string'
+              index: 4
+              subtotals: ''
+              width: 585
+            }
+          }
+        }
+      }
+      form_FormDefaultCapacities
+      {
+        title: 'Default Capacities'
+        shown: false
+        componentID: 'FormDefaultCapacities'
+        layout
+        {
+          mode: 'dockright'
+          index: 3
+        }
+        components
+        {
+          FormDefaultCapacities_PanelContent
+          {
+            sizeRatio: 1
+          }
+          FormDefaultCapacities_PanelTimeCapacities
+          {
+            sizeRatio: 1
+          }
+          FormDefaultCapacities_PanelQuantityAndTransportCapacities
+          {
+            sizeRatio: 1
+          }
+          FormDefaultCapacities_PanelStockingPointCapacities
+          {
+            sizeRatio: 1
+          }
+          FormDefaultCapacities_PanelActions
+          {
+            sizeRatio: 1
+          }
+        }
+      }
+      form_FormGeneralSettings
+      {
+        title: 'General Settings'
+        shown: true
+        componentID: 'FormGeneralSettings'
+        layout
+        {
+          mode: 'dockright'
+          index: 4
+        }
+        components
+        {
+          FormGeneralSettings_PanelContent
+          {
+            sizeRatio: 1
+          }
+          FormGeneralSettings_PanelGeneralParameter
+          {
+            sizeRatio: 1
+          }
+          FormGeneralSettings_PanelLeadTimeDependent
+          {
+            sizeRatio: 1
+          }
+          FormGeneralSettings_PanelShelfLife
+          {
+            sizeRatio: 1
+          }
+          FormGeneralSettings_PanelSustainability
+          {
+            sizeRatio: 1
+          }
+          FormGeneralSettings_PanelForecastNetting
+          {
+            sizeRatio: 1
+          }
+          FormGeneralSettings_PanelActions
+          {
+            sizeRatio: 1
+          }
+        }
+      }
+    }
+    userconfigurableinformation
+    {
+    }
+    image: 'QUEUE'
+    page: ''
+    group: ''
+    index: 0
+    description: ''
+  }
+  formatversion: 2
+  id: 'BatchSetShiftPattern'
+  name: 'BatchSetShiftPattern'
+  isglobal: false
+  isroot: true
+}

--
Gitblit v1.9.3