This commit is contained in:
phyusin
2018-12-10 13:01:00 +06:30
parent 12bdfd01dc
commit 62062a151e

View File

@@ -515,20 +515,20 @@ function callback_url(callback,ref_no,order_id,status,min_type,time,exptime,reas
success: function(data) { success: function(data) {
console.log(data); console.log(data);
if (data.status) { if (data.status) {
if(status != "completed"){ // if(status != "completed"){
swal({ // swal({
title: 'Information', // title: 'Information',
text: "Order has been "+data.message, // text: "Order has been "+data.message,
type: 'success', // type: 'success',
html: true, // html: true,
closeOnConfirm: false, // closeOnConfirm: false,
closeOnCancel: false, // closeOnCancel: false,
allowOutsideClick: false // allowOutsideClick: false
}, function () { // }, function () {
window.location.href = '/origami/order_reservation'; // window.location.href = '/origami/order_reservation';
}); // });
}else{ // }else{
if(data.filepath){ // if((data.filepath != undefined) && (data.filepath != "")){
//PDF lightbox data //PDF lightbox data
var pdfPath = "/en/pdfjs/minimal?file=" + data.filepath.substring(6); var pdfPath = "/en/pdfjs/minimal?file=" + data.filepath.substring(6);
$("#sale_id").val(data.sale_id); $("#sale_id").val(data.sale_id);
@@ -539,20 +539,20 @@ function callback_url(callback,ref_no,order_id,status,min_type,time,exptime,reas
$("#receiptpdfModal").modal({show : true, backdrop : false, keyboard : false}); $("#receiptpdfModal").modal({show : true, backdrop : false, keyboard : false});
$("#receiptpdfModalLabel").text("Receipt: " + data.receipt_no); $("#receiptpdfModalLabel").text("Receipt: " + data.receipt_no);
}else{ // }else{
swal({ // swal({
title: 'Information', // title: 'Information',
text: "Order has been "+data.message, // text: "Order has been "+data.message,
type: 'success', // type: 'success',
html: true, // html: true,
closeOnConfirm: false, // closeOnConfirm: false,
closeOnCancel: false, // closeOnCancel: false,
allowOutsideClick: false // allowOutsideClick: false
}, function () { // }, function () {
window.location.href = '/origami/order_reservation'; // window.location.href = '/origami/order_reservation';
}); // });
} // }
} // }
}else{ }else{
swal({ swal({
title: 'Oops', title: 'Oops',