diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 6c38ba99..d36a6715 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -715,6 +715,7 @@ $("#first_bill").on('click', function () { var sale_id = $('#sale_id').val(); var ajax_url = "/origami/sale/" + sale_id + "/first_bill"; + var server_mode = $.ajax({ type: "GET", @@ -723,12 +724,17 @@ receipt_no = ($("#receipt_no").html()).trim(); if((receipt_no!=undefined) && (receipt_no!="")) createReceiptNoInFirstBillData(receipt_no,""); + + // For Server Print - from jade + if ($("#server_mode").val() == "cloud") { + code2lab.printFile(result.filepath, result.printer_url); + } // console.log(result); // code2lab.printBill(result.filepath, result.printer_model, result.printer_url); location.reload(); } - }); + }); }); $(".choose_payment").on('click', function () {