Class: Ticket::Reports::Sales

Inherits:
Base
  • Object
show all
Defined in:
app/models/ticket/reports.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, reporting_methods

Constructor Details

This class inherits a constructor from Ticket::Reports::Base

Instance Method Details

#advanceObject



88
89
90
# File 'app/models/ticket/reports.rb', line 88

def advance
  tickets.sold.unplayed.sum(:sold_price)
end

#playedObject



84
85
86
# File 'app/models/ticket/reports.rb', line 84

def played
  tickets.sold.played.sum(:sold_price)
end

#todayObject



80
81
82
# File 'app/models/ticket/reports.rb', line 80

def today
  tickets.sold_after(Time.now.beginning_of_day).sum(:sold_price)
end

#totalObject



76
77
78
# File 'app/models/ticket/reports.rb', line 76

def total
  tickets.sold.sum(:sold_price)
end