parent
22247a0ac2
commit
38342cd557
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ class Ticket < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def tickets_turnover_total(id)
|
||||
tickets = TicketPurchase.where(ticket_id: id)
|
||||
tickets = TicketPurchase.where(ticket_id: id).paid
|
||||
tickets.inject(0){ |sum, ticket| sum + (ticket.amount_paid * ticket.quantity) }
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue