Merge pull request #12998 from agileware/CIVICRM-990
[civicrm-core.git] / xml / templates / message_templates / contribution_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 $amount}
41
42
43 <tr>
44 <th {$headerStyle}>
45 {ts}Contribution Information{/ts}
46 </th>
47 </tr>
48
49 {if $lineItem and $priceSetID and !$is_quick_config}
50
51 {foreach from=$lineItem item=value key=priceset}
52 <tr>
53 <td colspan="2" {$valueStyle}>
54 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
55 <tr>
56 <th>{ts}Item{/ts}</th>
57 <th>{ts}Qty{/ts}</th>
58 <th>{ts}Each{/ts}</th>
79d001a2
PB
59 {if $dataArray}
60 <th>{ts}Subtotal{/ts}</th>
61 <th>{ts}Tax Rate{/ts}</th>
62 <th>{ts}Tax Amount{/ts}</th>
63 {/if}
6a488035
TO
64 <th>{ts}Total{/ts}</th>
65 </tr>
66 {foreach from=$value item=line}
67 <tr>
68 <td>
69 {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}
70 </td>
71 <td>
72 {$line.qty}
73 </td>
74 <td>
75 {$line.unit_price|crmMoney:$currency}
76 </td>
7cf82823 77 {if $getTaxDetails}
79d001a2
PB
78 <td>
79 {$line.unit_price*$line.qty|crmMoney:$currency}
80 </td>
7cf82823
PB
81 {if $line.tax_rate != "" || $line.tax_amount != ""}
82 <td>
83 {$line.tax_rate|string_format:"%.2f"}%
84 </td>
85 <td>
86 {$line.tax_amount|crmMoney:$currency}
87 </td>
88 {else}
89 <td></td>
90 <td></td>
91 {/if}
79d001a2 92 {/if}
6a488035 93 <td>
7cf82823 94 {$line.line_total+$line.tax_amount|crmMoney:$currency}
6a488035
TO
95 </td>
96 </tr>
97 {/foreach}
98 </table>
99 </td>
100 </tr>
101 {/foreach}
79d001a2
PB
102 {if $dataArray}
103 <tr>
104 <td {$labelStyle}>
105 {ts} Amount before Tax : {/ts}
106 </td>
107 <td {$valueStyle}>
108 {$amount-$totalTaxAmount|crmMoney:$currency}
109 </td>
110 </tr>
111
112 {foreach from=$dataArray item=value key=priceset}
113 <tr>
7cf82823 114 {if $priceset || $priceset == 0}
ebf2b57b 115 <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
79d001a2 116 <td>&nbsp;{$value|crmMoney:$currency}</td>
7cf82823 117 {else}
03b412ae 118 <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
79d001a2
PB
119 <td>&nbsp;{$value|crmMoney:$currency}</td>
120 {/if}
121 </tr>
122 {/foreach}
123
7cf82823
PB
124 {/if}
125 {if $totalTaxAmount}
79d001a2
PB
126 <tr>
127 <td {$labelStyle}>
128 {ts}Total Tax{/ts}
129 </td>
130 <td {$valueStyle}>
131 {$totalTaxAmount|crmMoney:$currency}
132 </td>
133 </tr>
134 {/if}
6a488035
TO
135 <tr>
136 <td {$labelStyle}>
137 {ts}Total Amount{/ts}
138 </td>
139 <td {$valueStyle}>
140 {$amount|crmMoney:$currency}
141 </td>
142 </tr>
143
144 {else}
145
79d001a2
PB
146 {if $totalTaxAmount}
147 <tr>
148 <td {$labelStyle}>
149 {ts}Total Tax Amount{/ts}
150 </td>
151 <td {$valueStyle}>
152 {$totalTaxAmount|crmMoney:$currency}
153 </td>
154 </tr>
155 {/if}
6a488035
TO
156 <tr>
157 <td {$labelStyle}>
158 {ts}Amount{/ts}
159 </td>
160 <td {$valueStyle}>
161 {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
162 </td>
163 </tr>
164
165 {/if}
166
167 {/if}
168
169
170 {if $receive_date}
171 <tr>
172 <td {$labelStyle}>
173 {ts}Date{/ts}
174 </td>
175 <td {$valueStyle}>
176 {$receive_date|crmDate}
177 </td>
178 </tr>
179 {/if}
180
181 {if $is_monetary and $trxn_id}
182 <tr>
183 <td {$labelStyle}>
184 {ts}Transaction #{/ts}
185 </td>
186 <td {$valueStyle}>
187 {$trxn_id}
188 </td>
189 </tr>
190 {/if}
191
f926d56f
MWMC
192 {if $is_recur}
193 <tr>
6a488035 194 <td colspan="2" {$labelStyle}>
f926d56f
MWMC
195 {ts}This is a recurring contribution.{/ts}
196 {if $cancelSubscriptionUrl}
197 {ts 1=$cancelSubscriptionUrl}You can cancel future contributions by <a href="%1">visiting this web page</a>.{/ts}
198 {/if}
6a488035 199 </td>
f926d56f
MWMC
200 </tr>
201 {if $updateSubscriptionBillingUrl}
202 <tr>
203 <td colspan="2" {$labelStyle}>
204 {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by <a href="%1">visiting this web page</a>.{/ts}
205 </td>
206 </tr>
6a488035 207 {/if}
f926d56f
MWMC
208 {if $updateSubscriptionUrl}
209 <tr>
210 <td colspan="2" {$labelStyle}>
211 {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments for this recurring contribution by <a href="%1">visiting this web page</a>.{/ts}
212 </td>
213 </tr>
214 {/if}
215 {/if}
6a488035
TO
216
217 {if $honor_block_is_active}
218 <tr>
219 <th {$headerStyle}>
1421174e 220 {$soft_credit_type}
6a488035
TO
221 </th>
222 </tr>
1421174e 223 {foreach from=$honoreeProfile item=value key=label}
224 <tr>
225 <td {$labelStyle}>
226 {$label}
227 </td>
228 <td {$valueStyle}>
229 {$value}
230 </td>
231 </tr>
232 {/foreach}
7305d3e6 233 {elseif $softCreditTypes and $softCredits}
234 {foreach from=$softCreditTypes item=softCreditType key=n}
235 <tr>
236 <th {$headerStyle}>
237 {$softCreditType}
238 </th>
239 </tr>
240 {foreach from=$softCredits.$n item=value key=label}
241 <tr>
242 <td {$labelStyle}>
243 {$label}
244 </td>
245 <td {$valueStyle}>
246 {$value}
247 </td>
248 </tr>
249 {/foreach}
250 {/foreach}
6a488035
TO
251 {/if}
252
253 {if $pcpBlock}
254 <tr>
255 <th {$headerStyle}>
256 {ts}Personal Campaign Page{/ts}
257 </th>
258 </tr>
259 <tr>
260 <td {$labelStyle}>
261 {ts}Display In Honor Roll{/ts}
262 </td>
263 <td {$valueStyle}>
264 {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
265 </td>
266 </tr>
267 {if $pcp_roll_nickname}
268 <tr>
269 <td {$labelStyle}>
270 {ts}Nickname{/ts}
271 </td>
272 <td {$valueStyle}>
273 {$pcp_roll_nickname}
274 </td>
275 </tr>
276 {/if}
277 {if $pcp_personal_note}
278 <tr>
279 <td {$labelStyle}>
280 {ts}Personal Note{/ts}
281 </td>
282 <td {$valueStyle}>
283 {$pcp_personal_note}
284 </td>
285 </tr>
286 {/if}
287 {/if}
288
289 {if $onBehalfProfile}
290 <tr>
291 <th {$headerStyle}>
292 {$onBehalfProfile_grouptitle}
293 </th>
294 </tr>
295 {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
296 <tr>
297 <td {$labelStyle}>
298 {$onBehalfName}
299 </td>
300 <td {$valueStyle}>
301 {$onBehalfValue}
302 </td>
303 </tr>
304 {/foreach}
305 {/if}
306
307 {if $isShare}
308 <tr>
309 <td colspan="2" {$valueStyle}>
310 {capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contributionPageId`" a=true fe=1 h=1}{/capture}
311 {include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$contributionUrl title=$title pageURL=$contributionUrl}
312 </td>
313 </tr>
314 {/if}
315
316 {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
e45f6ab0 317 {if $is_pay_later && !$isBillingAddressRequiredForPayLater}
6a488035
TO
318 <tr>
319 <th {$headerStyle}>
320 {ts}Registered Email{/ts}
321 </th>
322 </tr>
323 <tr>
324 <td colspan="2" {$valueStyle}>
325 {$email}
326 </td>
327 </tr>
328 {elseif $amount GT 0}
329 <tr>
330 <th {$headerStyle}>
331 {ts}Billing Name and Address{/ts}
332 </th>
333 </tr>
334 <tr>
335 <td colspan="2" {$valueStyle}>
336 {$billingName}<br />
337 {$address|nl2br}<br />
338 {$email}
339 </td>
340 </tr>
341 {/if}
342 {/if}
343
344 {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
345 <tr>
346 <th {$headerStyle}>
347 {ts}Credit Card Information{/ts}
348 </th>
349 </tr>
350 <tr>
351 <td colspan="2" {$valueStyle}>
352 {$credit_card_type}<br />
353 {$credit_card_number}<br />
354 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
355 </td>
356 </tr>
357 {/if}
358
359 {if $selectPremium}
360 <tr>
361 <th {$headerStyle}>
362 {ts}Premium Information{/ts}
363 </th>
364 </tr>
365 <tr>
366 <td colspan="2" {$labelStyle}>
367 {$product_name}
368 </td>
369 </tr>
370 {if $option}
371 <tr>
372 <td {$labelStyle}>
373 {ts}Option{/ts}
374 </td>
375 <td {$valueStyle}>
376 {$option}
377 </td>
378 </tr>
379 {/if}
380 {if $sku}
381 <tr>
382 <td {$labelStyle}>
383 {ts}SKU{/ts}
384 </td>
385 <td {$valueStyle}>
386 {$sku}
387 </td>
388 </tr>
389 {/if}
390 {if $start_date}
391 <tr>
392 <td {$labelStyle}>
393 {ts}Start Date{/ts}
394 </td>
395 <td {$valueStyle}>
396 {$start_date|crmDate}
397 </td>
398 </tr>
399 {/if}
400 {if $end_date}
401 <tr>
402 <td {$labelStyle}>
403 {ts}End Date{/ts}
404 </td>
405 <td {$valueStyle}>
406 {$end_date|crmDate}
407 </td>
408 </tr>
409 {/if}
410 {if $contact_email OR $contact_phone}
411 <tr>
412 <td colspan="2" {$valueStyle}>
413 <p>{ts}For information about this premium, contact:{/ts}</p>
414 {if $contact_email}
415 <p>{$contact_email}</p>
416 {/if}
417 {if $contact_phone}
418 <p>{$contact_phone}</p>
419 {/if}
420 </td>
421 </tr>
422 {/if}
423 {if $is_deductible AND $price}
424 <tr>
425 <td colspan="2" {$valueStyle}>
426 <p>{ts 1=$price|crmMoney:$currency}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>
427 </td>
428 </tr>
429 {/if}
430 {/if}
431
432 {if $customPre}
433 <tr>
434 <th {$headerStyle}>
435 {$customPre_grouptitle}
436 </th>
437 </tr>
438 {foreach from=$customPre item=customValue key=customName}
439 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
440 <tr>
441 <td {$labelStyle}>
442 {$customName}
443 </td>
444 <td {$valueStyle}>
445 {$customValue}
446 </td>
447 </tr>
448 {/if}
449 {/foreach}
450 {/if}
451
452 {if $customPost}
453 <tr>
454 <th {$headerStyle}>
455 {$customPost_grouptitle}
456 </th>
457 </tr>
458 {foreach from=$customPost item=customValue key=customName}
459 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
460 <tr>
461 <td {$labelStyle}>
462 {$customName}
463 </td>
464 <td {$valueStyle}>
465 {$customValue}
466 </td>
467 </tr>
468 {/if}
469 {/foreach}
470 {/if}
471
472 </table>
473</center>
474
475</body>
476</html>