receipt no report tax
This commit is contained in:
@@ -62,6 +62,12 @@
|
||||
<% tax_profile_count = @tax_profiles.length %>
|
||||
<% sale_tax_count = result.sale_taxes.length %>
|
||||
<% tax_count = tax_profile_count - sale_tax_count %>
|
||||
<% tax_flag = true %>
|
||||
<% result.sale_taxes.each do |tax|
|
||||
if tax.tax_name.downcase.include?("service")
|
||||
tax_flag = false
|
||||
end
|
||||
end %>
|
||||
<tr>
|
||||
|
||||
<td><%= result.receipt_no rescue '-' %> </td>
|
||||
@@ -73,7 +79,7 @@
|
||||
<%end%> -->
|
||||
<% if !result.sale_taxes.empty? %>
|
||||
<% num = 1
|
||||
if tax_count > 0 %>
|
||||
if tax_flag && tax_count > 0 %>
|
||||
<% while num <= tax_count %>
|
||||
<td>0</td>
|
||||
<% num += 1
|
||||
@@ -84,6 +90,13 @@
|
||||
<%= tax.tax_payable_amount rescue '-' %>
|
||||
</td>
|
||||
<%end%>
|
||||
<% num = 1
|
||||
if tax_flag==false && tax_count > 0 %>
|
||||
<% while num <= tax_count %>
|
||||
<td>0</td>
|
||||
<% num += 1
|
||||
end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @tax_profiles.each do |tax| %>
|
||||
<td>0</td>
|
||||
|
||||
Reference in New Issue
Block a user