Merge branch 'adminbsb_ui_changes' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
phyusin
2018-06-12 14:15:59 +06:30

View File

@@ -415,7 +415,18 @@ $(document).on('click', '.access_modal', function(event){
}else if(type == "reprint") {
$('#AccessCodeModal').modal('hide');
var sale_id = $('#sale_id').val();
window.location.href = '/origami/'+ sale_id + "/reprint"
var ajax_url = "/origami/"+ sale_id + "/reprint";
$.ajax({
type: "GET",
url: ajax_url,
success: function (result) {
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath.substr(6), result.printer_url);
}
location.reload();
}
});
}else if(type == "foc"){
$('#AccessCodeModal').modal('hide');
$('#focModal').modal('show');
@@ -427,21 +438,4 @@ $(document).on('click', '.access_modal', function(event){
}
});
}
$('#re-print').click(function() {
var sale_id = $('#sale_id').val();
var ajax_url = "/origami/"+ sale_id + "/reprint"
// return false;
$.ajax({
type: "GET",
url: ajax_url,
success: function (result) {
// For Server Print - from jade
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath.substr(6), result.printer_url);
}
location.reload();
}
});
});
</script>