From b8a71079f47d52b64d8ce5cba1874dc28167e283 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 22 Mar 2018 10:24:58 +0630 Subject: [PATCH] update room show for jade print --- app/views/origami/rooms/show.html.erb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index 867f6034..5b026ba1 100755 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -465,15 +465,15 @@ <% end %> <% if current_login_employee.role != "waiter" %> - <% if ENV["SERVER_MODE"] == "cloud" %> + <%if @membership.discount && @obj_sale.customer.membership_id %> <%else%> <%end%> - <%end%> + <% end %> @@ -691,7 +691,10 @@ $("#first_bill").on('click', function(){ 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); + } location.reload(); } }); @@ -719,6 +722,12 @@ $(".choose_payment").on('click', function () { receipt_no = ($("#receipt_no").html()).trim(); if((receipt_no!=undefined) && (receipt_no!="")) createReceiptNoInFirstBillData(receipt_no,type); + + // For Server Print - from jade + if ($("#server_mode").val() == "cloud") { + code2lab.printFile(result.filepath, result.printer_url); + } + location.reload(); } });