From db492a76f62cd9a75be3bd7a7d6ca5029be3d053 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 4 Sep 2008 01:49:37 +0000 Subject: [PATCH] Fix [ 2092198 ] Error voiding an Inventory Move --- .../src/org/compiere/model/MMovementLine.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/base/src/org/compiere/model/MMovementLine.java b/base/src/org/compiere/model/MMovementLine.java index a82cf9201c..3e6f3d875c 100644 --- a/base/src/org/compiere/model/MMovementLine.java +++ b/base/src/org/compiere/model/MMovementLine.java @@ -1,5 +1,5 @@ /****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * + * Product: Adempiere ERP & CRM Smart Business Solution * * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * @@ -177,8 +177,21 @@ public class MMovementLine extends X_M_MovementLine if (getMovementQty().signum() == 0) { - log.saveError("FillMandatory", Msg.getElement(getCtx(), "MovementQty")); - return false; + if ( MMovement.DOCACTION_Void.equals(getParent().getDocAction()) + && ( MMovement.DOCSTATUS_Drafted.equals(getParent().getDocStatus()) + || MMovement.DOCSTATUS_Invalid.equals(getParent().getDocStatus()) + || MMovement.DOCSTATUS_InProgress.equals(getParent().getDocStatus()) + || MMovement.DOCSTATUS_Approved.equals(getParent().getDocStatus()) + || MMovement.DOCSTATUS_NotApproved.equals(getParent().getDocStatus()) + ) + ) + { + // [ 2092198 ] Error voiding an Inventory Move - globalqss + // zero allowed in this case (action Void and status Draft) + } else { + log.saveError("FillMandatory", Msg.getElement(getCtx(), "MovementQty")); + return false; + } } // Qty Precision