Changed raw SQL query to activerecord
This commit is contained in:
@@ -36,11 +36,10 @@
|
||||
<tbody>
|
||||
<% grand_total = 0 %>
|
||||
<% @sale_data.each do |result| %>
|
||||
<% grand_total = grand_total.to_f + result.grand_total.to_f%>
|
||||
<% table_name=nil
|
||||
<% grand_total = grand_total.to_f + result.grand_total.to_f%>
|
||||
<% table_name=nil
|
||||
table_type =nil
|
||||
if result.table_id.to_i>0
|
||||
table = DiningFacility.find(result.table_id)
|
||||
if table = result.bookings[0].dining_facility
|
||||
table_type = table.type
|
||||
table_name = table.name
|
||||
end %>
|
||||
|
||||
Reference in New Issue
Block a user