diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 4922c1df..7afa2769 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -726,9 +726,9 @@ // For Server Print - from jade if ($("#server_mode").val() == "cloud") { - code2lab.printFile(result.filepath, 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(); @@ -776,7 +776,7 @@ createReceiptNoInFirstBillData(receipt_no,type); // For Server Print - from jade if ($("#server_mode").val() == "cloud") { - code2lab.printFile(result.filepath, result.printer_url); + code2lab.printFile(result.filepath.substr(6), result.printer_url); } location.reload(); } @@ -942,7 +942,7 @@ success: function (result) { // For Server Print - from jade if ($("#server_mode").val() == "cloud") { - code2lab.printFile(result.filepath, result.printer_url); + code2lab.printFile(result.filepath.substr(6), result.printer_url); } window.location.href = '/origami/'; } diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index 001adc53..eb3eefe3 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -725,7 +725,7 @@ var customer_name = "<%= @customer.name %>"; customer_display_view(null,"reload"); // For Server Print - from jade if ($("#server_mode").val() == "cloud") { - code2lab.printFile(result.filepath, result.printer_url); + code2lab.printFile(result.filepath.substr(6), result.printer_url); } if (cashier_type=="cashier") { window.location.href = '/origami'; @@ -939,7 +939,7 @@ var customer_name = "<%= @customer.name %>"; }, function () { // For Server Print - from jade if ($("#server_mode").val() == "cloud") { - code2lab.printFile(result.filepath, result.printer_url); + code2lab.printFile(result.filepath.substr(6), result.printer_url); } if (cashier_type=="cashier") { window.location.href = '/origami'; @@ -1018,7 +1018,7 @@ var customer_name = "<%= @customer.name %>"; console.log(result); // For Server Print - from jade if ($("#server_mode").val() == "cloud") { - code2lab.printFile(result.filepath, result.printer_url); + code2lab.printFile(result.filepath.substr(6), result.printer_url); } if (cashier_type=="cashier") { window.location.href = '/origami'; diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index 1b034655..424690ff 100755 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -705,7 +705,7 @@ $("#first_bill").on('click', function(){ createReceiptNoInFirstBillData(receipt_no,""); // For Server Print - from jade if ($("#server_mode").val() == "cloud") { - code2lab.printFile(result.filepath, result.printer_url); + code2lab.printFile(result.filepath.substr(6), result.printer_url); } location.reload(); } @@ -739,7 +739,7 @@ $(".choose_payment").on('click', function () { // For Server Print - from jade if ($("#server_mode").val() == "cloud") { - code2lab.printFile(result.filepath, result.printer_url); + code2lab.printFile(result.filepath.substr(6), result.printer_url); } location.reload();