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