# HG changeset patch
# User Ranjith S R <ranjith@qualiantech.com>
# Date 1472819963 -19800
#      Fri Sep 02 18:09:23 2016 +0530
# Node ID 556c351e40fa563a430d3dc882af898543d074dc
# Parent  495913e516d91fe647b5777cac8efa5ed23cba8b
Related to issue 31679 : Update More button label if the default payment is reselected in payment method popup

diff -r 495913e516d9 -r 556c351e40fa web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboard-toolbars.js
--- a/web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboard-toolbars.js	Fri Sep 02 17:43:54 2016 +0530
+++ b/web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboard-toolbars.js	Fri Sep 02 18:09:23 2016 +0530
@@ -523,8 +523,8 @@
       this.$.btn.removeClass('btnactive-green');
       this.activegreen = false;
     }
-    if (this.dialogbuttons[status]) {
-      this.$.btn.setContent(OB.I18N.getLabel('OBPOS_MorePayments') + ' (' + this.dialogbuttons[status] + ')');
+    if (this.owner.showing && (this.dialogbuttons[status] || this.dialogbuttons[this.owner.keyboard.status])) {
+      this.$.btn.setContent(OB.I18N.getLabel('OBPOS_MorePayments') + ' (' + (this.dialogbuttons[status] || this.dialogbuttons[this.owner.keyboard.status]) + ')');
       this.$.btn.addClass('btnactive-green');
       this.activegreen = true;
     }
