Merge pull request #22551 from eileenmcnaughton/phpcs
[civicrm-core.git] / xml / templates / message_templates / contribution_offline_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($formValues.receipt_text)}
25 <p>{$formValues.receipt_text|htmlize}</p>
26 {else}
27 <p>{ts}Below you will find a receipt for this contribution.{/ts}</p>
28 {/if}
29 </td>
30 </tr>
31 <tr>
32 <td>
33 <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
34 <tr>
35 <th {$headerStyle}>
36 {ts}Contribution Information{/ts}
37 </th>
38 </tr>
39 <tr>
40 <td {$labelStyle}>
41 {ts}Contributor Name{/ts}
42 </td>
43 <td {$valueStyle}>
44 {contact.display_name}
45 </td>
46 </tr>
47 <tr>
48 {if '{contribution.financial_type_id}'}
49 <td {$labelStyle}>
50 {ts}Financial Type{/ts}
51 </td>
52 <td {$valueStyle}>
53 {contribution.financial_type_id:label}
54 </td>
55 {/if}
56 </tr>
57
58 {if !empty($lineItem) and empty($is_quick_config)}
59 {foreach from=$lineItem item=value key=priceset}
60 <tr>
61 <td colspan="2" {$valueStyle}>
62 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
63 <tr>
64 <th>{ts}Item{/ts}</th>
65 <th>{ts}Qty{/ts}</th>
66 <th>{ts}Each{/ts}</th>
67 {if !empty($getTaxDetails)}
68 <th>{ts}Subtotal{/ts}</th>
69 <th>{ts}Tax Rate{/ts}</th>
70 <th>{ts}Tax Amount{/ts}</th>
71 {/if}
72 <th>{ts}Total{/ts}</th>
73 </tr>
74 {foreach from=$value item=line}
75 <tr>
76 <td>
77 {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}
78 </td>
79 <td>
80 {$line.qty}
81 </td>
82 <td>
83 {$line.unit_price|crmMoney:$currency}
84 </td>
85 {if !empty($getTaxDetails)}
86 <td>
87 {$line.unit_price*$line.qty|crmMoney:$currency}
88 </td>
89 {if $line.tax_rate || $line.tax_amount != ""}
90 <td>
91 {$line.tax_rate|string_format:"%.2f"}%
92 </td>
93 <td>
94 {$line.tax_amount|crmMoney:$currency}
95 </td>
96 {else}
97 <td></td>
98 <td></td>
99 {/if}
100 {/if}
101 <td>
102 {$line.line_total+$line.tax_amount|crmMoney:$currency}
103 </td>
104 </tr>
105 {/foreach}
106 </table>
107 </td>
108 </tr>
109 {/foreach}
110 {/if}
111 {if !empty($getTaxDetails) && !empty($dataArray)}
112 <tr>
113 <td {$labelStyle}>
114 {ts} Amount before Tax : {/ts}
115 </td>
116 <td {$valueStyle}>
117 {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
118 </td>
119 </tr>
120
121 {foreach from=$dataArray item=value key=priceset}
122 <tr>
123 {if $priceset || $priceset == 0 || $value != ''}
124 <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
125 <td>&nbsp;{$value|crmMoney:$currency}</td>
126 {else}
127 <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
128 <td>&nbsp;{$value|crmMoney:$currency}</td>
129 {/if}
130 </tr>
131 {/foreach}
132 {/if}
133
134 {if $isShowTax}
135 <tr>
136 <td {$labelStyle}>
137 {ts}Total Tax Amount{/ts}
138 </td>
139 <td {$valueStyle}>
140 {contribution.tax_amount}
141 </td>
142 </tr>
143 {/if}
144
145 <tr>
146 <td {$labelStyle}>
147 {ts}Total Amount{/ts}
148 </td>
149 <td {$valueStyle}>
150 {contribution.total_amount}
151 </td>
152 </tr>
153
154 {if '{contribution.receive_date}'}
155 <tr>
156 <td {$labelStyle}>
157 {ts}Date Received{/ts}
158 </td>
159 <td {$valueStyle}>
160 {contribution.receive_date}
161 </td>
162 </tr>
163 {/if}
164
165 {if '{contribution.receipt_date}'}
166 <tr>
167 <td {$labelStyle}>
168 {ts}Receipt Date{/ts}
169 </td>
170 <td {$valueStyle}>
171 {contribution.receipt_date}
172 </td>
173 </tr>
174 {/if}
175
176 {if '{contribution.payment_instrument_id}' and empty($formValues.hidden_CreditCard)}
177 <tr>
178 <td {$labelStyle}>
179 {ts}Paid By{/ts}
180 </td>
181 <td {$valueStyle}>
182 {contribution.payment_instrument_id:label}
183 </td>
184 </tr>
185 {if '{contribution.check_number}'}
186 <tr>
187 <td {$labelStyle}>
188 {ts}Check Number{/ts}
189 </td>
190 <td {$valueStyle}>
191 {contribution.check_number}
192 </td>
193 </tr>
194 {/if}
195 {/if}
196
197 {if '{contribution.trxn_id}'}
198 <tr>
199 <td {$labelStyle}>
200 {ts}Transaction ID{/ts}
201 </td>
202 <td {$valueStyle}>
203 {contribution.trxn_id}
204 </td>
205 </tr>
206 {/if}
207
208 {if !empty($ccContribution)}
209 <tr>
210 <th {$headerStyle}>
211 {ts}Billing Name and Address{/ts}
212 </th>
213 </tr>
214 <tr>
215 <td colspan="2" {$valueStyle}>
216 {$billingName}<br />
217 {$address|nl2br}
218 </td>
219 </tr>
220 <tr>
221 <th {$headerStyle}>
222 {ts}Credit Card Information{/ts}
223 </th>
224 </tr>
225 <tr>
226 <td colspan="2" {$valueStyle}>
227 {$credit_card_type}<br />
228 {$credit_card_number}<br />
229 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
230 </td>
231 </tr>
232 {/if}
233
234 {if !empty($softCreditTypes) and !empty($softCredits)}
235 {foreach from=$softCreditTypes item=softCreditType key=n}
236 <tr>
237 <th {$headerStyle}>
238 {$softCreditType}
239 </th>
240 </tr>
241 {foreach from=$softCredits.$n item=value key=label}
242 <tr>
243 <td {$labelStyle}>
244 {$label}
245 </td>
246 <td {$valueStyle}>
247 {$value}
248 </td>
249 </tr>
250 {/foreach}
251 {/foreach}
252 {/if}
253
254 {if !empty($customGroup)}
255 {foreach from=$customGroup item=value key=customName}
256 <tr>
257 <th {$headerStyle}>
258 {$customName}
259 </th>
260 </tr>
261 {foreach from=$value item=v key=n}
262 <tr>
263 <td {$labelStyle}>
264 {$n}
265 </td>
266 <td {$valueStyle}>
267 {$v}
268 </td>
269 </tr>
270 {/foreach}
271 {/foreach}
272 {/if}
273
274 {if !empty($formValues.product_name)}
275 <tr>
276 <th {$headerStyle}>
277 {ts}Premium Information{/ts}
278 </th>
279 </tr>
280 <tr>
281 <td colspan="2" {$labelStyle}>
282 {$formValues.product_name}
283 </td>
284 </tr>
285 {if $formValues.product_option}
286 <tr>
287 <td {$labelStyle}>
288 {ts}Option{/ts}
289 </td>
290 <td {$valueStyle}>
291 {$formValues.product_option}
292 </td>
293 </tr>
294 {/if}
295 {if $formValues.product_sku}
296 <tr>
297 <td {$labelStyle}>
298 {ts}SKU{/ts}
299 </td>
300 <td {$valueStyle}>
301 {$formValues.product_sku}
302 </td>
303 </tr>
304 {/if}
305 {if !empty($fulfilled_date)}
306 <tr>
307 <td {$labelStyle}>
308 {ts}Sent{/ts}
309 </td>
310 <td {$valueStyle}>
311 {$fulfilled_date|truncate:10:''|crmDate}
312 </td>
313 </tr>
314 {/if}
315 {/if}
316
317 </table>
318 </td>
319 </tr>
320
321 </table>
322
323 </body>
324 </html>