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