Payment dashboard wasn't properly displaying. This fix corrects that.
This commit is contained in:
parent
e3b88b39eb
commit
4e7df82f71
1 changed files with 2 additions and 2 deletions
|
@ -47,9 +47,9 @@ end
|
||||||
|
|
||||||
|
|
||||||
node(:ticket) do |payment|
|
node(:ticket) do |payment|
|
||||||
event = GetData.obj(payment.tickets.last, :event)
|
event = payment&.tickets&.last&.event
|
||||||
h = {
|
h = {
|
||||||
event: {name: GetData.obj(event, :name), url: GetData.obj(event, :url), id: GetData.obj(event, :id)},
|
event: {name: event&.name, url: event&.url, id: event&.id},
|
||||||
levels: payment.tickets.map{|t| "#{GetData.chain(t.ticket_level, :name)} (#{t.quantity}x)"}.join(", "),
|
levels: payment.tickets.map{|t| "#{GetData.chain(t.ticket_level, :name)} (#{t.quantity}x)"}.join(", "),
|
||||||
discount: payment.tickets.map{|t| t.event_discount ? "#{t.event_discount.name} (#{t.event_discount.percent}%)" : nil}.compact.join(", ")
|
discount: payment.tickets.map{|t| t.event_discount ? "#{t.event_discount.name} (#{t.event_discount.percent}%)" : nil}.compact.join(", ")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue