Merge pull request #15526 from civicrm/5.19
[civicrm-core.git] / xml / templates / message_templates / contribution_offline_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="620" 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 $formValues.receipt_text}
26 <p>{$formValues.receipt_text|htmlize}</p>
27 {else}
2b3846c2 28 <p>{ts}Thank you for your support.{/ts}</p>
6a488035
TO
29 {/if}
30
6a488035
TO
31 </td>
32 </tr>
33 <tr>
34 <td>
35 <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
36 <tr>
37 <th {$headerStyle}>
38 {ts}Contribution Information{/ts}
39 </th>
40 </tr>
41 <tr>
42 <td {$labelStyle}>
43 {ts}Financial Type{/ts}
44 </td>
45 <td {$valueStyle}>
46 {$formValues.contributionType_name}
47 </td>
48 </tr>
49
50 {if $lineItem and !$is_quick_config}
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>
7cf82823 59 {if $getTaxDetails}
79d001a2
PB
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>
01604562 83 {$line.tax_rate|string_format:"%.2f"}%
7cf82823
PB
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}
102 {/if}
7cf82823 103 {if $getTaxDetails && $dataArray}
79d001a2
PB
104 <tr>
105 <td {$labelStyle}>
106 {ts} Amount before Tax : {/ts}
107 </td>
108 <td {$valueStyle}>
109 {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
110 </td>
111 </tr>
112
113 {foreach from=$dataArray item=value key=priceset}
114 <tr>
7cf82823 115 {if $priceset || $priceset == 0 || $value != ''}
ebf2b57b 116 <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
79d001a2 117 <td>&nbsp;{$value|crmMoney:$currency}</td>
7cf82823 118 {else}
03b412ae 119 <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
79d001a2
PB
120 <td>&nbsp;{$value|crmMoney:$currency}</td>
121 {/if}
122 </tr>
123 {/foreach}
124 {/if}
125
01604562 126 {if isset($totalTaxAmount) && $totalTaxAmount !== 'null'}
79d001a2
PB
127 <tr>
128 <td {$labelStyle}>
129 {ts}Total Tax Amount{/ts}
130 </td>
131 <td {$valueStyle}>
132 {$totalTaxAmount|crmMoney:$currency}
133 </td>
134 </tr>
135 {/if}
6a488035
TO
136
137 <tr>
138 <td {$labelStyle}>
139 {ts}Total Amount{/ts}
140 </td>
141 <td {$valueStyle}>
142 {$formValues.total_amount|crmMoney:$currency}
143 </td>
144 </tr>
145
146 {if $receive_date}
147 <tr>
148 <td {$labelStyle}>
7bc6b5bb 149 {ts}Date Received{/ts}
6a488035
TO
150 </td>
151 <td {$valueStyle}>
152 {$receive_date|truncate:10:''|crmDate}
153 </td>
154 </tr>
155 {/if}
156
157 {if $receipt_date}
158 <tr>
159 <td {$labelStyle}>
160 {ts}Receipt Date{/ts}
161 </td>
162 <td {$valueStyle}>
163 {$receipt_date|truncate:10:''|crmDate}
164 </td>
165 </tr>
166 {/if}
167
168 {if $formValues.paidBy and !$formValues.hidden_CreditCard}
169 <tr>
170 <td {$labelStyle}>
171 {ts}Paid By{/ts}
172 </td>
173 <td {$valueStyle}>
174 {$formValues.paidBy}
175 </td>
176 </tr>
177 {if $formValues.check_number}
178 <tr>
179 <td {$labelStyle}>
180 {ts}Check Number{/ts}
181 </td>
182 <td {$valueStyle}>
183 {$formValues.check_number}
184 </td>
185 </tr>
186 {/if}
187 {/if}
188
189 {if $formValues.trxn_id}
190 <tr>
191 <td {$labelStyle}>
192 {ts}Transaction ID{/ts}
193 </td>
194 <td {$valueStyle}>
195 {$formValues.trxn_id}
196 </td>
197 </tr>
198 {/if}
199
200 {if $ccContribution}
201 <tr>
202 <th {$headerStyle}>
203 {ts}Billing Name and Address{/ts}
204 </th>
205 </tr>
206 <tr>
207 <td colspan="2" {$valueStyle}>
208 {$billingName}<br />
209 {$address|nl2br}
210 </td>
211 </tr>
212 <tr>
213 <th {$headerStyle}>
214 {ts}Credit Card Information{/ts}
215 </th>
216 </tr>
217 <tr>
218 <td colspan="2" {$valueStyle}>
219 {$credit_card_type}<br />
220 {$credit_card_number}<br />
221 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
222 </td>
223 </tr>
224 {/if}
225
1421174e 226 {if $softCreditTypes and $softCredits}
227 {foreach from=$softCreditTypes item=softCreditType key=n}
228 <tr>
229 <th {$headerStyle}>
230 {$softCreditType}
231 </th>
232 </tr>
233 {foreach from=$softCredits.$n item=value key=label}
234 <tr>
235 <td {$labelStyle}>
236 {$label}
237 </td>
238 <td {$valueStyle}>
239 {$value}
240 </td>
241 </tr>
242 {/foreach}
243 {/foreach}
244 {/if}
245
6a488035
TO
246 {if $customGroup}
247 {foreach from=$customGroup item=value key=customName}
248 <tr>
249 <th {$headerStyle}>
250 {$customName}
251 </th>
252 </tr>
253 {foreach from=$value item=v key=n}
254 <tr>
255 <td {$labelStyle}>
256 {$n}
257 </td>
258 <td {$valueStyle}>
259 {$v}
260 </td>
261 </tr>
262 {/foreach}
263 {/foreach}
264 {/if}
265
6a488035
TO
266 {if $formValues.product_name}
267 <tr>
268 <th {$headerStyle}>
269 {ts}Premium Information{/ts}
270 </th>
271 </tr>
272 <tr>
273 <td colspan="2" {$labelStyle}>
274 {$formValues.product_name}
275 </td>
276 </tr>
277 {if $formValues.product_option}
278 <tr>
279 <td {$labelStyle}>
280 {ts}Option{/ts}
281 </td>
282 <td {$valueStyle}>
283 {$formValues.product_option}
284 </td>
285 </tr>
286 {/if}
287 {if $formValues.product_sku}
288 <tr>
289 <td {$labelStyle}>
290 {ts}SKU{/ts}
291 </td>
292 <td {$valueStyle}>
293 {$formValues.product_sku}
294 </td>
295 </tr>
296 {/if}
297 {if $fulfilled_date}
298 <tr>
299 <td {$labelStyle}>
300 {ts}Sent{/ts}
301 </td>
302 <td {$valueStyle}>
303 {$fulfilled_date|truncate:10:''|crmDate}
304 </td>
305 </tr>
306 {/if}
307 {/if}
308
309 </table>
310 </td>
311 </tr>
312
313 </table>
314</center>
315
316</body>
317</html>