Edit Reprint in QS and change void button color

This commit is contained in:
San Wai Lwin
2018-06-08 10:29:45 +06:30
parent 13e11bf777
commit b3e85ff25e
4 changed files with 15 additions and 5 deletions

View File

@@ -256,8 +256,18 @@ $(document).ready(function(){
})
$('#reprint').on('click', function () {
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) {
if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath.substr(6), result.printer_url);
}
location.reload();
}
});
});
$('#back').on('click', function () {
window.location.href = '/origami/quick_service/pending_order';