Class: Ticket::Reports::Sales
- Inherits:
-
Base
- Object
- Base
- Ticket::Reports::Sales
show all
- Defined in:
- app/models/ticket/reports.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize, reporting_methods
Instance Method Details
#advance ⇒ Object
72
73
74
|
# File 'app/models/ticket/reports.rb', line 72
def advance
tickets.sold.unplayed.sum(:sold_price)
end
|
#played ⇒ Object
68
69
70
|
# File 'app/models/ticket/reports.rb', line 68
def played
tickets.sold.played.sum(:sold_price)
end
|
#today ⇒ Object
64
65
66
|
# File 'app/models/ticket/reports.rb', line 64
def today
tickets.sold_after(Time.now.beginning_of_day).sum(:sold_price)
end
|
#total ⇒ Object
60
61
62
|
# File 'app/models/ticket/reports.rb', line 60
def total
tickets.sold.sum(:sold_price)
end
|