promotion add in report
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
<% @sale_data.each do |sale| %>
|
||||
<!-- all total qty sum -->
|
||||
|
||||
<% if sale.status_type != "Discount" && sale.status_type != "foc"
|
||||
<% if sale.status_type != "Discount" && sale.status_type != "foc" && sale.status_type != "promotion"
|
||||
total_qty += sale.total_item
|
||||
end %>
|
||||
<% if sale.status_type == "foc" && sale.price > 0
|
||||
@@ -88,6 +88,9 @@
|
||||
<% if sale.status_type == "Discount"
|
||||
total_qty += sale.total_item*(-1)
|
||||
end %>
|
||||
<% if sale.remark =="promotion"
|
||||
total_qty += sale.total_item
|
||||
end %>
|
||||
<!-- end all total qty -->
|
||||
|
||||
<% if sale.status_type == "foc" && sale.grand_total < 0
|
||||
@@ -140,12 +143,16 @@
|
||||
<% count = count + 1 %>
|
||||
<% sub_total += sale.grand_total %>
|
||||
<% #sub_qty += sale.total_item %>
|
||||
<% if sale.status_type !="Discount" && (!sale.product_name.include? "FOC")
|
||||
<% if sale.status_type !="Discount" && (!sale.product_name.include? "FOC") && sale.status_type != "promotion"
|
||||
sub_qty += sale.total_item
|
||||
end %>
|
||||
<% if sale.status_type =="Discount"
|
||||
sub_qty += sale.total_item*(-1)
|
||||
end %>
|
||||
|
||||
<% if sale.remark == "promotion"
|
||||
sub_qty += sale.total_item
|
||||
end %>
|
||||
<% if count == value %>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
|
||||
Reference in New Issue
Block a user