From 328cab7be38ae9068b14f659de48efd30ee7f24f Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Tue, 19 Jun 2018 21:58:33 -0600 Subject: [PATCH] Automatically open money entry when selecting cash payment --- static/js/pos_payment.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/static/js/pos_payment.js b/static/js/pos_payment.js index d0e0ce5..ee3c6c0 100644 --- a/static/js/pos_payment.js +++ b/static/js/pos_payment.js @@ -27,6 +27,7 @@ function addPayment(type, icon, text) { amount = ($("#owed-amount").text() * 1.0).toFixed(2); } } + $("#payment-lines").append('' + '
' + '
' @@ -59,6 +60,13 @@ function addPayment(type, icon, text) { + '
' + '
'); $("#payment-lines .payment-entry").last().focus(); + + if (type == "cash") { + bsmoneypad("Currency Calculator", 0.0, "Save", "Cancel", null, function (answer) { + $("#payment-lines .payment-entry").last().val(answer); + recalculate(); + }); + } } function checkGiftCardBalance() {