Merge branch 'r-1902001-01' of gitlab.com:code2lab/SXRestaurant into r-1902001-01

This commit is contained in:
NyanLinHtut
2019-05-29 17:33:43 +06:30
15 changed files with 1193 additions and 104 deletions

View File

@@ -179,11 +179,14 @@
<th><%= t("views.right_panel.detail.sales_status") %></th>
<th><%= t("views.right_panel.detail.receipt_date") %></th>
</tr>
</thead>
<tbody>
<% add_grand_total =0 %>
<% @sales.each do |sale| %>
<tr>
<td><%= link_to sale.sale_id, transactions_sale_path(sale) %></td>
<td><%= sale.receipt_no %></td>
<td><%= sale.total_discount %></td>
@@ -194,7 +197,15 @@
<td> <%= sale.sale_status %> </td>
<td> <%= sale.receipt_date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
</tr>
<% add_grand_total += sale.grand_total%>
<% end %>
<% if !@sales.empty?%>
<tr style="border-top:2px solid #666;">
<th colspan="5">Balance</th>
<th colspan="4"><%= add_grand_total %></th>
</tr>
<% end %>
</tbody>
</table>
</div>