update print file.substring for jade

This commit is contained in:
Aung Myo
2018-03-28 09:29:54 +06:30
parent ac0ee37136
commit f126d2faf6
3 changed files with 9 additions and 9 deletions

View File

@@ -726,7 +726,7 @@
// For Server Print - from jade // For Server Print - from jade
if ($("#server_mode").val() == "cloud") { if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath, result.printer_url); code2lab.printFile(result.filepath.substr(6), result.printer_url);
} }
// console.log(result); // console.log(result);
@@ -776,7 +776,7 @@
createReceiptNoInFirstBillData(receipt_no,type); createReceiptNoInFirstBillData(receipt_no,type);
// For Server Print - from jade // For Server Print - from jade
if ($("#server_mode").val() == "cloud") { if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath, result.printer_url); code2lab.printFile(result.filepath.substr(6), result.printer_url);
} }
location.reload(); location.reload();
} }
@@ -942,7 +942,7 @@
success: function (result) { success: function (result) {
// For Server Print - from jade // For Server Print - from jade
if ($("#server_mode").val() == "cloud") { 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/'; window.location.href = '/origami/';
} }

View File

@@ -725,7 +725,7 @@ var customer_name = "<%= @customer.name %>";
customer_display_view(null,"reload"); customer_display_view(null,"reload");
// For Server Print - from jade // For Server Print - from jade
if ($("#server_mode").val() == "cloud") { 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") { if (cashier_type=="cashier") {
window.location.href = '/origami'; window.location.href = '/origami';
@@ -939,7 +939,7 @@ var customer_name = "<%= @customer.name %>";
}, function () { }, function () {
// For Server Print - from jade // For Server Print - from jade
if ($("#server_mode").val() == "cloud") { 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") { if (cashier_type=="cashier") {
window.location.href = '/origami'; window.location.href = '/origami';
@@ -1018,7 +1018,7 @@ var customer_name = "<%= @customer.name %>";
console.log(result); console.log(result);
// For Server Print - from jade // For Server Print - from jade
if ($("#server_mode").val() == "cloud") { 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") { if (cashier_type=="cashier") {
window.location.href = '/origami'; window.location.href = '/origami';

View File

@@ -705,7 +705,7 @@ $("#first_bill").on('click', function(){
createReceiptNoInFirstBillData(receipt_no,""); createReceiptNoInFirstBillData(receipt_no,"");
// For Server Print - from jade // For Server Print - from jade
if ($("#server_mode").val() == "cloud") { if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath, result.printer_url); code2lab.printFile(result.filepath.substr(6), result.printer_url);
} }
location.reload(); location.reload();
} }
@@ -739,7 +739,7 @@ $(".choose_payment").on('click', function () {
// For Server Print - from jade // For Server Print - from jade
if ($("#server_mode").val() == "cloud") { if ($("#server_mode").val() == "cloud") {
code2lab.printFile(result.filepath, result.printer_url); code2lab.printFile(result.filepath.substr(6), result.printer_url);
} }
location.reload(); location.reload();