customer name filter

This commit is contained in:
Thein Lin Kyaw
2020-07-19 19:31:14 +06:30
parent 3f97f30c36
commit ced6a09095
12 changed files with 224 additions and 141 deletions

View File

@@ -46,19 +46,13 @@
<tbody>
<% grand_total = 0 %>
<% @sale_data.each do |result| %>
<% table_name=nil
table_type =nil
if table = result.bookings[0].dining_facility
table_type = table.type
table_name = table.name
end %>
<% grand_total = grand_total + result.grand_total %>
<% grand_total = grand_total + result.grand_total %>
<tr style="border-top:4px double #666;">
<td><%= result.receipt_no rescue '-' %> </td>
<td><%=l result.receipt_date.getlocal, :format => :short rescue '-' %> </td>
<td><%= @shift_from %> - <%= @shift_to %></td>
<td><%= result.cashier_name rescue '-' %></td>
<td><%= table_type %> - <%= table_name %></td>
<td><%= result.table_type %> - <%= result.table_name %></td>
<td><%= number_format(result.grand_total, precision: precision, delimiter: delimiter) %></td>
<!-- <td>&nbsp;</td> -->
</tr>
@@ -179,9 +173,11 @@
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Customer</td>
<td><%= result.customer.name rescue '-'%>
(<%= result.customer.company rescue '-' %>)
</td>
<td><%= result.customer_name rescue '-'%>
<% if result.customer_company.present? %>
(<%= result.customer_company rescue '-' %>)
<% end %>
</td>
<td>&nbsp;</td>
</tr>
<% end %>