Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Paid Donation ticket sale stats #5782

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion app/templates/components/currency-amount.hbs
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
{{#if (gt @amount 0)}}{{currency-symbol @currency}}{{/if}} {{format-money @amount}}
{{#if (eq @ticket.type 'donation')}}
{{#if (eq @state 'completed')}}
{{#if (gt @ticket.orderStatistics.sales.completed 0)}}{{currency-symbol @currency}}{{/if}} {{format-money @ticket.orderStatistics.sales.completed}}
{{else if (eq @state 'placed')}}
{{#if (gt @ticket.orderStatistics.sales.placed 0)}}{{currency-symbol @currency}}{{/if}} {{format-money @ticket.orderStatistics.sales.placed}}
{{else if (eq @state 'pending')}}
{{#if (gt @ticket.orderStatistics.sales.pending 0)}}{{currency-symbol @currency}}{{/if}} {{format-money @ticket.orderStatistics.sales.pending}}
{{/if}}
{{else}}
{{#if (eq @state 'completed')}}
{{#if (gt (mult @ticket.orderStatistics.tickets.completed @ticket.price) 0)}}{{currency-symbol @currency}}{{/if}} {{format-money (mult @ticket.orderStatistics.tickets.completed @ticket.price) }}
{{else if (eq @state 'placed')}}
{{#if (gt (mult @ticket.orderStatistics.tickets.placed @ticket.price) 0)}}{{currency-symbol @currency}}{{/if}} {{format-money (mult @ticket.orderStatistics.tickets.placed @ticket.price) }}
{{else if (eq @state 'pending')}}
{{#if (gt (mult @ticket.orderStatistics.tickets.pending @ticket.price) 0)}}{{currency-symbol @currency}}{{/if}} {{format-money (mult @ticket.orderStatistics.tickets.pending @ticket.price) }}
{{/if}}
{{/if}}
9 changes: 6 additions & 3 deletions app/templates/events/view/tickets/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,18 @@
{{#unless this.device.isMobile}}
<td class="right aligned">{{ticket.orderStatistics.tickets.completed}}</td>
{{/unless}}
<td class="right aligned"><CurrencyAmount @currency={{this.model.eventDetail.paymentCurrency}} @amount={{mult ticket.orderStatistics.tickets.completed ticket.price}}/></td>
<td class="right aligned"><CurrencyAmount @currency={{this.model.eventDetail.paymentCurrency}} @ticket={{ticket}} @state='completed' />
</td>
{{#unless this.device.isMobile}}
<td class="right aligned">{{ticket.orderStatistics.tickets.placed}}</td>
{{/unless}}
<td class="right aligned"><CurrencyAmount @currency={{this.model.eventDetail.paymentCurrency}} @amount={{mult ticket.orderStatistics.tickets.placed ticket.price}}/></td>
<td class="right aligned"><CurrencyAmount @currency={{this.model.eventDetail.paymentCurrency}} @ticket={{ticket}} @state='placed' />
</td>
{{#unless this.device.isMobile}}
<td class="right aligned">{{ticket.orderStatistics.tickets.pending}}</td>
{{/unless}}
<td class="right aligned"><CurrencyAmount @currency={{this.model.eventDetail.paymentCurrency}} @amount={{mult ticket.orderStatistics.tickets.pending ticket.price}}/></td>
<td class="right aligned"><CurrencyAmount @currency={{this.model.eventDetail.paymentCurrency}} @ticket={{ticket}} @state='pending' />
</td>
</tr>
{{/each}}
</tbody>
Expand Down