From dad14c2cf836e8074918c915070662ef00eb8359 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期一, 18 十一月 2024 16:04:13 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev

---
 _Main/BL/Type_ShippingActualData/StaticMethod_GenerateData.qbl  |    2 +-
 _Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl |    2 +-
 _Main/BL/Type_PackagingPlanCell/StaticMethod_Package.qbl        |    7 +++++++
 _Main/BL/Type_ShippingActualData/StaticMethod_Synchronize.qbl   |    2 +-
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
index c5dff64..4b08f3e 100644
--- a/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
+++ b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
@@ -24,7 +24,7 @@
         showrow               := selectobject( this, FinancialProductionRow, fprow, fprow.Name() = factory.Format( 'S(Len(10))' ).Concat( row.Name() ) and fprow.Unit() = factory and factory = factory );
         if( isnull( showrow ) ){
           showrow             := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := factory, Factory := factory );
-          row.Product_MP().FinancialProductionRow( relinsert, showrow );
+    //      row.Product_MP().FinancialProductionRow( relinsert, showrow );
         }
         yearcell              := selectobject( yearcolumn, FinancialProductionCell, fpcell, fpcell.FinancialProductionRow() = showrow );
         if( isnull( yearcell ) ){
diff --git a/_Main/BL/Type_PackagingPlanCell/StaticMethod_Package.qbl b/_Main/BL/Type_PackagingPlanCell/StaticMethod_Package.qbl
index 7e0d597..de9ca8b 100644
--- a/_Main/BL/Type_PackagingPlanCell/StaticMethod_Package.qbl
+++ b/_Main/BL/Type_PackagingPlanCell/StaticMethod_Package.qbl
@@ -46,6 +46,13 @@
           canPackagingQuantity  := ifexpr( ceil( needPackagingQuantity / ppls.LotSize() ) < floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ),
                                            ceil( needPackagingQuantity / ppls.LotSize() ),
                                            floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ) ) * ppls.LotSize();
+          // 鏀圭被涓嬪叾浠栦骇鍝佸寘瑁呮�诲拰
+          categoryPackageQuantity := sum( indexPPCell, PackagingPlanColumn.PackagingPlanCell, tempPPCell, 
+                                          tempPPCell <> indexPPCell                                                            and
+                                          tempPPCell.PackagingPlanRow().Factory() = indexPPCell.PackagingPlanRow().Factory()   and
+                                          tempPPCell.PackagingPlanRow().Category() = indexPPCell.PackagingPlanRow().Category(),
+                                          tempPPCell.Package() );
+          canPackagingQuantity    := minvalue( [Number] ( ppnc.MaximumDailyPackagingQuantity() - categoryPackageQuantity ), canPackagingQuantity );
     //        info( "寮�濮嬪寘瑁呯殑鏃ユ湡锛�", indexPPCell.StartDate().Format( "Y-M2-D2" ), "    鑳藉寘瑁呯殑鏁伴噺:", canPackagingQuantity );
             
           indexPPCell.Package( canPackagingQuantity );
diff --git a/_Main/BL/Type_ShippingActualData/StaticMethod_GenerateData.qbl b/_Main/BL/Type_ShippingActualData/StaticMethod_GenerateData.qbl
index 12089d6..f895a3b 100644
--- a/_Main/BL/Type_ShippingActualData/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_ShippingActualData/StaticMethod_GenerateData.qbl
@@ -13,7 +13,7 @@
     createtime       := guard( item.Get( "create_time").GetString(),"");
     dday             := guard( item.Get( "dday").GetString(),"");
     fourcode         := guard( item.Get( "four_code").GetString(),"");
-    quantity         := guard( item.Get( "qty").GetReal(), 0);
+    quantity         := [Real]guard( item.Get( "qty").GetString(), "");
     fac              := guard( item.Get( "fac").GetString(),"");
     id               := guard( item.Get( "id").GetNumber(),0);
     
diff --git a/_Main/BL/Type_ShippingActualData/StaticMethod_Synchronize.qbl b/_Main/BL/Type_ShippingActualData/StaticMethod_Synchronize.qbl
index 26e157b..d6be535 100644
--- a/_Main/BL/Type_ShippingActualData/StaticMethod_Synchronize.qbl
+++ b/_Main/BL/Type_ShippingActualData/StaticMethod_Synchronize.qbl
@@ -55,7 +55,7 @@
       traverse( sadatalist, Elements, e ){
         row := selectobject( owner, ShippingActualRow, row, row.Name() = e.FourCode() );
         if( isnull( row ) ){
-          owner.ShippingActualRow( relnew, Name := e.FourCode() );
+          row := owner.ShippingActualRow( relnew, Name := e.FourCode() );
         }
         
         cell := row.ShippingActualCell( relnew, Quantity := e.Quantity() );

--
Gitblit v1.9.3