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