diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index aef45973..63553122 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -492,7 +492,7 @@ Void <% else %> - + <% end %> <% end %> <% if current_login_employee.role != "waiter" %> diff --git a/app/views/origami/pending_order/completed_sale.html.erb b/app/views/origami/pending_order/completed_sale.html.erb index 21caa906..a2940f4e 100644 --- a/app/views/origami/pending_order/completed_sale.html.erb +++ b/app/views/origami/pending_order/completed_sale.html.erb @@ -256,8 +256,18 @@ $(document).ready(function(){ }) $('#reprint').on('click', function () { var sale_id = $('#sale_id').val(); - window.location.href = '/origami/'+ sale_id + "/reprint" - + var ajax_url = '/origami/'+ sale_id + "/reprint" + + $.ajax({ + type: "GET", + url: ajax_url, + success: function (result) { + if ($("#server_mode").val() == "cloud") { + code2lab.printFile(result.filepath.substr(6), result.printer_url); + } + location.reload(); + } + }); }); $('#back').on('click', function () { window.location.href = '/origami/quick_service/pending_order'; diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index ee1573ea..55acc348 100755 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -457,7 +457,7 @@ Void <% else %> - + <% end %> <% end %> diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb index fd98e214..eeb17c6c 100755 --- a/app/views/transactions/sales/show.html.erb +++ b/app/views/transactions/sales/show.html.erb @@ -43,7 +43,7 @@