From 386cb9a858f89d881acea3fd3a0d7c65945542ef Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期五, 17 一月 2025 08:17:33 +0800
Subject: [PATCH] 包装计划,上线计划bug修复

---
 _Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl b/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl
index adf176c..5c8f602 100644
--- a/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl
+++ b/_Main/BL/Type_NewAssemblyOnlinePlanCell/StaticMethod_PostLayingProcessing.qbl
@@ -58,8 +58,9 @@
               
               targetQuantity := targetQuantity - [Number]finalQuantity;
               targetCell    := minselect( targetCells, Elements, tempNAOPCell, tempNAOPCell.OrderNr() > 0 and tempNAOPCell.Quantity() > 0, tempNAOPCell.OrderNr() );
-              finalQuantity := minvalue( targetQuantity, targetCell.Quantity() );
-              currentCell   := select( naopc, NewAssemblyOnlinePlanCell, tempNAOPCell, tempNAOPCell.NewAssemblyOnlinePlanRow() = targetCell.NewAssemblyOnlinePlanRow() );
+              finalQuantity := minvalue( targetQuantity, guard( targetCell.Quantity(), 0.0 ) );
+              currentCell   := select( naopc, NewAssemblyOnlinePlanCell, tempNAOPCell, 
+                                       guard( tempNAOPCell.NewAssemblyOnlinePlanRow() = targetCell.NewAssemblyOnlinePlanRow(), false ) );
             }
           }
         }

--
Gitblit v1.9.3