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