Merge pull request #1807 from ViditChitkara/ticket_turnover
fixed tickets turnover bug
This commit is contained in:
commit
8442eb813f
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