Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
class Admin::ReportsController < ApplicationController | ||
|
||
def reservations | ||
@concert = Concert.find(params[:id]) | ||
before_filter :find_concert | ||
|
||
def will_call_list | ||
render :layout => 'printed_ticket' | ||
end | ||
|
||
def memorials | ||
def find_concert | ||
@concert = Concert.find(params[:id]) | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
%h1 Reservations | ||
- total_tickets = 0 | ||
- total_donations = BigDecimal.new('0') | ||
%h2= @concert.name | ||
%table | ||
%thead | ||
%tr | ||
%th Patron | ||
%th{:style => 'text-align:right'} Tickets | ||
%tbody | ||
- for reservation in @concert.reservations.includes(:patron).order('patrons.last_name, patrons.first_name') | ||
- patron = reservation.patron | ||
- total_tickets += reservation.number_of_tickets if reservation.number_of_tickets | ||
%tr | ||
%td{:style => 'vertical-align:baseline'} | ||
%span{:style => 'font-size:2.0em; font-weight:bold'} | ||
= patron.pretty_last_name | ||
= patron.first_name | ||
%td{:style => 'text-align:right'}= reservation.number_of_tickets | ||
%tr | ||
%td | ||
%h1 Totals | ||
%td{:style => 'text-align:right'} | ||
%h1= total_tickets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters