# HG changeset patch
# User Guillermo Gil <guillermo.gil@openbravo.com>
# Date 1488358735 -3600
#      Wed Mar 01 09:58:55 2017 +0100
# Node ID 6aee70aa0d11171617d0ae1c6ef5993310e1ad63
# Parent  05cf1f085b80e4ac6dd78ac5ae934cabad0938ea
Fixed issue 35391: The whole rule model should be inside the discount to apply

Added rule model on rule property for the discounts

diff --git a/web/org.openbravo.retail.posterminal/js/model/order.js b/web/org.openbravo.retail.posterminal/js/model/order.js
--- a/web/org.openbravo.retail.posterminal/js/model/order.js
+++ b/web/org.openbravo.retail.posterminal/js/model/order.js
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2013-2016 Openbravo S.L.U.
+ * Copyright (C) 2013-2017 Openbravo S.L.U.
  * Licensed under the Openbravo Commercial License version 1.0
  * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
  * or in the legal folder of this module distribution.
@@ -1922,6 +1922,7 @@
       }
       disc.name = discount.name || rule.get('printName') || rule.get('name');
       disc.ruleId = rule.id || rule.get('ruleId');
+      disc.rule = rule;
       disc.amt = discount.amt;
       disc.fullAmt = discount.amt ? discount.amt : 0;
       disc.actualAmt = discount.actualAmt;
