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