From 3e0371a9fba8ac72e5c7443c77114c876ebb981a Mon Sep 17 00:00:00 2001 From: Yan Date: Fri, 15 Sep 2017 14:20:53 +0630 Subject: [PATCH] done --- app/views/crm/customers/index.html.erb | 8 ++++---- app/views/origami/redeem_payments/index.html.erb | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index b0e23e6b..ca5404ec 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -119,19 +119,19 @@ $(function() { $("#qr_code").on('click', function(e){ var code = ""; setTimeout(function(){ - console.log("hi") - getQRCode(); + var hi=getQRCode(); + alert(hi); },100); }); // Read qrcode from java function getQRCode(){ - code2lab.readQRCode(); + return code2lab.readQRCode(); } // get QRCode from Java function setQRCode(code){ - alert(code); + $("#qr_code").text(code); $("#search").val(code); } diff --git a/app/views/origami/redeem_payments/index.html.erb b/app/views/origami/redeem_payments/index.html.erb index a4783010..df4e7cf9 100644 --- a/app/views/origami/redeem_payments/index.html.erb +++ b/app/views/origami/redeem_payments/index.html.erb @@ -147,6 +147,7 @@ $(document).on('click', '.cashier_number', function(event){ return false; } }); + $("#redeem").click(function(){ valid_amount = $("#valid_amount").val(); sale_id = $("#valid_amount").attr('data-value');