From 24d0b7a92dac87784237fe534f348e4261d2842b Mon Sep 17 00:00:00 2001
From: "christophe.dehen@openbravo.com" <christophe.dehen@openbravo.com>
Date: Thu, 23 Jul 2020 17:20:58 +0200
Subject: [PATCH] Fix Freeze WebPOS when you use a Gift Card and after you pull
 a new Item and then you click on Payment Button : Freeze

---
 .../js/hookRoleDiscounts.js                                     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/org.openbravo.retail.discounts.discountmatrixmanagement/js/hookRoleDiscounts.js b/web/org.openbravo.retail.discounts.discountmatrixmanagement/js/hookRoleDiscounts.js
index f1695b8..3cd4cbc 100644
--- a/web/org.openbravo.retail.discounts.discountmatrixmanagement/js/hookRoleDiscounts.js
+++ b/web/org.openbravo.retail.discounts.discountmatrixmanagement/js/hookRoleDiscounts.js
@@ -112,7 +112,7 @@ function OBDMM_RoleDiscounts(roleId) {
           actualPrice = priceList,
           discountAmount = 0;
         line.set('obdmmApprovalRequired', false);
-        if (line.get('qty') < 0) {
+        if (line.get('qty') < 0 || price < 0) {
           //Negative line. Should not be checked.
           return;
         }
-- 
GitLab

