fixed shift sales other payment

This commit is contained in:
NyanLinHtut
2020-06-17 17:15:01 +06:30
parent e697108a6e
commit b46cefc8bc
2 changed files with 8 additions and 8 deletions

View File

@@ -73,11 +73,11 @@
<th></th>
<th colspan="<%= @count + 1 %>" style='text-align:center;'>Income</th>
<th colspan=4 style='text-align:center;'>Outgoing</th>
<th style='text-align:center;' data-toggle="tooltip" data-placement="top" title="Gross Sales = (Income+Discount) - (FOC+Void)"><i class="material-icons md-18">live_help</i></th>
<th style='text-align:center;' data-toggle="tooltip" data-placement="top" title="Total Sales = Gross Sales - Discount"><i class="material-icons md-18">live_help</i></th>
<th style='text-align:center; cursor: help;' data-toggle="tooltip" data-placement="top" title="Gross Sales = (Income+Discount) - Void"><i class="material-icons md-18">live_help</i></th>
<th style='text-align:center; cursor: help;' data-toggle="tooltip" data-placement="top" title="Total Sales = Gross Sales - Discount"><i class="material-icons md-18">live_help</i></th>
<% if @tax.blank? %>
<th style='text-align:center;' data-toggle="tooltip" data-placement="top" title="Tax = Total Sales / 21"><i class="material-icons md-18">live_help</i></th>
<th style='text-align:center;' data-toggle="tooltip" data-placement="top" title="Net Sales = Total Sales - Tax"><i class="material-icons md-18">live_help</i></th>
<th style='text-align:center; cursor: help;' data-toggle="tooltip" data-placement="top" title="Tax = Total Sales / 21"><i class="material-icons md-18">live_help</i></th>
<th style='text-align:center; cursor: help;' data-toggle="tooltip" data-placement="top" title="Net Sales = Total Sales - Tax"><i class="material-icons md-18">live_help</i></th>
<% end %>
</tr>
<tr>

View File

@@ -127,7 +127,7 @@
<th><%=@shift.credit_sales %></th>
</tr>
<% @total_amount = 0
@total_other_amount = 0
@other_payment.each do |other| %>
<tr>
<th></th>
@@ -138,8 +138,8 @@
<tr>
<th></th>
<td style="text-align: right;"><%= method %> Payment</td>
<td><%=other[method.parameterize.to_sym].round(2) rescue '-' %></td>
<% @total_amount = @total_amount + other[method.parameterize.to_sym] rescue 0.0 %>
<td><%= other[method.parameterize.to_sym].round(2) rescue '-' %></td>
<% @total_other_amount = @total_other_amount + other[method.parameterize.to_sym] rescue 0.0 %>
</tr>
<% end %>
<tr>
@@ -153,7 +153,7 @@
<tr>
<th></th>
<th style="text-align: right;">Total Other Payment </th>
<th><%=@shift.other_sales %></th>
<th><%= @total_other_amount %></th>
</tr>
<tr>
<th></th>