Merge pull request #20944 from eileenmcnaughton/tiles
[civicrm-core.git] / xml / templates / message_templates / event_offline_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}
12
13<center>
cb342529 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;">
6a488035
TO
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>
cb342529 24 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
6a488035 25
ff708ff0 26 {if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
6a488035
TO
27 <p>{$event.confirm_email_text|htmlize}</p>
28 {/if}
29
ff708ff0 30 {if !empty($isOnWaitlist)}
6a488035 31 <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
ff708ff0 32 {if !empty($isPrimary)}
0865a4ed 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>
6a488035 34 {/if}
ff708ff0 35 {elseif !empty($isRequireApproval)}
6a488035 36 <p>{ts}Your registration has been submitted.{/ts}</p>
ff708ff0 37 {if !empty($isPrimary)}
0865a4ed 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>
6a488035 39 {/if}
ff708ff0
SL
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 *}
6a488035
TO
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
ff708ff0 61 {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
6a488035
TO
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
ff708ff0 72 {if !empty($isShowLocation)}
6a488035
TO
73 <tr>
74 <td colspan="2" {$valueStyle}>
d74c297f 75 {$location.address.1.display|nl2br}
6a488035
TO
76 </td>
77 </tr>
78 {/if}
79
ff708ff0 80 {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
6a488035
TO
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}>
5d9ebb64 97 {$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
6a488035
TO
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}
7f7fa13a 115
ff708ff0 116 {if !empty($event.is_public)}
278f760d
J
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>
4de4dbe9 123 {/if}
7f7fa13a 124
6a488035
TO
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
ff708ff0 139 {if !empty($event.is_monetary)}
6a488035
TO
140
141 <tr>
142 <th {$headerStyle}>
ff708ff0 143 {if !empty($event.fee_label)}{$event.fee_label}{/if}
6a488035
TO
144 </th>
145 </tr>
146
ff708ff0 147 {if !empty($lineItem)}
6a488035
TO
148 {foreach from=$lineItem item=value key=priceset}
149 {if $value neq 'skip'}
a221e1e0 150 {if !empty($isPrimary)}
6a488035
TO
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>
ff708ff0 166 {if !empty($dataArray)}
79d001a2
PB
167 <th>{ts}SubTotal{/ts}</th>
168 <th>{ts}Tax Rate{/ts}</th>
169 <th>{ts}Tax Amount{/ts}</th>
170 {/if}
6a488035 171 <th>{ts}Total{/ts}</th>
ff708ff0 172 {if !empty($pricesetFieldsCount) }<th>{ts}Total Participants{/ts}</th>{/if}
6a488035
TO
173 </tr>
174 {foreach from=$value item=line}
175 <tr>
176 <td>
011aeb62 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}
6a488035
TO
178 </td>
179 <td>
180 {$line.qty}
181 </td>
182 <td>
183 {$line.unit_price|crmMoney}
184 </td>
ff708ff0 185 {if !empty($dataArray)}
79d001a2
PB
186 <td>
187 {$line.unit_price*$line.qty|crmMoney}
188 </td>
b0800b2c 189 {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
7cf82823
PB
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}
79d001a2 200 {/if}
6a488035 201 <td>
7cf82823 202 {$line.line_total+$line.tax_amount|crmMoney}
6a488035 203 </td>
ff708ff0 204 {if !empty($pricesetFieldsCount) }
011aeb62 205 <td>
206 {$line.participant_count}
6a488035 207 </td>
011aeb62 208 {/if}
6a488035
TO
209 </tr>
210 {/foreach}
211 </table>
212 </td>
213 </tr>
214 {/if}
215 {/foreach}
ff708ff0 216 {if !empty($dataArray)}
141c8460 217 {if isset($totalAmount) and isset($totalTaxAmount)}
79d001a2
PB
218 <tr>
219 <td {$labelStyle}>
d5be719d 220 {ts}Amount Before Tax:{/ts}
79d001a2
PB
221 </td>
222 <td {$valueStyle}>
223 {$totalAmount-$totalTaxAmount|crmMoney}
224 </td>
225 </tr>
141c8460 226 {/if}
79d001a2
PB
227 {foreach from=$dataArray item=value key=priceset}
228 <tr>
7cf82823 229 {if $priceset || $priceset == 0}
b0800b2c 230 <td>&nbsp;{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:"%.2f"}%</td>
7cf82823
PB
231 <td>&nbsp;{$value|crmMoney:$currency}</td>
232 {else}
b0800b2c 233 <td>&nbsp;{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}</td>
7cf82823 234 <td>&nbsp;{$value|crmMoney:$currency}</td>
79d001a2
PB
235 {/if}
236 </tr>
237 {/foreach}
238 {/if}
6a488035
TO
239 {/if}
240
ff708ff0 241 {if !empty($amount) && !$lineItem}
6a488035
TO
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}
ff708ff0 250 {if isset($totalTaxAmount)}
79d001a2
PB
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}
a221e1e0 260 {if !empty($isPrimary)}
6a488035
TO
261 <tr>
262 <td {$labelStyle}>
a221e1e0 263 {if isset($balanceAmount)}
81f3d017
PJ
264 {ts}Total Paid{/ts}
265 {else}
266 {ts}Total Amount{/ts}
267 {/if}
6a488035
TO
268 </td>
269 <td {$valueStyle}>
ff708ff0 270 {if !empty($totalAmount)}{$totalAmount|crmMoney}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
6a488035
TO
271 </td>
272 </tr>
ff708ff0 273 {if isset($balanceAmount)}
81f3d017
PJ
274 <tr>
275 <td {$labelStyle}>
276 {ts}Balance{/ts}
277 </td>
278 <td {$valueStyle}>
279 {$balanceAmount|crmMoney}
280 </td>
281 </tr>
282 {/if}
ff708ff0 283 {if !empty($pricesetFieldsCount) }
6a488035 284 <tr>
011aeb62 285 <td {$labelStyle}>
286 {ts}Total Participants{/ts}</td>
6a488035 287 <td {$valueStyle}>
011aeb62 288 {assign var="count" value= 0}
6a488035
TO
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}
011aeb62 297 {/if}
6a488035
TO
298 {assign var="count" value=$count+$lineItemCount}
299 {/if}
300 {/foreach}
011aeb62 301 {$count}
6a488035
TO
302 </td>
303 </tr>
304 {/if}
ff708ff0 305 {if !empty($is_pay_later)}
6a488035
TO
306 <tr>
307 <td colspan="2" {$labelStyle}>
ff708ff0 308 {if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
6a488035
TO
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
ff708ff0 324 {if !empty($receive_date)}
6a488035
TO
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
ff708ff0 335 {if !empty($financialTypeName)}
6a488035
TO
336 <tr>
337 <td {$labelStyle}>
338 {ts}Financial Type{/ts}
339 </td>
340 <td {$valueStyle}>
b956b310 341 {$financialTypeName}
6a488035
TO
342 </td>
343 </tr>
344 {/if}
345
ff708ff0 346 {if !empty($trxn_id)}
6a488035
TO
347 <tr>
348 <td {$labelStyle}>
349 {ts}Transaction #{/ts}
350 </td>
351 <td {$valueStyle}>
352 {$trxn_id}
353 </td>
354 </tr>
355 {/if}
356
ff708ff0 357 {if !empty($paidBy)}
6a488035
TO
358 <tr>
359 <td {$labelStyle}>
360 {ts}Paid By{/ts}
361 </td>
362 <td {$valueStyle}>
363 {$paidBy}
364 </td>
365 </tr>
366 {/if}
367
ff708ff0 368 {if !empty($checkNumber)}
6a488035
TO
369 <tr>
370 <td {$labelStyle}>
371 {ts}Check Number{/ts}
372 </td>
373 <td {$valueStyle}>
374 {$checkNumber}
375 </td>
376 </tr>
377 {/if}
378
ff708ff0 379 {if !empty($billingName)}
6a488035
TO
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
ff708ff0 393 {if !empty($credit_card_type)}
6a488035
TO
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
ff708ff0 412 {if !empty($customPre)}
6a488035
TO
413 <tr>
414 <th {$headerStyle}>
415 {$customPre_grouptitle}
416 </th>
417 </tr>
418 {foreach from=$customPre item=value key=customName}
ff708ff0 419 {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
6a488035
TO
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
ff708ff0 432 {if !empty($customPost)}
6a488035
TO
433 <tr>
434 <th {$headerStyle}>
435 {$customPost_grouptitle}
436 </th>
437 </tr>
438 {foreach from=$customPost item=value key=customName}
ff708ff0 439 {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
6a488035
TO
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
ff708ff0 452 {if !empty($customProfile)}
6a488035
TO
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
ff708ff0 485 {if !empty($customGroup)}
6a488035
TO
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>