update sale item report qty sum
This commit is contained in:
@@ -77,11 +77,14 @@
|
||||
<% total_tax = 0 %>
|
||||
|
||||
<% @sale_data.each do |sale| %>
|
||||
|
||||
<!-- all total qty sum -->
|
||||
<% if sale.status_type != "Discount" && sale.status_type != "foc"
|
||||
total_qty += sale.total_item
|
||||
end %>
|
||||
|
||||
<% if sale.status_type == "foc" && sale.price > 0
|
||||
total_qty += sale.total_item
|
||||
end %>
|
||||
<!-- end all total qty -->
|
||||
<% if sale.status_type == "foc" && sale.grand_total < 0
|
||||
total_item_foc += sale.grand_total*(-1)
|
||||
end %>
|
||||
@@ -127,9 +130,13 @@
|
||||
<% count = count + 1 %>
|
||||
<% sub_total += sale.grand_total %>
|
||||
<% #sub_qty += sale.total_item %>
|
||||
<% if sale.status_type != "Discount" && sale.status_type != "foc"
|
||||
<% if sale.status_type!="Discount" && sale.status_type!="foc"
|
||||
sub_qty += sale.total_item
|
||||
end %>
|
||||
<% if sale.status_type == "foc" && sale.price > 0
|
||||
sub_qty += sale.total_item
|
||||
end %>
|
||||
|
||||
<% if count == value %>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
|
||||
Reference in New Issue
Block a user