change dailysale report and check tax in add to existing

This commit is contained in:
phyusin
2018-05-17 11:21:38 +06:30
parent dc23df673f
commit 62dec82bd8
6 changed files with 23 additions and 31 deletions

View File

@@ -118,6 +118,7 @@
</tr>
<% total_tax = 0 %>
<% net = 0 %>
<% unless @tax.empty? %>
<% @tax.each do |tax| %>
<% total_tax += tax.tax_amount.to_f %>
@@ -128,7 +129,9 @@
</tr>
<% end %>
<% net = total - total_tax %>
<% net = grand_total %>
<% net = net - rounding_adj%>
<% net = net - total_tax %>
<tr style="font-weight:600;">
<td colspan="12" style='text-align:right;'><%= t("views.right_panel.detail.net_amount") %></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",net), :delimiter => ',') rescue '-'%></td>