From cc4399ecdbba578d08bb0129b43b57ef5856e3b7 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 24 Jul 2018 13:54:56 +0630 Subject: [PATCH] update receipt detail xls --- app/views/reports/receipt_no_detail/index.xls.erb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/views/reports/receipt_no_detail/index.xls.erb b/app/views/reports/receipt_no_detail/index.xls.erb index a475fdee..83c83a0e 100755 --- a/app/views/reports/receipt_no_detail/index.xls.erb +++ b/app/views/reports/receipt_no_detail/index.xls.erb @@ -37,9 +37,16 @@ <% grand_total = 0 %> <% @sale_data.each do |result| %> <% grand_total = grand_total.to_f + result.grand_total.to_f%> + <% table_name=nil + table_type =nil + if result.table_id.to_i>0 + table = DiningFacility.find(result.table_id) + table_type = table.type + table_name = table.name + end %> <%= @shift_from %> - <%= @shift_to %> - <%= result.table_type %> - <%= result.table_name %> + <%= table_type %> - <%= table_name %> <%= result.receipt_no rescue '-' %> <%= result.cashier_name rescue '-' %> <%=result.grand_total%>