From 25c3a489a6c7ceeb97b393377df5c96cc1150c16 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 21 Mar 2018 18:06:12 +0630 Subject: [PATCH] update first bill for jade print --- README.md | 2 +- app/views/origami/home/show.html.erb | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a14a0926..18eaed7b 100755 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ruby 2.4.1p111 * Membership Details Osaka => Auth Token => wu8YvlLmah0CL => New => v3 - => rj0MJ0XI5GsKZehE => Old => v + => rj0MJ0XI5GsKZehE => Old => v2 => code2lab => Old Merchant account => RxzaYyAGzm7VqAZ4hKnv diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 1251e529..73ab8ea7 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -498,15 +498,13 @@ <% end %> <% if current_login_employee.role != "waiter" %> - <% if ENV["SERVER_MODE"] == "cloud" %> - - <% else %> + <%if @membership.discount && @obj_sale.customer.membership_id %> <%else%> <%end%> - <% end %> + <% end %> <% end %> @@ -759,7 +757,11 @@ receipt_no = ($("#receipt_no").html()).trim(); if((receipt_no!=undefined) && (receipt_no!="")) createReceiptNoInFirstBillData(receipt_no,type); - location.reload(); + // For Server Print - from jade + if ($("#server_mode").val() == "cloud") { + code2lab.printFile(result.filepath, result.printer_url); + } + location.reload(); } }); });