Add turnover for admin

Admin can see the turnover amount for each ticket type.
This commit is contained in:
rahul 2017-09-25 00:55:09 +05:30
parent 0d70832f5b
commit 03c9f7deb1
3 changed files with 7 additions and 6 deletions

View file

@ -496,7 +496,7 @@ class Conference < ActiveRecord::Base
if tickets && ticket_purchases
tickets.each do |ticket|
result[ticket.title] = {
'value' => ApplicationController.helpers.humanized_money(ticket.tickets_turnover).delete(',').to_i,
'value' => ApplicationController.helpers.humanized_money(ticket.tickets_turnover_total(ticket.id)).delete(',').to_i,
'color' => "\##{Digest::MD5.hexdigest(ticket.title)[0..5]}"
}
end