Prevent math errors in calculating ticket 'turnover'
This commit is contained in:
parent
d0f673b73d
commit
3031bb43cf
5 changed files with 7 additions and 13 deletions
|
|
@ -517,7 +517,7 @@ class Conference < ApplicationRecord
|
|||
if tickets && ticket_purchases
|
||||
tickets.each do |ticket|
|
||||
result[ticket.title] = {
|
||||
'value' => ApplicationController.helpers.humanized_money(ticket.tickets_turnover_total(ticket.id)).delete(',').to_i,
|
||||
'value' => ApplicationController.helpers.humanized_money(ticket.tickets_turnover_total).delete(',').to_i,
|
||||
'color' => "\##{Digest::MD5.hexdigest(ticket.title)[0..5]}"
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue