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');