Merge pull request #22443 from eileenmcnaughton/download
[civicrm-core.git] / xml / templates / message_templates / membership_offline_receipt_html.tpl
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6 <title></title>
7 </head>
8 <body>
9
10 {capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
11 {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
12 {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
13
14 <table id="crm-event_receipt"
15 style="font-family: Arial, Verdana, sans-serif; text-align: left; width:100%; max-width:700px; padding:0; margin:0; border:0px;">
16
17 <!-- BEGIN HEADER -->
18 <!-- You can add table row(s) here with logo or other header elements -->
19 <!-- END HEADER -->
20
21 <!-- BEGIN CONTENT -->
22
23 <tr>
24 <td>
25 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
26 {if !empty($formValues.receipt_text_signup)}
27 <p>{$formValues.receipt_text_signup|htmlize}</p>
28 {elseif !empty($formValues.receipt_text_renewal)}
29 <p>{$formValues.receipt_text_renewal|htmlize}</p>
30 {else}
31 <p>{ts}Thank you for this contribution.{/ts}</p>
32 {/if}
33 </td>
34 </tr>
35 <tr>
36 <td>
37 <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
38 {if empty($lineItem)}
39 <tr>
40 <th {$headerStyle}>
41 {ts}Membership Information{/ts}
42 </th>
43 </tr>
44 <tr>
45 <td {$labelStyle}>
46 {ts}Membership Type{/ts}
47 </td>
48 <td {$valueStyle}>
49 {$membership_name}
50 </td>
51 </tr>
52 {/if}
53 {if empty($cancelled)}
54 {if empty($lineItem)}
55 <tr>
56 <td {$labelStyle}>
57 {ts}Membership Start Date{/ts}
58 </td>
59 <td {$valueStyle}>
60 {$mem_start_date}
61 </td>
62 </tr>
63 <tr>
64 <td {$labelStyle}>
65 {ts}Membership End Date{/ts}
66 </td>
67 <td {$valueStyle}>
68 {$mem_end_date}
69 </td>
70 </tr>
71 {/if}
72 {if $formValues.total_amount OR $formValues.total_amount eq 0 }
73 <tr>
74 <th {$headerStyle}>
75 {ts}Membership Fee{/ts}
76 </th>
77 </tr>
78 {if !empty($formValues.contributionType_name)}
79 <tr>
80 <td {$labelStyle}>
81 {ts}Financial Type{/ts}
82 </td>
83 <td {$valueStyle}>
84 {$formValues.contributionType_name}
85 </td>
86 </tr>
87 {/if}
88
89 {if !empty($lineItem)}
90 {foreach from=$lineItem item=value key=priceset}
91 <tr>
92 <td colspan="2" {$valueStyle}>
93 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
94 <tr>
95 <th>{ts}Item{/ts}</th>
96 <th>{ts}Fee{/ts}</th>
97 {if !empty($dataArray)}
98 <th>{ts}SubTotal{/ts}</th>
99 <th>{ts}Tax Rate{/ts}</th>
100 <th>{ts}Tax Amount{/ts}</th>
101 <th>{ts}Total{/ts}</th>
102 {/if}
103 <th>{ts}Membership Start Date{/ts}</th>
104 <th>{ts}Membership End Date{/ts}</th>
105 </tr>
106 {foreach from=$value item=line}
107 <tr>
108 <td>
109 {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
110 <div>{$line.description|truncate:30:"..."}</div>{/if}
111 </td>
112 <td>
113 {$line.line_total|crmMoney}
114 </td>
115 {if !empty($dataArray)}
116 <td>
117 {$line.unit_price*$line.qty|crmMoney}
118 </td>
119 {if $line.tax_rate || $line.tax_amount != ""}
120 <td>
121 {$line.tax_rate|string_format:"%.2f"}%
122 </td>
123 <td>
124 {$line.tax_amount|crmMoney}
125 </td>
126 {else}
127 <td></td>
128 <td></td>
129 {/if}
130 <td>
131 {$line.line_total+$line.tax_amount|crmMoney}
132 </td>
133 {/if}
134 <td>
135 {$line.start_date}
136 </td>
137 <td>
138 {$line.end_date}
139 </td>
140 </tr>
141 {/foreach}
142 </table>
143 </td>
144 </tr>
145 {/foreach}
146 {if !empty($dataArray)}
147 {if isset($formValues.total_amount) and isset($totalTaxAmount)}
148 <tr>
149 <td {$labelStyle}>
150 {ts}Amount Before Tax:{/ts}
151 </td>
152 <td {$valueStyle}>
153 {$formValues.total_amount-$totalTaxAmount|crmMoney}
154 </td>
155 </tr>
156 {/if}
157 {foreach from=$dataArray item=value key=priceset}
158 <tr>
159 {if $priceset}
160 <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
161 <td>&nbsp;{$value|crmMoney:$currency}</td>
162 {elseif $priceset == 0}
163 <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
164 <td>&nbsp;{$value|crmMoney:$currency}</td>
165 {/if}
166 </tr>
167 {/foreach}
168 {/if}
169 {/if}
170 {if isset($totalTaxAmount)}
171 <tr>
172 <td {$labelStyle}>
173 {ts}Total Tax Amount{/ts}
174 </td>
175 <td {$valueStyle}>
176 {$totalTaxAmount|crmMoney:$currency}
177 </td>
178 </tr>
179 {/if}
180 <tr>
181 <td {$labelStyle}>
182 {ts}Amount{/ts}
183 </td>
184 <td {$valueStyle}>
185 {$formValues.total_amount|crmMoney}
186 </td>
187 </tr>
188 {if !empty($receive_date)}
189 <tr>
190 <td {$labelStyle}>
191 {ts}Date Received{/ts}
192 </td>
193 <td {$valueStyle}>
194 {$receive_date|truncate:10:''|crmDate}
195 </td>
196 </tr>
197 {/if}
198 {if !empty($formValues.paidBy)}
199 <tr>
200 <td {$labelStyle}>
201 {ts}Paid By{/ts}
202 </td>
203 <td {$valueStyle}>
204 {$formValues.paidBy}
205 </td>
206 </tr>
207 {if !empty($formValues.check_number)}
208 <tr>
209 <td {$labelStyle}>
210 {ts}Check Number{/ts}
211 </td>
212 <td {$valueStyle}>
213 {$formValues.check_number}
214 </td>
215 </tr>
216 {/if}
217 {/if}
218 {/if}
219 {/if}
220 </table>
221 </td>
222 </tr>
223
224 {if !empty($isPrimary)}
225 <tr>
226 <td>
227 <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
228
229 {if !empty($billingName)}
230 <tr>
231 <th {$headerStyle}>
232 {ts}Billing Name and Address{/ts}
233 </th>
234 </tr>
235 <tr>
236 <td {$labelStyle}>
237 {$billingName}<br/>
238 {$address}
239 </td>
240 </tr>
241 {/if}
242
243 {if !empty($credit_card_type)}
244 <tr>
245 <th {$headerStyle}>
246 {ts}Credit Card Information{/ts}
247 </th>
248 </tr>
249 <tr>
250 <td {$valueStyle}>
251 {$credit_card_type}<br/>
252 {$credit_card_number}
253 </td>
254 </tr>
255 <tr>
256 <td {$labelStyle}>
257 {ts}Expires{/ts}
258 </td>
259 <td {$valueStyle}>
260 {$credit_card_exp_date|truncate:7:''|crmDate}
261 </td>
262 </tr>
263 {/if}
264
265 </table>
266 </td>
267 </tr>
268 {/if}
269
270 {if !empty($customValues)}
271 <tr>
272 <td>
273 <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
274 <tr>
275 <th {$headerStyle}>
276 {ts}Membership Options{/ts}
277 </th>
278 </tr>
279 {foreach from=$customValues item=value key=customName}
280 <tr>
281 <td {$labelStyle}>
282 {$customName}
283 </td>
284 <td {$valueStyle}>
285 {$value}
286 </td>
287 </tr>
288 {/foreach}
289 </table>
290 </td>
291 </tr>
292 {/if}
293
294 </table>
295
296 </body>
297 </html>