From 8c427dbb6c10fbb466781e2db8784537a9753d29 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 5 Feb 2008 07:17:17 +0000 Subject: [PATCH] Fix [ 1876965 ] Wrong serial management on purchase process --- base/src/org/compiere/model/MInOut.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base/src/org/compiere/model/MInOut.java b/base/src/org/compiere/model/MInOut.java index 89d9189c84..7344ae891c 100644 --- a/base/src/org/compiere/model/MInOut.java +++ b/base/src/org/compiere/model/MInOut.java @@ -1435,7 +1435,8 @@ public class MInOut extends X_M_InOut implements DocAction return DocAction.STATUS_Invalid; } // Update PO with ASI - if (oLine != null && oLine.getM_AttributeSetInstance_ID() == 0) + if ( oLine != null && oLine.getM_AttributeSetInstance_ID() == 0 + && sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ] { oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); oLine.save(get_TrxName()); @@ -1458,7 +1459,8 @@ public class MInOut extends X_M_InOut implements DocAction } // Update PO with ASI oLine = new MOrderLine (getCtx(), po.getC_OrderLine_ID(), get_TrxName()); - if (oLine != null && oLine.getM_AttributeSetInstance_ID() == 0) + if ( oLine != null && oLine.getM_AttributeSetInstance_ID() == 0 + && sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ] { oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); oLine.save(get_TrxName());