Merge pull request #3691 from eileenmcnaughton/master
[civicrm-core.git] / xml / templates / message_templates / membership_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
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>
24
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>
94 {if $amount}
95 {if ! $is_separate_payment }
96 <tr>
97 <td {$labelStyle}>
98 {ts}Contribution Amount{/ts}
99 </td>
100 <td {$valueStyle}>
101 {$amount|crmMoney}
102 </td>
103 </tr>
104 {else}
105 <tr>
106 <td {$labelStyle}>
107 {ts}Additional Contribution{/ts}
108 </td>
109 <td {$valueStyle}>
110 {$amount|crmMoney}
111 </td>
112 </tr>
113 {/if}
114 {/if}
115 <tr>
116 <td {$labelStyle}>
117 {ts}Total{/ts}
118 </td>
119 <td {$valueStyle}>
120 {$amount+$membership_amount|crmMoney}
121 </td>
122 </tr>
123
124 {elseif !$useForMember && $lineItem and $priceSetID and !$is_quick_config}
125
126 {foreach from=$lineItem item=value key=priceset}
127 <tr>
128 <td colspan="2" {$valueStyle}>
129 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
130 <tr>
131 <th>{ts}Item{/ts}</th>
132 <th>{ts}Qty{/ts}</th>
133 <th>{ts}Each{/ts}</th>
134 <th>{ts}Total{/ts}</th>
135 </tr>
136 {foreach from=$value item=line}
137 <tr>
138 <td>
139 {$line.description|truncate:30:"..."}
140 </td>
141 <td>
142 {$line.qty}
143 </td>
144 <td>
145 {$line.unit_price|crmMoney}
146 </td>
147 <td>
148 {$line.line_total|crmMoney}
149 </td>
150 </tr>
151 {/foreach}
152 </table>
153 </td>
154 </tr>
155 {/foreach}
156 <tr>
157 <td {$labelStyle}>
158 {ts}Total Amount{/ts}
159 </td>
160 <td {$valueStyle}>
161 {$amount|crmMoney}
162 </td>
163 </tr>
164
165 {else}
166 {if $useForMember && $lineItem and !$is_quick_config}
167 {foreach from=$lineItem item=value key=priceset}
168 <tr>
169 <td colspan="2" {$valueStyle}>
170 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
171 <tr>
172 <th>{ts}Item{/ts}</th>
173 <th>{ts}Fee{/ts}</th>
174 <th>{ts}Membership Start Date{/ts}</th>
175 <th>{ts}Membership End Date{/ts}</th>
176 </tr>
177 {foreach from=$value item=line}
178 <tr>
179 <td>
180 {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}
181 </td>
182 <td>
183 {$line.line_total|crmMoney}
184 </td>
185 <td>
186 {$line.start_date}
187 </td>
188 <td>
189 {$line.end_date}
190 </td>
191 </tr>
192 {/foreach}
193 </table>
194 </td>
195 </tr>
196 {/foreach}
197 {/if}
198 <tr>
199 <td {$labelStyle}>
200 {ts}Amount{/ts}
201 </td>
202 <td {$valueStyle}>
203 {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
204 </td>
205 </tr>
206
207 {/if}
208
209
210 {elseif $membership_amount}
211
212
213 <tr>
214 <th {$headerStyle}>
215 {ts}Membership Fee{/ts}
216 </th>
217 </tr>
218 <tr>
219 <td {$labelStyle}>
220 {ts 1=$membership_name}%1 Membership{/ts}
221 </td>
222 <td {$valueStyle}>
223 {$membership_amount|crmMoney}
224 </td>
225 </tr>
226
227
228 {/if}
229
230 {if $receive_date}
231 <tr>
232 <td {$labelStyle}>
233 {ts}Date{/ts}
234 </td>
235 <td {$valueStyle}>
236 {$receive_date|crmDate}
237 </td>
238 </tr>
239 {/if}
240
241 {if $is_monetary and $trxn_id}
242 <tr>
243 <td {$labelStyle}>
244 {ts}Transaction #{/ts}
245 </td>
246 <td {$valueStyle}>
247 {$trxn_id}
248 </td>
249 </tr>
250 {/if}
251
252 {if $membership_trx_id}
253 <tr>
254 <td {$labelStyle}>
255 {ts}Membership Transaction #{/ts}
256 </td>
257 <td {$valueStyle}>
258 {$membership_trx_id}
259 </td>
260 </tr>
261 {/if}
262 {if $is_recur}
263 {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
264 <tr>
265 <td colspan="2" {$labelStyle}>
266 {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can cancel the auto-renewal option by <a href="%1">visiting this web page</a>.{/ts}
267 </td>
268 </tr>
269 <tr>
270 <td colspan="2" {$labelStyle}>
271 {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by <a href="%1">visiting this web page</a>.{/ts}
272 </td>
273 </tr>
274 {/if}
275 {/if}
276
277 {if $honor_block_is_active}
278 <tr>
279 <th {$headerStyle}>
280 {$soft_credit_type}
281 </th>
282 </tr>
283 {foreach from=$honoreeProfile item=value key=label}
284 <tr>
285 <td {$labelStyle}>
286 {$label}
287 </td>
288 <td {$valueStyle}>
289 {$value}
290 </td>
291 </tr>
292 {/foreach}
293 {/if}
294
295 {if $pcpBlock}
296 <tr>
297 <th {$headerStyle}>
298 {ts}Personal Campaign Page{/ts}
299 </th>
300 </tr>
301 <tr>
302 <td {$labelStyle}>
303 {ts}Display In Honor Roll{/ts}
304 </td>
305 <td {$valueStyle}>
306 {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
307 </td>
308 </tr>
309 {if $pcp_roll_nickname}
310 <tr>
311 <td {$labelStyle}>
312 {ts}Nickname{/ts}
313 </td>
314 <td {$valueStyle}>
315 {$pcp_roll_nickname}
316 </td>
317 </tr>
318 {/if}
319 {if $pcp_personal_note}
320 <tr>
321 <td {$labelStyle}>
322 {ts}Personal Note{/ts}
323 </td>
324 <td {$valueStyle}>
325 {$pcp_personal_note}
326 </td>
327 </tr>
328 {/if}
329 {/if}
330
331 {if $onBehalfProfile}
332 <tr>
333 <th {$headerStyle}>
334 {$onBehalfProfile_grouptitle}
335 </th>
336 </tr>
337 {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
338 <tr>
339 <td {$labelStyle}>
340 {$onBehalfName}
341 </td>
342 <td {$valueStyle}>
343 {$onBehalfValue}
344 </td>
345 </tr>
346 {/foreach}
347 {/if}
348
349 {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
350 {if $is_pay_later}
351 <tr>
352 <th {$headerStyle}>
353 {ts}Registered Email{/ts}
354 </th>
355 </tr>
356 <tr>
357 <td colspan="2" {$valueStyle}>
358 {$email}
359 </td>
360 </tr>
361 {elseif $amount GT 0 OR $membership_amount GT 0}
362 <tr>
363 <th {$headerStyle}>
364 {ts}Billing Name and Address{/ts}
365 </th>
366 </tr>
367 <tr>
368 <td colspan="2" {$valueStyle}>
369 {$billingName}<br />
370 {$address|nl2br}<br />
371 {$email}
372 </td>
373 </tr>
374 {/if}
375 {/if}
376
377 {if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)}
378 <tr>
379 <th {$headerStyle}>
380 {ts}Credit Card Information{/ts}
381 </th>
382 </tr>
383 <tr>
384 <td colspan="2" {$valueStyle}>
385 {$credit_card_type}<br />
386 {$credit_card_number}<br />
387 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
388 </td>
389 </tr>
390 {/if}
391
392 {if $selectPremium}
393 <tr>
394 <th {$headerStyle}>
395 {ts}Premium Information{/ts}
396 </th>
397 </tr>
398 <tr>
399 <td colspan="2" {$labelStyle}>
400 {$product_name}
401 </td>
402 </tr>
403 {if $option}
404 <tr>
405 <td {$labelStyle}>
406 {ts}Option{/ts}
407 </td>
408 <td {$valueStyle}>
409 {$option}
410 </td>
411 </tr>
412 {/if}
413 {if $sku}
414 <tr>
415 <td {$labelStyle}>
416 {ts}SKU{/ts}
417 </td>
418 <td {$valueStyle}>
419 {$sku}
420 </td>
421 </tr>
422 {/if}
423 {if $start_date}
424 <tr>
425 <td {$labelStyle}>
426 {ts}Start Date{/ts}
427 </td>
428 <td {$valueStyle}>
429 {$start_date|crmDate}
430 </td>
431 </tr>
432 {/if}
433 {if $end_date}
434 <tr>
435 <td {$labelStyle}>
436 {ts}End Date{/ts}
437 </td>
438 <td {$valueStyle}>
439 {$end_date|crmDate}
440 </td>
441 </tr>
442 {/if}
443 {if $contact_email OR $contact_phone}
444 <tr>
445 <td colspan="2" {$valueStyle}>
446 <p>{ts}For information about this premium, contact:{/ts}</p>
447 {if $contact_email}
448 <p>{$contact_email}</p>
449 {/if}
450 {if $contact_phone}
451 <p>{$contact_phone}</p>
452 {/if}
453 </td>
454 </tr>
455 {/if}
456 {if $is_deductible AND $price}
457 <tr>
458 <td colspan="2" {$valueStyle}>
459 <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>
460 </td>
461 </tr>
462 {/if}
463 {/if}
464
465 {if $customPre}
466 <tr>
467 <th {$headerStyle}>
468 {$customPre_grouptitle}
469 </th>
470 </tr>
471 {foreach from=$customPre item=customValue key=customName}
472 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
473 <tr>
474 <td {$labelStyle}>
475 {$customName}
476 </td>
477 <td {$valueStyle}>
478 {$customValue}
479 </td>
480 </tr>
481 {/if}
482 {/foreach}
483 {/if}
484
485 {if $customPost}
486 <tr>
487 <th {$headerStyle}>
488 {$customPost_grouptitle}
489 </th>
490 </tr>
491 {foreach from=$customPost item=customValue key=customName}
492 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
493 <tr>
494 <td {$labelStyle}>
495 {$customName}
496 </td>
497 <td {$valueStyle}>
498 {$customValue}
499 </td>
500 </tr>
501 {/if}
502 {/foreach}
503 {/if}
504
505 </table>
506 </center>
507
508 </body>
509 </html>