Merge branch 'doemal_ordering' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-06-25 17:54:53 +06:30
2 changed files with 6 additions and 4 deletions

View File

@@ -59,6 +59,7 @@
<% total_data = {} %>
<% @sale_data.each do |sale|
if !total_item.has_key?(sale.item_code)
grand_total += sale.grand_total
total_item[sale.item_code] = sale.total_item
total_data[sale.item_code] = sale.grand_total
else
@@ -67,13 +68,13 @@
end
if sale.status_type == "void" || sale.status_type == "Discount" || sale.status_type == "foc"
total_data[sale.item_code] += sale.grand_total
grand_total += sale.grand_total
end
end
end %>
<% @sale_data.each do |sale| %>
<% grand_total += sale.grand_total %>
<% 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

View File

@@ -32,6 +32,7 @@
<% total_data = {} %>
<% @sale_data.each do |sale|
if !total_item.has_key?(sale.item_code)
grand_total += sale.grand_total
total_item[sale.item_code] = sale.total_item
total_data[sale.item_code] = sale.grand_total
else
@@ -40,13 +41,13 @@
end
if sale.status_type == "void" || sale.status_type == "Discount" || sale.status_type == "foc"
total_data[sale.item_code] += sale.grand_total
grand_total += sale.grand_total
end
end
end %>
<% @sale_data.each do |sale| %>
<% grand_total += sale.grand_total %>
<% 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