Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -142,7 +142,7 @@ $(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// QR Code Reader
|
// QR Code Reader
|
||||||
$("#qr_code").on('sclick', function(e){
|
$("#qr_code").on('click', function(e){
|
||||||
var code = "";
|
var code = "";
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
code=getQRCode();
|
code=getQRCode();
|
||||||
|
|||||||
@@ -368,6 +368,7 @@
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
code=getQRCode();
|
code=getQRCode();
|
||||||
setQRCode(code);
|
setQRCode(code);
|
||||||
|
}, 100);
|
||||||
|
|
||||||
customer_mamber_card_no = $("#search").val();
|
customer_mamber_card_no = $("#search").val();
|
||||||
|
|
||||||
@@ -392,11 +393,9 @@
|
|||||||
customer_name = data[0].name;
|
customer_name = data[0].name;
|
||||||
update_sale(customer_id, customer_name,sale_id);
|
update_sale(customer_id, customer_name,sale_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},100);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Read qrcode from java
|
// Read qrcode from java
|
||||||
|
|||||||
@@ -1134,6 +1134,9 @@ var customer_name = "<%= @customer.name %>";
|
|||||||
var membership_type = '';
|
var membership_type = '';
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
code=getQRCode();
|
code=getQRCode();
|
||||||
|
$("#qr_code").val(code);
|
||||||
|
});
|
||||||
|
|
||||||
if(sale_id != 0 && code != ""){
|
if(sale_id != 0 && code != ""){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@@ -1154,13 +1157,11 @@ var customer_name = "<%= @customer.name %>";
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},100);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Read qrcode from java
|
// Read qrcode from java
|
||||||
function getQRCode(){
|
function getQRCode(){
|
||||||
return code2lab.readQRCode();
|
return code2lab.readQRCode();
|
||||||
$("#qr_code").val(code);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_sale(membership_id, customer_id, customer_name, sale_id) {
|
function update_sale(membership_id, customer_id, customer_name, sale_id) {
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ class ActionController::Base
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
#check for license file
|
#check for license file
|
||||||
if check_license
|
# if check_license
|
||||||
current_license(ENV["SX_PROVISION_URL"])
|
# current_license(ENV["SX_PROVISION_URL"])
|
||||||
else
|
# else
|
||||||
redirect_to activate_path
|
# redirect_to activate_path
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user