First Bill Click Alert
This commit is contained in:
@@ -759,8 +759,20 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Print for first bill
|
// Print for first bill
|
||||||
$("#first_bill").on('click', function () {
|
$("#first_bill").on('click', function () {
|
||||||
|
|
||||||
|
swal({
|
||||||
|
title: "Alert",
|
||||||
|
text: "Are you sure want to print First Bill?",
|
||||||
|
type: "warning",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: "#DD6B55",
|
||||||
|
confirmButtonText: "Yes, print it!",
|
||||||
|
closeOnConfirm: false
|
||||||
|
}, function (isConfirm) {
|
||||||
|
if (isConfirm) {
|
||||||
var sale_id = $('#sale_id').val();
|
var sale_id = $('#sale_id').val();
|
||||||
var ajax_url = "/origami/sale/" + sale_id + "/first_bill";
|
var ajax_url = "/origami/sale/" + sale_id + "/first_bill";
|
||||||
var server_mode =
|
var server_mode =
|
||||||
@@ -777,12 +789,11 @@
|
|||||||
if ($("#server_mode").val() == "cloud") {
|
if ($("#server_mode").val() == "cloud") {
|
||||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(result);
|
|
||||||
// code2lab.printBill(result.filepath, result.printer_model, result.printer_url);
|
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// click select option icon for add
|
// click select option icon for add
|
||||||
|
|||||||
Reference in New Issue
Block a user