Merge pull request #20059 from samuelsov/dev/core#2479
[civicrm-core.git] / xml / templates / message_templates / event_offline_receipt_html.tpl
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5 <title></title>
6 </head>
7 <body>
8
9 {capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
10 {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
11 {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
12
13 <center>
14 <table id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left; width:100%; max-width:700px; padding:0; margin:0; border:0px;">
15
16 <!-- BEGIN HEADER -->
17 <!-- You can add table row(s) here with logo or other header elements -->
18 <!-- END HEADER -->
19
20 <!-- BEGIN CONTENT -->
21
22 <tr>
23 <td>
24 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
25
26 {if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
27 <p>{$event.confirm_email_text|htmlize}</p>
28 {/if}
29
30 {if !empty($isOnWaitlist)}
31 <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
32 {if !empty($isPrimary)}
33 <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
34 {/if}
35 {elseif !empty($isRequireApproval)}
36 <p>{ts}Your registration has been submitted.{/ts}</p>
37 {if !empty($isPrimary)}
38 <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
39 {/if}
40 {elseif !empty($is_pay_later)}
41 <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
42 {/if}
43
44 </td>
45 </tr>
46 <tr>
47 <td>
48 <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
49 <tr>
50 <th {$headerStyle}>
51 {ts}Event Information and Location{/ts}
52 </th>
53 </tr>
54 <tr>
55 <td colspan="2" {$valueStyle}>
56 {$event.event_title}<br />
57 {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
58 </td>
59 </tr>
60
61 {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
62 <tr>
63 <td {$labelStyle}>
64 {ts}Participant Role{/ts}
65 </td>
66 <td {$valueStyle}>
67 {$event.participant_role}
68 </td>
69 </tr>
70 {/if}
71
72 {if !empty($isShowLocation)}
73 <tr>
74 <td colspan="2" {$valueStyle}>
75 {$location.address.1.display|nl2br}
76 </td>
77 </tr>
78 {/if}
79
80 {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
81 <tr>
82 <td colspan="2" {$labelStyle}>
83 {ts}Event Contacts:{/ts}
84 </td>
85 </tr>
86 {foreach from=$location.phone item=phone}
87 {if $phone.phone}
88 <tr>
89 <td {$labelStyle}>
90 {if $phone.phone_type}
91 {$phone.phone_type_display}
92 {else}
93 {ts}Phone{/ts}
94 {/if}
95 </td>
96 <td {$valueStyle}>
97 {$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
98 </td>
99 </tr>
100 {/if}
101 {/foreach}
102 {foreach from=$location.email item=eventEmail}
103 {if $eventEmail.email}
104 <tr>
105 <td {$labelStyle}>
106 {ts}Email{/ts}
107 </td>
108 <td {$valueStyle}>
109 {$eventEmail.email}
110 </td>
111 </tr>
112 {/if}
113 {/foreach}
114 {/if}
115
116 {if !empty($event.is_public)}
117 <tr>
118 <td colspan="2" {$valueStyle}>
119 {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
120 <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
121 </td>
122 </tr>
123 {/if}
124
125 {if $email}
126 <tr>
127 <th {$headerStyle}>
128 {ts}Registered Email{/ts}
129 </th>
130 </tr>
131 <tr>
132 <td colspan="2" {$valueStyle}>
133 {$email}
134 </td>
135 </tr>
136 {/if}
137
138
139 {if !empty($event.is_monetary)}
140
141 <tr>
142 <th {$headerStyle}>
143 {if !empty($event.fee_label)}{$event.fee_label}{/if}
144 </th>
145 </tr>
146
147 {if !empty($lineItem)}
148 {foreach from=$lineItem item=value key=priceset}
149 {if $value neq 'skip'}
150 {if !empty($isPrimary)}
151 {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
152 <tr>
153 <td colspan="2" {$labelStyle}>
154 {ts 1=$priceset+1}Participant %1{/ts}
155 </td>
156 </tr>
157 {/if}
158 {/if}
159 <tr>
160 <td colspan="2" {$valueStyle}>
161 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
162 <tr>
163 <th>{ts}Item{/ts}</th>
164 <th>{ts}Qty{/ts}</th>
165 <th>{ts}Each{/ts}</th>
166 {if !empty($dataArray)}
167 <th>{ts}SubTotal{/ts}</th>
168 <th>{ts}Tax Rate{/ts}</th>
169 <th>{ts}Tax Amount{/ts}</th>
170 {/if}
171 <th>{ts}Total{/ts}</th>
172 {if !empty($pricesetFieldsCount) }<th>{ts}Total Participants{/ts}</th>{/if}
173 </tr>
174 {foreach from=$value item=line}
175 <tr>
176 <td>
177 {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
178 </td>
179 <td>
180 {$line.qty}
181 </td>
182 <td>
183 {$line.unit_price|crmMoney}
184 </td>
185 {if !empty($dataArray)}
186 <td>
187 {$line.unit_price*$line.qty|crmMoney}
188 </td>
189 {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
190 <td>
191 {$line.tax_rate|string_format:"%.2f"}%
192 </td>
193 <td>
194 {$line.tax_amount|crmMoney}
195 </td>
196 {else}
197 <td></td>
198 <td></td>
199 {/if}
200 {/if}
201 <td>
202 {$line.line_total+$line.tax_amount|crmMoney}
203 </td>
204 {if !empty($pricesetFieldsCount) }
205 <td>
206 {$line.participant_count}
207 </td>
208 {/if}
209 </tr>
210 {/foreach}
211 </table>
212 </td>
213 </tr>
214 {/if}
215 {/foreach}
216 {if !empty($dataArray)}
217 {if isset($totalAmount) and isset($totalTaxAmount)}
218 <tr>
219 <td {$labelStyle}>
220 {ts}Amount Before Tax:{/ts}
221 </td>
222 <td {$valueStyle}>
223 {$totalAmount-$totalTaxAmount|crmMoney}
224 </td>
225 </tr>
226 {/if}
227 {foreach from=$dataArray item=value key=priceset}
228 <tr>
229 {if $priceset || $priceset == 0}
230 <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
231 <td>&nbsp;{$value|crmMoney:$currency}</td>
232 {else}
233 <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
234 <td>&nbsp;{$value|crmMoney:$currency}</td>
235 {/if}
236 </tr>
237 {/foreach}
238 {/if}
239 {/if}
240
241 {if !empty($amount) && !$lineItem}
242 {foreach from=$amount item=amnt key=level}
243 <tr>
244 <td colspan="2" {$valueStyle}>
245 {$amnt.amount|crmMoney} {$amnt.label}
246 </td>
247 </tr>
248 {/foreach}
249 {/if}
250 {if isset($totalTaxAmount)}
251 <tr>
252 <td {$labelStyle}>
253 {ts}Total Tax Amount{/ts}
254 </td>
255 <td {$valueStyle}>
256 {$totalTaxAmount|crmMoney:$currency}
257 </td>
258 </tr>
259 {/if}
260 {if !empty($isPrimary)}
261 <tr>
262 <td {$labelStyle}>
263 {if isset($balanceAmount)}
264 {ts}Total Paid{/ts}
265 {else}
266 {ts}Total Amount{/ts}
267 {/if}
268 </td>
269 <td {$valueStyle}>
270 {if !empty($totalAmount)}{$totalAmount|crmMoney}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
271 </td>
272 </tr>
273 {if isset($balanceAmount)}
274 <tr>
275 <td {$labelStyle}>
276 {ts}Balance{/ts}
277 </td>
278 <td {$valueStyle}>
279 {$balanceAmount|crmMoney}
280 </td>
281 </tr>
282 {/if}
283 {if !empty($pricesetFieldsCount) }
284 <tr>
285 <td {$labelStyle}>
286 {ts}Total Participants{/ts}</td>
287 <td {$valueStyle}>
288 {assign var="count" value= 0}
289 {foreach from=$lineItem item=pcount}
290 {assign var="lineItemCount" value=0}
291 {if $pcount neq 'skip'}
292 {foreach from=$pcount item=p_count}
293 {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
294 {/foreach}
295 {if $lineItemCount < 1 }
296 assign var="lineItemCount" value=1}
297 {/if}
298 {assign var="count" value=$count+$lineItemCount}
299 {/if}
300 {/foreach}
301 {$count}
302 </td>
303 </tr>
304 {/if}
305 {if !empty($is_pay_later)}
306 <tr>
307 <td colspan="2" {$labelStyle}>
308 {if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
309 </td>
310 </tr>
311 {/if}
312
313 {if $register_date}
314 <tr>
315 <td {$labelStyle}>
316 {ts}Registration Date{/ts}
317 </td>
318 <td {$valueStyle}>
319 {$register_date|crmDate}
320 </td>
321 </tr>
322 {/if}
323
324 {if !empty($receive_date)}
325 <tr>
326 <td {$labelStyle}>
327 {ts}Transaction Date{/ts}
328 </td>
329 <td {$valueStyle}>
330 {$receive_date|crmDate}
331 </td>
332 </tr>
333 {/if}
334
335 {if !empty($financialTypeName)}
336 <tr>
337 <td {$labelStyle}>
338 {ts}Financial Type{/ts}
339 </td>
340 <td {$valueStyle}>
341 {$financialTypeName}
342 </td>
343 </tr>
344 {/if}
345
346 {if !empty($trxn_id)}
347 <tr>
348 <td {$labelStyle}>
349 {ts}Transaction #{/ts}
350 </td>
351 <td {$valueStyle}>
352 {$trxn_id}
353 </td>
354 </tr>
355 {/if}
356
357 {if !empty($paidBy)}
358 <tr>
359 <td {$labelStyle}>
360 {ts}Paid By{/ts}
361 </td>
362 <td {$valueStyle}>
363 {$paidBy}
364 </td>
365 </tr>
366 {/if}
367
368 {if !empty($checkNumber)}
369 <tr>
370 <td {$labelStyle}>
371 {ts}Check Number{/ts}
372 </td>
373 <td {$valueStyle}>
374 {$checkNumber}
375 </td>
376 </tr>
377 {/if}
378
379 {if !empty($billingName)}
380 <tr>
381 <th {$headerStyle}>
382 {ts}Billing Name and Address{/ts}
383 </th>
384 </tr>
385 <tr>
386 <td colspan="2" {$valueStyle}>
387 {$billingName}<br />
388 {$address|nl2br}
389 </td>
390 </tr>
391 {/if}
392
393 {if !empty($credit_card_type)}
394 <tr>
395 <th {$headerStyle}>
396 {ts}Credit Card Information{/ts}
397 </th>
398 </tr>
399 <tr>
400 <td colspan="2" {$valueStyle}>
401 {$credit_card_type}<br />
402 {$credit_card_number}<br />
403 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
404 </td>
405 </tr>
406 {/if}
407
408 {/if}
409
410 {/if} {* End of conditional section for Paid events *}
411
412 {if !empty($customPre)}
413 <tr>
414 <th {$headerStyle}>
415 {$customPre_grouptitle}
416 </th>
417 </tr>
418 {foreach from=$customPre item=value key=customName}
419 {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
420 <tr>
421 <td {$labelStyle}>
422 {$customName}
423 </td>
424 <td {$valueStyle}>
425 {$value}
426 </td>
427 </tr>
428 {/if}
429 {/foreach}
430 {/if}
431
432 {if !empty($customPost)}
433 <tr>
434 <th {$headerStyle}>
435 {$customPost_grouptitle}
436 </th>
437 </tr>
438 {foreach from=$customPost item=value key=customName}
439 {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
440 <tr>
441 <td {$labelStyle}>
442 {$customName}
443 </td>
444 <td {$valueStyle}>
445 {$value}
446 </td>
447 </tr>
448 {/if}
449 {/foreach}
450 {/if}
451
452 {if !empty($customProfile)}
453 {foreach from=$customProfile item=value key=customName}
454 <tr>
455 <th {$headerStyle}>
456 {ts 1=$customName+1}Participant Information - Participant %1{/ts}
457 </th>
458 </tr>
459 {foreach from=$value item=val key=field}
460 {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
461 <tr>
462 <td colspan="2" {$labelStyle}>
463 {if $field eq 'additionalCustomPre'}
464 {$additionalCustomPre_grouptitle}
465 {else}
466 {$additionalCustomPost_grouptitle}
467 {/if}
468 </td>
469 </tr>
470 {foreach from=$val item=v key=f}
471 <tr>
472 <td {$labelStyle}>
473 {$f}
474 </td>
475 <td {$valueStyle}>
476 {$v}
477 </td>
478 </tr>
479 {/foreach}
480 {/if}
481 {/foreach}
482 {/foreach}
483 {/if}
484
485 {if !empty($customGroup)}
486 {foreach from=$customGroup item=value key=customName}
487 <tr>
488 <th {$headerStyle}>
489 {$customName}
490 </th>
491 </tr>
492 {foreach from=$value item=v key=n}
493 <tr>
494 <td {$labelStyle}>
495 {$n}
496 </td>
497 <td {$valueStyle}>
498 {$v}
499 </td>
500 </tr>
501 {/foreach}
502 {/foreach}
503 {/if}
504
505 </table>
506 </td>
507 </tr>
508
509 </table>
510 </center>
511
512 </body>
513 </html>