update payment report
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
|
||||
<tr>
|
||||
<th> <%= t("views.right_panel.detail.shift_name") %> </th>
|
||||
<th> <%= t("views.right_panel.detail.payment_method") %></th>
|
||||
<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("views.right_panel.detail.amount") %> </th>
|
||||
@@ -92,7 +92,11 @@
|
||||
<tbody>
|
||||
<% total = 0 %>
|
||||
<% @pyament_method.each do |payment| %>
|
||||
<% total += payment.payment_amount + payment.outstanding_amount %>
|
||||
<% if payment.payment_method === 'cash'
|
||||
total += payment.payment_amount - payment.change_amount
|
||||
else
|
||||
total += payment.payment_amount
|
||||
end%>
|
||||
<tr>
|
||||
<% if @shift_from.nil? && @shift_to.nil? %>
|
||||
<td><%= payment.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%></td>
|
||||
@@ -103,7 +107,11 @@
|
||||
<td><%= payment.cashier_name rescue '-' %></td>
|
||||
<!--<td><%= payment.sale.customer.name rescue '-' %></td>-->
|
||||
<td><%= payment.payment_method rescue '-' %></td>
|
||||
<td><%= payment.payment_amount + payment.outstanding_amount%> </td>
|
||||
<% if payment.payment_method === 'cash' %>
|
||||
<td><%= payment.payment_amount - payment.change_amount%> </td>
|
||||
<%else%>
|
||||
<td><%= payment.payment_amount%> </td>
|
||||
<%end%>
|
||||
<td><%= payment.sale.grand_total rescue '-' %></td>
|
||||
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user