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) {
console.log(data);
if (data.status) {
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{
if(data.filepath){
// 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{
// if((data.filepath != undefined) && (data.filepath != "")){
//PDF lightbox data
var pdfPath = "/en/pdfjs/minimal?file=" + data.filepath.substring(6);
$("#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});
$("#receiptpdfModalLabel").text("Receipt: " + data.receipt_no);
}else{
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{
// 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{
swal({
title: 'Oops',