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