|
42 | 42 | <table class="ui very basic tablet stackable table order-summary center aligned">
|
43 | 43 | <thead>
|
44 | 44 | <tr>
|
45 |
| - <th class="four wide">{{t 'Ticket Type'}}</th> |
46 |
| - <th class="four wide">{{t 'Price'}}</th> |
47 |
| - <th class="ui aligned two wide">{{t 'Discount'}}</th> |
48 |
| - <th class="one wide">{{t 'Quantity'}}</th> |
49 |
| - <th class="ui aligned two wide">{{t 'Subtotal'}}</th> |
50 |
| - {{#if event.tax}} |
51 |
| - <th class="four wide">{{t 'Tax'}}</th> |
| 45 | + {{#if (eq data.amount 0)}} |
| 46 | + <th class="ui aligned two wide">{{t 'Ticket Type'}}</th> |
| 47 | + {{#if data.discountCode}} |
| 48 | + <th class="two wide">{{t 'Price'}}</th> |
| 49 | + <th class=" two wide">{{t 'Discount'}}</th> |
| 50 | + <th class="ui aligned two wide">{{t 'Subtotal'}}</th> |
| 51 | + {{/if}} |
| 52 | + <th class="two wide">{{t 'Quantity'}}</th> |
| 53 | + {{else}} |
| 54 | + <th class="four wide">{{t 'Ticket Type'}}</th> |
| 55 | + <th class="four wide">{{t 'Price'}}</th> |
| 56 | + {{#if data.discountCode}} |
| 57 | + <th class="ui aligned two wide">{{t 'Discount'}}</th> |
| 58 | + {{/if}} |
| 59 | + <th class="four wide">{{t 'Quantity'}}</th> |
| 60 | + {{#if event.tax}} |
| 61 | + <th class="one wide">{{t 'Tax'}}</th> |
| 62 | + {{/if}} |
| 63 | + <th class="ui aligned four wide">{{t 'Subtotal'}}</th> |
| 64 | + |
52 | 65 | {{/if}}
|
53 | 66 | </tr>
|
54 | 67 | </thead>
|
55 | 68 | <tbody>
|
56 | 69 | {{#each tickets as |ticket|}}
|
57 | 70 | <tr>
|
58 |
| - <td> |
59 |
| - <div class="ui small"> |
60 |
| - {{ticket.name}} |
61 |
| - </div> |
62 |
| - </td> |
63 |
| - <td>{{currency-symbol eventCurrency}} {{format-number ticket.price}}</td> |
64 |
| - <td>{{currency-symbol eventCurrency}} {{format-number ticket.discount}}</td> |
65 |
| - <td>{{ticket-attendees data.attendees ticket.attendees}}</td> |
66 |
| - <td> |
67 |
| - {{currency-symbol eventCurrency}} {{format-number (mult (sub ticket.price ticket.discount) (ticket-attendees data.attendees ticket.attendees))}} |
68 |
| - </td> |
69 |
| - {{#if event.tax}} |
| 71 | + {{#if (eq data.amount 0)}} |
| 72 | + <td> |
| 73 | + <div class="ui small"> |
| 74 | + {{ticket.name}} |
| 75 | + </div> |
| 76 | + </td> |
| 77 | + {{#if data.discountCode}} |
| 78 | + <td>{{currency-symbol eventCurrency}} {{format-number ticket.price}}</td> |
| 79 | + <td>{{currency-symbol eventCurrency}} {{format-number ticket.discount}}</td> |
| 80 | + <td> |
| 81 | + {{currency-symbol eventCurrency}} {{format-number (mult (sub ticket.price ticket.discount) (ticket-attendees data.attendees ticket.attendees))}} |
| 82 | + </td> |
| 83 | + {{/if}} |
| 84 | + <td>{{ticket-attendees data.attendees ticket.attendees}}</td> |
| 85 | + {{else}} |
| 86 | + <td> |
| 87 | + <div class="ui small"> |
| 88 | + {{ticket.name}} |
| 89 | + </div> |
| 90 | + </td> |
| 91 | + <td>{{currency-symbol eventCurrency}} {{format-number ticket.price}}</td> |
| 92 | + {{#if data.discountCode}} |
| 93 | + <td>{{currency-symbol eventCurrency}} {{format-number ticket.discount}}</td> |
| 94 | + {{/if}} |
| 95 | + <td>{{ticket-attendees data.attendees ticket.attendees}}</td> |
| 96 | + {{#if event.tax}} |
| 97 | + <td> |
| 98 | + {{#if event.tax.isTaxIncludedInPrice}} |
| 99 | + {{t 'The price is inclusive of all taxes.'}} |
| 100 | + {{else}} |
| 101 | + {{#if ticket.price}} |
| 102 | + {{event.tax.rate}}% |
| 103 | + {{else}} |
| 104 | + {{t 'N/A'}} |
| 105 | + {{/if}} |
| 106 | + {{/if}} |
| 107 | + </td> |
| 108 | + {{/if}} |
70 | 109 | <td>
|
71 |
| - {{#if event.tax.isTaxIncludedInPrice}} |
72 |
| - {{t 'The price is inclusive of all taxes.'}} |
73 |
| - {{else}} |
74 |
| - {{event.tax.rate}}% |
75 |
| - {{/if}} |
| 110 | + {{currency-symbol eventCurrency}} {{format-number (mult (sub ticket.price ticket.discount) (ticket-attendees data.attendees ticket.attendees))}} |
76 | 111 | </td>
|
77 | 112 | {{/if}}
|
| 113 | + |
| 114 | + |
78 | 115 | </tr>
|
79 | 116 | {{/each}}
|
80 | 117 | </tbody>
|
81 |
| - <tfoot class="full-width"> |
82 |
| - <tr> |
83 |
| - <th></th> |
84 |
| - <th></th> |
85 |
| - <th></th> |
86 |
| - <th> |
87 |
| - <div class="ui aligned small primary icon"> |
88 |
| - {{t 'Grand Total'}}: |
89 |
| - </div> |
90 |
| - </th> |
91 |
| - <th colspan="4"> |
92 |
| - <div class="ui aligned small primary icon"> |
| 118 | + {{#if (gt data.amount 0)}} |
| 119 | + <tfoot class="full-width"> |
| 120 | + <tr> |
| 121 | + <th></th> |
| 122 | + {{#if data.discountCode}} |
| 123 | + <th colspan="2"></th> |
| 124 | + {{else}} |
| 125 | + <th></th> |
| 126 | + {{/if}} |
| 127 | + {{#if event.tax}} |
| 128 | + <th></th> |
| 129 | + {{#if data.discountCode}} |
| 130 | + <th></th> |
| 131 | + {{/if}} |
| 132 | + {{/if}} |
| 133 | + <th> |
| 134 | + <div class="ui aligned small primary icon"> |
| 135 | + {{t 'Grand Total'}}: |
| 136 | + </div> |
| 137 | + </th> |
| 138 | + <th colspan="4"> |
93 | 139 | {{currency-symbol eventCurrency}} {{format-number data.amount}}
|
94 |
| - </div> |
95 |
| - </th> |
96 |
| - </tr> |
97 |
| - </tfoot> |
| 140 | + </th> |
| 141 | + </tr> |
| 142 | + </tfoot> |
| 143 | + {{/if}} |
98 | 144 | </table>
|
99 | 145 | {{/if}}
|
100 | 146 | </div>
|
|
0 commit comments