change some func:

This commit is contained in:
phyusin
2018-08-23 14:23:08 +06:30
parent 7e353915e3
commit e820f564ea
7 changed files with 22 additions and 4 deletions

View File

@@ -109,6 +109,7 @@
<th><%= t("views.right_panel.detail.receipt_no") %></th>
<th> <%= t :cashier %> <%= t("views.right_panel.detail.name") %></th>
<th> <%= t :payment_method %></th>
<th> <%= t :customer %></th>
<th> <%= t("views.right_panel.detail.amount") %> </th>
<th><%= t("views.right_panel.detail.grand_total") %></th>
</tr>
@@ -129,8 +130,8 @@
<% end %>
<td><%= payment.receipt_no rescue '-' %></td>
<td><%= payment.cashier_name rescue '-' %></td>
<!--<td><%= payment.sale.customer.name rescue '-' %></td>-->
<td><%= payment.payment_method rescue '-' %></td>
<td><%= payment.sale.customer.name rescue '-' %></td>
<% if payment.payment_method === 'cash' %>
<td><%= number_with_precision(payment.payment_amount - payment.change_amount , precision: precision.to_i ,delimiter: delimiter) rescue '-' %> </td>
<%else%>
@@ -143,7 +144,7 @@
<% end %>
<%if total>0%>
<tr>
<td colspan="4" style="text-align: right;"><strong >Total </strong></td>
<td colspan="5" style="text-align: right;"><strong >Total </strong></td>
<td colspan="2"><strong><%=number_with_precision(total , precision: precision.to_i ,delimiter: delimiter) rescue '-' %></strong></td>
</tr>
<%end%>