order reservation pdf setting

This commit is contained in:
phyusin
2018-11-29 13:19:29 +06:30
parent ed6310d462
commit 27f76e291b
5 changed files with 100 additions and 22 deletions

View File

@@ -504,17 +504,26 @@ function callback_url(callback,ref_no,order_id,status,min_type,time,exptime,reas
dataType: "json",
success: function(data) {
if (data.status) {
swal({
title: 'Information',
text: "Order has been "+data.message,
type: 'success',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/order_reservation';
});
if(status != "completed"){
swal({
title: 'Information',
text: "Order has been "+data.message,
type: 'success',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/order_reservation';
});
}else{
//PDF lightbox data
var pdfPath = "/en/pdfjs/minimal?file=" + result.filename.substring(6);
$("#sale_receipt_no").val(result.receipt_no);
$("#filename").val(result.filename);
$("#printer_name").val(result.printer_name);
$("#receipt_pdf").attr("src", pdfPath);
}
}else{
swal({
title: 'Oops',
@@ -672,4 +681,10 @@ function getOnlineOrderCount(){
// alert(count);
return count;
}
/* online order count*/
/* online order count*/
/* pdf print out */
function print_receipt(){
}
/* pdf print out */