VAT-645 Display billing address fields on pay later option.
[civicrm-core.git] / templates / CRM / Contribute / Form / ContributionView.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25 *}
26 <div class="crm-block crm-content-block crm-contribution-view-form-block">
27 <h3>{ts}View Contribution{/ts}</h3>
28
29 <div class="action-link">
30 <div class="crm-submit-buttons">
31 {if call_user_func(array('CRM_Core_Permission','check'), 'edit contributions')}
32 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
33 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
34 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
35 {/if}
36 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}" accesskey="e"><span>
37 <div class="icon edit-icon"></div>{ts}Edit{/ts}</span>
38 </a>
39 {/if}
40 {if call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviContribute')}
41 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
42 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
43 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
44 {/if}
45 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}"><span>
46 <div class="icon delete-icon"></div>{ts}Delete{/ts}</span>
47 </a>
48 {/if}
49 {include file="CRM/common/formButtons.tpl" location="top"}
50 {assign var='pdfUrlParams' value="reset=1&id=$id&cid=$contact_id"}
51 {assign var='emailUrlParams' value="reset=1&id=$id&cid=$contact_id&select=email"}
52 {if $invoicing}
53 <div class="crm-printButton">
54 <a class="button" href="{crmURL p='civicrm/contribute/invoice' q=$pdfUrlParams}">
55 {if $contribution_status != 'Refunded'}
56 {ts}Print Invoice{/ts}</a>
57 {else}
58 {ts}Print Invoice and Credit Note{/ts}</a>
59 {/if}
60 <a class="button" href="{crmURL p='civicrm/contribute/invoice/email' q=$emailUrlParams}">
61 {ts}Email Invoice{/ts}</a>
62 </div>
63 {/if}
64 </div>
65 </div>
66 <table class="crm-info-panel">
67 <tr>
68 <td class="label">{ts}From{/ts}</td>
69 <td class="bold">{$displayName}</td>
70 </tr>
71 <tr>
72 <td class="label">{ts}Financial Type{/ts}</td>
73 <td>{$financial_type}{if $is_test} {ts}(test){/ts} {/if}</td>
74 </tr>
75 {if $lineItem}
76 <tr>
77 <td class="label">{ts}Contribution Amount{/ts}</td>
78 <td>{include file="CRM/Price/Page/LineItem.tpl" context="Contribution"}
79 {if $contribution_recur_id}
80 <strong>{ts}Recurring Contribution{/ts}</strong>
81 <br/>
82 {ts}Installments{/ts}: {if $recur_installments}{$recur_installments}{else}{ts}(ongoing){/ts}{/if}, {ts}Interval{/ts}: {$recur_frequency_interval} {$recur_frequency_unit}(s)
83 {/if}
84 </td>
85 </tr>
86 {else}
87 <tr>
88 <td class="label">{ts}Total Amount{/ts}</td>
89 <td><strong>{$total_amount|crmMoney:$currency}</strong>&nbsp;
90 {if $contribution_recur_id}
91 <strong>{ts}Recurring Contribution{/ts}</strong>
92 <br/>
93 {ts}Installments{/ts}: {if $recur_installments}{$recur_installments}{else}{ts}(ongoing){/ts}{/if}, {ts}Interval{/ts}: {$recur_frequency_interval} {$recur_frequency_unit}(s)
94 {/if}
95 </td>
96 </tr>
97 {/if}
98 {if $invoicing && $tax_amount}
99 <tr>
100 <td class="label">{ts}Total Tax Amount{/ts}</td>
101 <td>{$tax_amount|crmMoney:$currency}</td>
102 </tr>
103 {/if}
104 {if $non_deductible_amount}
105 <tr>
106 <td class="label">{ts}Non-deductible Amount{/ts}</td>
107 <td>{$non_deductible_amount|crmMoney:$currency}</td>
108 </tr>
109 {/if}
110 {if $fee_amount}
111 <tr>
112 <td class="label">{ts}Fee Amount{/ts}</td>
113 <td>{$fee_amount|crmMoney:$currency}</td>
114 </tr>
115 {/if}
116 {if $net_amount}
117 <tr>
118 <td class="label">{ts}Net Amount{/ts}</td>
119 <td>{$net_amount|crmMoney:$currency}</td>
120 </tr>
121 {/if}
122
123 <tr>
124 <td class="label">{ts}Received{/ts}</td>
125 <td>{if $receive_date}{$receive_date|crmDate}{else}({ts}not available{/ts}){/if}</td>
126 </tr>
127 {if $to_financial_account }
128 <tr>
129 <td class="label">{ts}Received Into{/ts}</td>
130 <td>{$to_financial_account}</td>
131 </tr>
132 {/if}
133 <tr>
134 <td class="label">{ts}Contribution Status{/ts}</td>
135 <td {if $contribution_status_id eq 3} class="font-red bold"{/if}>{$contribution_status}
136 {if $contribution_status_id eq 2} {if $is_pay_later}: {ts}Pay Later{/ts} {else} : {ts}Incomplete Transaction{/ts} {/if}{/if}</td>
137 </tr>
138
139 {if $cancel_date}
140 <tr>
141 <td class="label">{ts}Cancelled / Refunded Date{/ts}</td>
142 <td>{$cancel_date|crmDate}</td>
143 </tr>
144 {if $cancel_reason}
145 <tr>
146 <td class="label">{ts}Cancellation / Refund Reason{/ts}</td>
147 <td>{$cancel_reason}</td>
148 </tr>
149 {/if}
150 {/if}
151 <tr>
152 <td class="label">{ts}Paid By{/ts}</td>
153 <td>{$payment_instrument}</td>
154 </tr>
155
156 {if $payment_instrument eq 'Check'|ts}
157 <tr>
158 <td class="label">{ts}Check Number{/ts}</td>
159 <td>{$check_number}</td>
160 </tr>
161 {/if}
162 <tr>
163 <td class="label">{ts}Source{/ts}</td>
164 <td>{$source}</td>
165 </tr>
166
167 {if $campaign}
168 <tr>
169 <td class="label">{ts}Campaign{/ts}</td>
170 <td>{$campaign}</td>
171 </tr>
172 {/if}
173
174 {if $contribution_page_title}
175 <tr>
176 <td class="label">{ts}Online Contribution Page{/ts}</td>
177 <td>{$contribution_page_title}</td>
178 </tr>
179 {/if}
180 {if $receipt_date}
181 <tr>
182 <td class="label">{ts}Receipt Sent{/ts}</td>
183 <td>{$receipt_date|crmDate}</td>
184 </tr>
185 {/if}
186 {foreach from=$note item="rec"}
187 {if $rec }
188 <tr>
189 <td class="label">{ts}Note{/ts}</td>
190 <td>{$rec}</td>
191 </tr>
192 {/if}
193 {/foreach}
194
195 {if $trxn_id}
196 <tr>
197 <td class="label">{ts}Transaction ID{/ts}</td>
198 <td>{$trxn_id}</td>
199 </tr>
200 {/if}
201
202 {if $invoice_id}
203 <tr>
204 <td class="label">{ts}Invoice ID{/ts}</td>
205 <td>{$invoice_id}&nbsp;</td>
206 </tr>
207 {/if}
208
209 {if $thankyou_date}
210 <tr>
211 <td class="label">{ts}Thank-you Sent{/ts}</td>
212 <td>{$thankyou_date|crmDate}</td>
213 </tr>
214 {/if}
215 </table>
216
217 {if count($softContributions)} {* We show soft credit name with PCP section if contribution is linked to a PCP. *}
218 <div class="crm-accordion-wrapper crm-soft-credit-pane">
219 <div class="crm-accordion-header">
220 {ts}Soft Credit{/ts}
221 </div>
222 <div class="crm-accordion-body">
223 <table class="crm-info-panel crm-soft-credit-listing">
224 {foreach from=$softContributions item="softCont"}
225 <tr>
226 <td>
227 <a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$softCont.contact_id`"}"
228 title="{ts}View contact record{/ts}">{$softCont.contact_name}
229 </a>
230 </td>
231 <td>{$softCont.amount|crmMoney:$currency}
232 {if $softCont.soft_credit_type_label}
233 ({$softCont.soft_credit_type_label})
234 {/if}
235 </td>
236 </tr>
237 {/foreach}
238 </table>
239 </div>
240 </div>
241 {/if}
242
243 {if $premium}
244 <div class="crm-accordion-wrapper ">
245 <div class="crm-accordion-header">
246 {ts}Premium Information{/ts}
247 </div>
248 <div class="crm-accordion-body">
249 <table class="crm-info-panel">
250 <td class="label">{ts}Premium{/ts}</td>
251 <td>{$premium}</td>
252 <td class="label">{ts}Option{/ts}</td>
253 <td>{$option}</td>
254 <td class="label">{ts}Fulfilled{/ts}</td>
255 <td>{$fulfilled|truncate:10:''|crmDate}</td>
256 </table>
257 </div>
258 </div>
259 {/if}
260
261 {if $pcp_id}
262 <div id='PCPView' class="crm-accordion-wrapper ">
263 <div class="crm-accordion-header">
264 {ts}Personal Campaign Page Contribution Information{/ts}
265 </div>
266 <div class="crm-accordion-body">
267 <table class="crm-info-panel">
268 <tr>
269 <td class="label">{ts}Personal Campaign Page{/ts}</td>
270 <td><a href="{crmURL p="civicrm/pcp/info" q="reset=1&id=`$pcp_id`"}">{$pcp_title}</a><br/>
271 <span class="description">{ts}Contribution was made through this personal campaign page.{/ts}</span>
272 </td>
273 </tr>
274 <tr>
275 <td class="label">{ts}Soft Credit To{/ts}</td>
276 <td><a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$pcp_soft_credit_to_id`"}" id="view_contact"
277 title="{ts}View contact record{/ts}">{$pcp_soft_credit_to_name}</a></td>
278 </tr>
279 <tr>
280 <td class="label">{ts}In Public Honor Roll?{/ts}</td>
281 <td>{if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td>
282 </tr>
283 {if $pcp_roll_nickname}
284 <tr>
285 <td class="label">{ts}Honor Roll Name{/ts}</td>
286 <td>{$pcp_roll_nickname}</td>
287 </tr>
288 {/if}
289 {if $pcp_personal_note}
290 <tr>
291 <td class="label">{ts}Personal Note{/ts}</td>
292 <td>{$pcp_personal_note}</td>
293 </tr>
294 {/if}
295 </table>
296 </div>
297 </div>
298 {/if}
299
300 {include file="CRM/Custom/Page/CustomDataView.tpl"}
301
302 {if $billing_address}
303 <fieldset>
304 <legend>{ts}Billing Address{/ts}</legend>
305 <div class="form-item">
306 {$billing_address|nl2br}
307 </div>
308 </fieldset>
309 {/if}
310
311 <div class="crm-submit-buttons">
312 {if call_user_func(array('CRM_Core_Permission','check'), 'edit contributions')}
313 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
314 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
315 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
316 {/if}
317 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}" accesskey="e"><span><div
318 class="icon edit-icon"></div>{ts}Edit{/ts}</span></a>
319 {/if}
320 {if call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviContribute')}
321 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
322 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
323 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
324 {/if}
325 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}"><span><div
326 class="icon delete-icon"></div>{ts}Delete{/ts}</span></a>
327 {/if}
328 {include file="CRM/common/formButtons.tpl" location="bottom"}
329 {if $invoicing}
330 <div class="crm-printButton">
331 <a class="button" href="{crmURL p='civicrm/contribute/invoice' q=$pdfUrlParams}">
332 {if $contribution_status != 'Refunded'}
333 {ts}Print Invoice{/ts}</a>
334 {else}
335 {ts}Print Invoice and Credit Note{/ts}</a>
336 {/if}
337 <a class="button" href="{crmURL p='civicrm/contribute/invoice/email' q=$emailUrlParams}">
338 {ts}Email Invoice{/ts}</a>
339 </div>
340 {/if}
341 </div>
342 </div>