Add amount paid

Amount paid colum is added to ticket purchase to keep the record of money paid by the user.
It is added to physical_ticket#index to show admin, price paid by each user for each ticket.
This commit is contained in:
rahul 2017-09-25 00:38:20 +05:30
parent 3f3cdef520
commit b761e83b45
5 changed files with 28 additions and 17 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!