
diff -r 32073e4e2514 -r 7d8b9586731b web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
--- a/web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js	Tue Nov 17 13:31:39 2015 -0600
+++ b/web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js	Fri Nov 20 19:05:01 2015 +0100
@@ -1105,6 +1105,10 @@
   classes: 'btn-icon-small btnlink-green',
   style: 'width: 120px;float: right; margin: 10px 5px 5px 0px; height: 2.0em; display:block; clear: right;',
   permission: 'OBPOS_receipt.layawayReceipt',
+  show: function () {
+    this.inherited(arguments);
+    this.setDisabled(false);
+  },
   init: function (model) {
     this.model = model;
     this.setContent(OB.I18N.getLabel('OBPOS_LblLayaway'));
@@ -1127,6 +1131,10 @@
         payments;
     this.allowOpenDrawer = false;
 
+    if (this.disabled) {
+      return true;
+    }
+
     if (myModel.get('leftColumnViewManager').isOrder()) {
       payments = this.owner.receipt.get('payments');
     } else {
@@ -1151,6 +1159,8 @@
         receipt.set('generateInvoice', false);
       }
     }
+    this.setDisabled(true);
+    enyo.$.scrim.show();
     receipt.trigger('paymentDone', me.allowOpenDrawer);
   }
 });
\ No newline at end of file




