# HG changeset patch
# User Ranjith S R <ranjith@qualiantech.com>
# Date 1452186067 -19800
# Node ID a171db1c8e187f6df1d931fe88d8bf09a1c662f4
# Parent  15f8524dfd1b3a8165e6c26ff493beb45f0cf0d3
Related to issue 31790 : Show Amount to keep in cashup, if cash to keep step is disabled

diff --git a/web/org.openbravo.retail.posterminal/js/closecash/view/tabcashtokeep.js b/web/org.openbravo.retail.posterminal/js/closecash/view/tabcashtokeep.js
--- a/web/org.openbravo.retail.posterminal/js/closecash/view/tabcashtokeep.js
+++ b/web/org.openbravo.retail.posterminal/js/closecash/view/tabcashtokeep.js
@@ -140,7 +140,7 @@
           changeOption: function (inSender, inEvent) {
             this.$.allowvariableamount.tap();
           },
-          disableControls: function () {
+          disableControls: function (resetQtyToKeep) {
             //remove selected RButtons
             //reset UI and model.
             this.$.keepfixedamount.disableRadio();
@@ -149,9 +149,11 @@
             this.$.allowvariableamount.disableRadio();
 
             this.$.variableInput.setContent('');
-            this.doResetQtyToKeep({
-              qtyToKeep: null
-            });
+            if (resetQtyToKeep) {
+              this.doResetQtyToKeep({
+                qtyToKeep: null
+              });
+            }
           },
           renderFixedAmount: function (modelToDraw) {
             var udfn, cnted;
@@ -184,7 +186,7 @@
             if (!paymentMethod.automatemovementtoother) {
               return true;
             }
-            this.disableControls();
+            this.disableControls(paymentMethod.allowvariableamount);
             //draw
             this.renderFixedAmount(modelToDraw);
 
