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