From af096b992e77a032f9a92fa222de1488f9a43656 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期五, 09 八月 2024 13:52:13 +0800
Subject: [PATCH] 财务报表数据对不上

---
 _Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultCCMPLineUnit.qbl    |   11 +++++
 _Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCALineUnit.qbl  |   11 +++++
 _Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLALineUnit.qbl  |   11 +++++
 _Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultDLMPLineUnit.qbl    |   11 +++++
 _Main/BL/Type_FinancialSalesReport/Method_IsInUnit.qbl                          |    2 
 _Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl                  |    6 +-
 _Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCMPLineUnit.qbl |   11 +++++
 _Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl             |   10 +++-
 _Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl                |    8 +++-
 _Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLMPLineUnit.qbl |   11 +++++
 _Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultCCALineUnit.qbl     |   11 +++++
 _Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultDLALineUnit.qbl     |   11 +++++
 12 files changed, 105 insertions(+), 9 deletions(-)

diff --git a/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCALineUnit.qbl b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCALineUnit.qbl
new file mode 100644
index 0000000..3afba65
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCALineUnit.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultCCALineUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '闀挎槬瑁呴厤绾�';
+    //return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCMPLineUnit.qbl b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCMPLineUnit.qbl
new file mode 100644
index 0000000..0c32fd7
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultCCMPLineUnit.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultCCMPLineUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '闀挎槬鏈哄姞绾�';
+    //return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLALineUnit.qbl b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLALineUnit.qbl
new file mode 100644
index 0000000..153da57
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLALineUnit.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultDLALineUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '澶ц繛瑁呴厤绾�';
+    //return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLMPLineUnit.qbl b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLMPLineUnit.qbl
new file mode 100644
index 0000000..48e75f8
--- /dev/null
+++ b/_Main/BL/Type_FinancialProductionReport/StaticMethod_GetDefaultDLMPLineUnit.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultDLMPLineUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '澶ц繛鏈哄姞绾�';
+    //return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
index 90d0b02..a7ebc07 100644
--- a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
@@ -11,6 +11,10 @@
     owner.FPImportData( relflush );
     ccunit                    := FinancialProductionReport::GetDefaultCCUnit();
     dlunit                    := FinancialProductionReport::GetDefaultDLUnit();
+    ccalineunit               := FinancialProductionReport::GetDefaultCCALineUnit();
+    dlalienunit               := FinancialProductionReport::GetDefaultDLALineUnit()
+    ccmplineunit              := FinancialProductionReport::GetDefaultCCMPLineUnit()
+    dlmplineunit              := FinancialProductionReport::GetDefaultDLMPLineUnit();
     allunit                   := FinancialProductionReport::GetDefaultAllUnit();
     source                    := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() );
     table                     := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false );
@@ -35,9 +39,9 @@
       unit         := stockingpoint.Unit();
       parentunits  := unit.GetAllParent();
       //鏄惁灞炰簬闀挎槬宸ュ巶
-      iscc         := unit.ID() = ccunit or exists( parentunits, Elements, punit, punit.ID() = ccunit );
+      iscc         := unit.ID() = ccalineunit or unit.ID() = ccmplineunit or exists( parentunits, Elements, punit, punit.ID() = ccalineunit or punit.ID() = ccmplineunit );
       //鏄惁灞炰簬澶ц繛宸ュ巶
-      isdl         := unit.ID() = dlunit or exists( parentunits, Elements, punit, punit.ID() = dlunit );
+      isdl         := unit.ID() = dlalienunit or unit.ID() = dlmplineunit  or exists( parentunits, Elements, punit, punit.ID() = dlalienunit or punit.ID() = dlmplineunit );
       if( iscc or isdl ){
         traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() ){
           //鑾峰彇宸ュ巶琛�
@@ -52,7 +56,7 @@
                     ){
             periodtime := pispip.Start().StartOfMonth().Date();
             periodname := periodtime.Format( "M2/D2/Y" );
-            quantity   := ceil( pispip.NewSupplyQuantity() );//鍚戜笂鍙栨暣
+            quantity   := [Number]pispip.NewSupplyQuantity();//鍥涜垗浜斿叆
             
             column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime );
             
diff --git a/_Main/BL/Type_FinancialSalesReport/Method_IsInUnit.qbl b/_Main/BL/Type_FinancialSalesReport/Method_IsInUnit.qbl
index 02e06b4..57394ad 100644
--- a/_Main/BL/Type_FinancialSalesReport/Method_IsInUnit.qbl
+++ b/_Main/BL/Type_FinancialSalesReport/Method_IsInUnit.qbl
@@ -11,6 +11,6 @@
     // 鐢勫叞楦� Aug-5-2024 (created)
     unit                  := sp.Unit();
     parentunits           := unit.GetAllParent();
-    return unit.ID() = unitname or exists( parentunits, Elements, punit, punit.ID() = unitname );
+    return sp.ID() = unitname or unit.ID() = unitname or exists( parentunits, Elements, punit, punit.ID() = unitname );
   *]
 }
diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
index cf1176e..ed05819 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
@@ -59,7 +59,7 @@
     //      info( '-------------------------', periodname, periodtime );
           column             := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime );
     //      info( '-------------------------', column.Name() );
-          quantity   := ceil( psdip.Quantity() );//鍚戜笂鍙栨暣
+          quantity   := [Number]psdip.Quantity();//鍥涜垗浜斿叆
           
           factoryrow.Initialize( column, quantity );
           allrow.Initialize( column, quantity );
@@ -80,7 +80,7 @@
             periodtime      := pispip.Start().StartOfMonth().Date();
             periodname      := periodtime.Format( "M2/D2/Y" );
             column          := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime );
-            quantity        := ceil( pispip.DependentDemandAndSalesDemandQuantity() );//鍚戜笂鍙栨暣
+            quantity        := [Number]pispip.DependentDemandAndSalesDemandQuantity();//鍥涜垗浜斿叆
             
             ccrow.Initialize( column, quantity );//鍙朤otal Demand瀛楁鎸夋湀姹囨�婚渶姹傛暟閲�
             allrow.Initialize( column, quantity );
@@ -104,7 +104,7 @@
           
           column            := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime );
           traverse( trip, ProductInTrip, pit ){
-            quantity        := ceil( pit.Quantity() );//鍚戜笂鍙栨暣
+            quantity        := [Number]pit.Quantity();//鍥涜垗浜斿叆
             dlrow           := table.GetRow( dlunit, pit.ProductID() );
             dlrow.Initialize( column, quantity );//姹囨�绘暟閲�
             
diff --git a/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultCCALineUnit.qbl b/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultCCALineUnit.qbl
new file mode 100644
index 0000000..3afba65
--- /dev/null
+++ b/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultCCALineUnit.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultCCALineUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '闀挎槬瑁呴厤绾�';
+    //return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultCCMPLineUnit.qbl b/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultCCMPLineUnit.qbl
new file mode 100644
index 0000000..0c32fd7
--- /dev/null
+++ b/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultCCMPLineUnit.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultCCMPLineUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '闀挎槬鏈哄姞绾�';
+    //return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultDLALineUnit.qbl b/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultDLALineUnit.qbl
new file mode 100644
index 0000000..153da57
--- /dev/null
+++ b/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultDLALineUnit.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultDLALineUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '澶ц繛瑁呴厤绾�';
+    //return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultDLMPLineUnit.qbl b/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultDLMPLineUnit.qbl
new file mode 100644
index 0000000..48e75f8
--- /dev/null
+++ b/_Main/BL/Type_InventorySummaryReport/StaticMethod_GetDefaultDLMPLineUnit.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GetDefaultDLMPLineUnit () const as String
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jun-25-2024 (created)
+    return '澶ц繛鏈哄姞绾�';
+    //return 'Assembly Plant (France)';
+  *]
+}
diff --git a/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl b/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
index 47f1246..b5bb158 100644
--- a/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
@@ -14,6 +14,10 @@
     allunit                   := InventorySummaryReport::GetDefaultAllUnit();
     ccunit                    := InventorySummaryReport::GetDefaultCCUnit();
     dlunit                    := InventorySummaryReport::GetDefaultDLUnit();
+    ccalineunit               := FinancialProductionReport::GetDefaultCCALineUnit();
+    dlalienunit               := FinancialProductionReport::GetDefaultDLALineUnit()
+    ccmplineunit              := FinancialProductionReport::GetDefaultCCMPLineUnit()
+    dlmplineunit              := FinancialProductionReport::GetDefaultDLMPLineUnit();
     
     source                    := owner.InventorySummarySource( relnew, ID := InventorySummaryReport::GetDefaultName(), Name := InventorySummaryReport::GetDefaultName() );
     table                     := source.InventorySummaryReport( relnew, ID := source.Name(), Name := source.Name() );
@@ -31,9 +35,9 @@
       unit                    := stockingpoint.Unit();
       parentunits             := unit.GetAllParent();
       //鏄惁灞炰簬闀挎槬宸ュ巶
-      iscc                    := unit.ID() = ccunit or exists( parentunits, Elements, punit, punit.ID() = ccunit );
+      iscc         := unit.ID() = ccalineunit or unit.ID() = ccmplineunit or exists( parentunits, Elements, punit, punit.ID() = ccalineunit or punit.ID() = ccmplineunit );
       //鏄惁灞炰簬澶ц繛宸ュ巶
-      isdl                    := unit.ID() = dlunit or exists( parentunits, Elements, punit, punit.ID() = dlunit );
+      isdl         := unit.ID() = dlalienunit or unit.ID() = dlmplineunit  or exists( parentunits, Elements, punit, punit.ID() = dlalienunit or punit.ID() = dlmplineunit );
       if( iscc or isdl ){
         traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() ){
           //鑾峰彇宸ュ巶琛�

--
Gitblit v1.9.3