Merge pull request #1701 from rahul2240/amount

Add paid option in physical ticket#index
This commit is contained in:
Ana María Martínez Gómez 2017-10-27 14:22:40 +02:00 committed by GitHub
commit 1d07125e7d
12 changed files with 46 additions and 28 deletions

View file

@ -0,0 +1,16 @@
%tr
%td= physical_ticket.id
%td= physical_ticket.ticket.title
%td= physical_ticket.user.email
%td= humanized_money_with_symbol physical_ticket.ticket_purchase.amount_paid
%td
.btn-group
= link_to 'Show',
conference_physical_ticket_path(conference.short_title,
physical_ticket.token),
class: 'btn btn-primary'
= link_to 'Generate PDF',
conference_physical_ticket_path(conference.short_title,
physical_ticket.token,
format: :pdf),
class: 'button btn btn-default btn-info'

View file

@ -21,23 +21,11 @@
%th ID
%th Type
%th User
%th Paid
%th Actions
%tbody
- @physical_tickets.each do |physical_ticket|
%tr
%td= physical_ticket.id
%td= physical_ticket.ticket.title
%td= physical_ticket.user.email
%td
.btn-group
= link_to 'Show',
conference_physical_ticket_path(@conference.short_title,
physical_ticket.token),
class: 'btn btn-primary'
= link_to 'Generate PDF',
conference_physical_ticket_path(@conference.short_title,
physical_ticket.token,
format: :pdf),
class: 'button btn btn-default btn-info'
= render "physical_ticket", physical_ticket: physical_ticket,
conference: @conference
- else
%h5 No Tickets sold!

View file

@ -27,7 +27,7 @@
%td
= ticket.tickets_sold
%td
= humanized_money_with_symbol ticket.tickets_turnover
= humanized_money_with_symbol ticket.tickets_turnover_total(ticket.id)
%td
= ticket.registration_ticket? ? 'Yes' : 'No'
%td