Merge pull request #14425 from eileenmcnaughton/form_clean
[civicrm-core.git] / xml / templates / message_templates / membership_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}
12
13<center>
14 <table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
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>
e74e138c 24 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
6a488035
TO
25 {if $receipt_text}
26 <p>{$receipt_text|htmlize}</p>
27 {/if}
28
29 {if $is_pay_later}
30 <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
31 {else}
32 <p>{ts}Please print this confirmation for your records.{/ts}</p>
33 {/if}
34
35 </td>
36 </tr>
37 </table>
38 <table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
39
40 {if $membership_assign && !$useForMember}
41 <tr>
42 <th {$headerStyle}>
43 {ts}Membership Information{/ts}
44 </th>
45 </tr>
46 <tr>
47 <td {$labelStyle}>
48 {ts}Membership Type{/ts}
49 </td>
50 <td {$valueStyle}>
51 {$membership_name}
52 </td>
53 </tr>
54 {if $mem_start_date}
55 <tr>
56 <td {$labelStyle}>
57 {ts}Membership Start Date{/ts}
58 </td>
59 <td {$valueStyle}>
60 {$mem_start_date|crmDate}
61 </td>
62 </tr>
63 {/if}
64 {if $mem_end_date}
65 <tr>
66 <td {$labelStyle}>
67 {ts}Membership End Date{/ts}
68 </td>
69 <td {$valueStyle}>
70 {$mem_end_date|crmDate}
71 </td>
72 </tr>
73 {/if}
74 {/if}
75
76
77 {if $amount}
78 <tr>
79 <th {$headerStyle}>
80 {ts}Membership Fee{/ts}
81 </th>
82 </tr>
83
84 {if !$useForMember and $membership_amount and $is_quick_config}
85
86 <tr>
87 <td {$labelStyle}>
88 {ts 1=$membership_name}%1 Membership{/ts}
89 </td>
90 <td {$valueStyle}>
91 {$membership_amount|crmMoney}
92 </td>
93 </tr>
735eaff9 94 {if $amount && !$is_separate_payment }
6a488035
TO
95 <tr>
96 <td {$labelStyle}>
97 {ts}Contribution Amount{/ts}
98 </td>
99 <td {$valueStyle}>
100 {$amount|crmMoney}
101 </td>
102 </tr>
6a488035 103 <tr>
58d8c7e2 104 <td {$labelStyle}>
105 {ts}Total{/ts}
106 </td>
107 <td {$valueStyle}>
108 {$amount+$membership_amount|crmMoney}
109 </td>
6a488035 110 </tr>
735eaff9 111 {/if}
6a488035
TO
112
113 {elseif !$useForMember && $lineItem and $priceSetID and !$is_quick_config}
114
115 {foreach from=$lineItem item=value key=priceset}
116 <tr>
117 <td colspan="2" {$valueStyle}>
118 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
119 <tr>
120 <th>{ts}Item{/ts}</th>
121 <th>{ts}Qty{/ts}</th>
122 <th>{ts}Each{/ts}</th>
123 <th>{ts}Total{/ts}</th>
124 </tr>
125 {foreach from=$value item=line}
126 <tr>
127 <td>
128 {$line.description|truncate:30:"..."}
129 </td>
130 <td>
131 {$line.qty}
132 </td>
133 <td>
134 {$line.unit_price|crmMoney}
135 </td>
136 <td>
137 {$line.line_total|crmMoney}
138 </td>
139 </tr>
140 {/foreach}
141 </table>
142 </td>
143 </tr>
144 {/foreach}
145 <tr>
146 <td {$labelStyle}>
147 {ts}Total Amount{/ts}
148 </td>
149 <td {$valueStyle}>
150 {$amount|crmMoney}
151 </td>
152 </tr>
153
154 {else}
155 {if $useForMember && $lineItem and !$is_quick_config}
156 {foreach from=$lineItem item=value key=priceset}
157 <tr>
158 <td colspan="2" {$valueStyle}>
159 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
160 <tr>
161 <th>{ts}Item{/ts}</th>
162 <th>{ts}Fee{/ts}</th>
79d001a2
PB
163 {if $dataArray}
164 <th>{ts}SubTotal{/ts}</th>
165 <th>{ts}Tax Rate{/ts}</th>
166 <th>{ts}Tax Amount{/ts}</th>
167 <th>{ts}Total{/ts}</th>
168 {/if}
011aeb62 169 <th>{ts}Membership Start Date{/ts}</th>
170 <th>{ts}Membership End Date{/ts}</th>
6a488035
TO
171 </tr>
172 {foreach from=$value item=line}
173 <tr>
174 <td>
175 {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}
176 </td>
177 <td>
178 {$line.line_total|crmMoney}
179 </td>
79d001a2
PB
180 {if $dataArray}
181 <td>
182 {$line.unit_price*$line.qty|crmMoney}
183 </td>
7cf82823
PB
184 {if $line.tax_rate != "" || $line.tax_amount != ""}
185 <td>
186 {$line.tax_rate|string_format:"%.2f"}%
187 </td>
188 <td>
189 {$line.tax_amount|crmMoney}
190 </td>
191 {else}
192 <td></td>
193 <td></td>
194 {/if}
79d001a2 195 <td>
7cf82823 196 {$line.line_total+$line.tax_amount|crmMoney}
79d001a2
PB
197 </td>
198 {/if}
6a488035
TO
199 <td>
200 {$line.start_date}
201 </td>
011aeb62 202 <td>
6a488035
TO
203 {$line.end_date}
204 </td>
205 </tr>
206 {/foreach}
207 </table>
208 </td>
209 </tr>
210 {/foreach}
79d001a2
PB
211 {if $dataArray}
212 <tr>
213 <td {$labelStyle}>
d8f8b40f 214 {ts}Amount Before Tax:{/ts}
79d001a2
PB
215 </td>
216 <td {$valueStyle}>
217 {$amount-$totalTaxAmount|crmMoney}
218 </td>
219 </tr>
220 {foreach from=$dataArray item=value key=priceset}
221 <tr>
7cf82823 222 {if $priceset || $priceset == 0}
66cae705 223 <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
79d001a2 224 <td>&nbsp;{$value|crmMoney:$currency}</td>
7cf82823 225 {else}
03b412ae 226 <td>&nbsp;{ts}NO{/ts} {$taxTerm}</td>
79d001a2
PB
227 <td>&nbsp;{$value|crmMoney:$currency}</td>
228 {/if}
229 </tr>
230 {/foreach}
231 {/if}
232 {/if}
233 {if $totalTaxAmount}
234 <tr>
235 <td {$labelStyle}>
236 {ts}Total Tax Amount{/ts}
237 </td>
238 <td {$valueStyle}>
239 {$totalTaxAmount|crmMoney:$currency}
240 </td>
241 </tr>
6a488035
TO
242 {/if}
243 <tr>
244 <td {$labelStyle}>
245 {ts}Amount{/ts}
246 </td>
247 <td {$valueStyle}>
248 {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
249 </td>
250 </tr>
251
252 {/if}
253
254
255 {elseif $membership_amount}
256
257
258 <tr>
259 <th {$headerStyle}>
260 {ts}Membership Fee{/ts}
261 </th>
262 </tr>
263 <tr>
264 <td {$labelStyle}>
265 {ts 1=$membership_name}%1 Membership{/ts}
266 </td>
267 <td {$valueStyle}>
268 {$membership_amount|crmMoney}
269 </td>
270 </tr>
271
272
273 {/if}
274
275 {if $receive_date}
276 <tr>
277 <td {$labelStyle}>
278 {ts}Date{/ts}
279 </td>
280 <td {$valueStyle}>
281 {$receive_date|crmDate}
282 </td>
283 </tr>
284 {/if}
285
286 {if $is_monetary and $trxn_id}
287 <tr>
288 <td {$labelStyle}>
289 {ts}Transaction #{/ts}
290 </td>
291 <td {$valueStyle}>
292 {$trxn_id}
293 </td>
294 </tr>
295 {/if}
296
297 {if $membership_trx_id}
298 <tr>
299 <td {$labelStyle}>
300 {ts}Membership Transaction #{/ts}
301 </td>
302 <td {$valueStyle}>
303 {$membership_trx_id}
304 </td>
305 </tr>
306 {/if}
307 {if $is_recur}
6a488035
TO
308 <tr>
309 <td colspan="2" {$labelStyle}>
f926d56f
MWMC
310 {ts}This membership will be renewed automatically.{/ts}
311 {if $cancelSubscriptionUrl}
312 {ts 1=$cancelSubscriptionUrl}You can cancel the auto-renewal option by <a href="%1">visiting this web page</a>.{/ts}
313 {/if}
6a488035
TO
314 </td>
315 </tr>
4072b132
ACD
316 {if $updateSubscriptionBillingUrl}
317 <tr>
318 <td colspan="2" {$labelStyle}>
319 {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by <a href="%1">visiting this web page</a>.{/ts}
320 </td>
321 </tr>
322 {/if}
6a488035
TO
323 {/if}
324
325 {if $honor_block_is_active}
326 <tr>
327 <th {$headerStyle}>
1421174e 328 {$soft_credit_type}
6a488035
TO
329 </th>
330 </tr>
1421174e 331 {foreach from=$honoreeProfile item=value key=label}
332 <tr>
333 <td {$labelStyle}>
334 {$label}
335 </td>
336 <td {$valueStyle}>
337 {$value}
338 </td>
339 </tr>
340 {/foreach}
6a488035
TO
341 {/if}
342
343 {if $pcpBlock}
344 <tr>
345 <th {$headerStyle}>
346 {ts}Personal Campaign Page{/ts}
347 </th>
348 </tr>
349 <tr>
350 <td {$labelStyle}>
351 {ts}Display In Honor Roll{/ts}
352 </td>
353 <td {$valueStyle}>
354 {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
355 </td>
356 </tr>
357 {if $pcp_roll_nickname}
358 <tr>
359 <td {$labelStyle}>
360 {ts}Nickname{/ts}
361 </td>
362 <td {$valueStyle}>
363 {$pcp_roll_nickname}
364 </td>
365 </tr>
366 {/if}
367 {if $pcp_personal_note}
368 <tr>
369 <td {$labelStyle}>
370 {ts}Personal Note{/ts}
371 </td>
372 <td {$valueStyle}>
373 {$pcp_personal_note}
374 </td>
375 </tr>
376 {/if}
377 {/if}
378
379 {if $onBehalfProfile}
380 <tr>
381 <th {$headerStyle}>
382 {$onBehalfProfile_grouptitle}
383 </th>
384 </tr>
385 {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
386 <tr>
387 <td {$labelStyle}>
388 {$onBehalfName}
389 </td>
390 <td {$valueStyle}>
391 {$onBehalfValue}
392 </td>
393 </tr>
394 {/foreach}
395 {/if}
396
397 {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
398 {if $is_pay_later}
399 <tr>
400 <th {$headerStyle}>
401 {ts}Registered Email{/ts}
402 </th>
403 </tr>
404 <tr>
405 <td colspan="2" {$valueStyle}>
406 {$email}
407 </td>
408 </tr>
409 {elseif $amount GT 0 OR $membership_amount GT 0}
410 <tr>
411 <th {$headerStyle}>
412 {ts}Billing Name and Address{/ts}
413 </th>
414 </tr>
415 <tr>
416 <td colspan="2" {$valueStyle}>
417 {$billingName}<br />
418 {$address|nl2br}<br />
419 {$email}
420 </td>
421 </tr>
422 {/if}
423 {/if}
424
425 {if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)}
426 <tr>
427 <th {$headerStyle}>
428 {ts}Credit Card Information{/ts}
429 </th>
430 </tr>
431 <tr>
432 <td colspan="2" {$valueStyle}>
433 {$credit_card_type}<br />
434 {$credit_card_number}<br />
435 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
436 </td>
437 </tr>
438 {/if}
439
440 {if $selectPremium}
441 <tr>
442 <th {$headerStyle}>
443 {ts}Premium Information{/ts}
444 </th>
445 </tr>
446 <tr>
447 <td colspan="2" {$labelStyle}>
448 {$product_name}
449 </td>
450 </tr>
451 {if $option}
452 <tr>
453 <td {$labelStyle}>
454 {ts}Option{/ts}
455 </td>
456 <td {$valueStyle}>
457 {$option}
458 </td>
459 </tr>
460 {/if}
461 {if $sku}
462 <tr>
463 <td {$labelStyle}>
464 {ts}SKU{/ts}
465 </td>
466 <td {$valueStyle}>
467 {$sku}
468 </td>
469 </tr>
470 {/if}
471 {if $start_date}
472 <tr>
473 <td {$labelStyle}>
474 {ts}Start Date{/ts}
475 </td>
476 <td {$valueStyle}>
477 {$start_date|crmDate}
478 </td>
479 </tr>
480 {/if}
481 {if $end_date}
482 <tr>
483 <td {$labelStyle}>
484 {ts}End Date{/ts}
485 </td>
486 <td {$valueStyle}>
487 {$end_date|crmDate}
488 </td>
489 </tr>
490 {/if}
491 {if $contact_email OR $contact_phone}
492 <tr>
493 <td colspan="2" {$valueStyle}>
494 <p>{ts}For information about this premium, contact:{/ts}</p>
495 {if $contact_email}
496 <p>{$contact_email}</p>
497 {/if}
498 {if $contact_phone}
499 <p>{$contact_phone}</p>
500 {/if}
501 </td>
502 </tr>
503 {/if}
504 {if $is_deductible AND $price}
505 <tr>
506 <td colspan="2" {$valueStyle}>
507 <p>{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
508 </td>
509 </tr>
510 {/if}
511 {/if}
512
513 {if $customPre}
514 <tr>
515 <th {$headerStyle}>
516 {$customPre_grouptitle}
517 </th>
518 </tr>
519 {foreach from=$customPre item=customValue key=customName}
520 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
521 <tr>
522 <td {$labelStyle}>
523 {$customName}
524 </td>
525 <td {$valueStyle}>
526 {$customValue}
527 </td>
528 </tr>
529 {/if}
530 {/foreach}
531 {/if}
532
533 {if $customPost}
534 <tr>
535 <th {$headerStyle}>
536 {$customPost_grouptitle}
537 </th>
538 </tr>
539 {foreach from=$customPost item=customValue key=customName}
540 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
541 <tr>
542 <td {$labelStyle}>
543 {$customName}
544 </td>
545 <td {$valueStyle}>
546 {$customValue}
547 </td>
548 </tr>
549 {/if}
550 {/foreach}
551 {/if}
552
553 </table>
554</center>
555
556</body>
557</html>