# HG changeset patch
# User Ranjith S R <ranjith@qualiantech.com>
# Date 1452779297 -19800
# Node ID 29cf410a66339cbfcf0a3d72280923ebaf938c43
# Parent  953c5c5fb1050965a72ef693569c9b2008b2b8a5
Related to issue 31877 : Verify Return Qty exceeds until Total Quantity reaches

diff --git a/web/org.openbravo.retail.returns/js/modalReturnLines.js b/web/org.openbravo.retail.returns/js/modalReturnLines.js
--- a/web/org.openbravo.retail.returns/js/modalReturnLines.js
+++ b/web/org.openbravo.retail.returns/js/modalReturnLines.js
@@ -116,7 +116,7 @@
               }
             });
           });
-          if (qty > inEvent.lines[index].remainingQuantity) {
+          if (qty > inEvent.lines[index].quantity) {
             OB.UTIL.showWarning(OB.I18N.getLabel('OBRETUR_ExceedsQuantity') + ' ' + me.newAttribute.name);
             if (!inEvent.duplicateLine) {
               inEvent.lines.splice(index, 1);
