175fd5b4ba9b9402a7bc0a5e59bce74d12b4d345
[civicrm-core.git] / templates / CRM / Contribute / Form / ContributionView.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2016 |
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 <div class="action-link">
28 <div class="crm-submit-buttons">
29 {if (call_user_func(array('CRM_Core_Permission','check'), 'edit contributions') && call_user_func(array('CRM_Core_Permission', 'check'), "edit contributions of type $financial_type") && $canEdit) ||
30 (call_user_func(array('CRM_Core_Permission','check'), 'edit contributions') && $noACL)}
31 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
32 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
33 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
34 {/if}
35 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}" accesskey="e"><span>
36 <i class="crm-i fa-pencil"></i> {ts}Edit{/ts}</span>
37 </a>
38 {/if}
39 {if (call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviContribute') && call_user_func(array('CRM_Core_Permission', 'check'), "delete contributions of type $financial_type") && $canDelete) || (call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviContribute') && $noACL)}
40 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
41 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
42 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
43 {/if}
44 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}"><span>
45 <i class="crm-i fa-trash"></i> {ts}Delete{/ts}</span>
46 </a>
47 {/if}
48 {include file="CRM/common/formButtons.tpl" location="top"}
49 {assign var='pdfUrlParams' value="reset=1&id=$id&cid=$contact_id"}
50 {assign var='emailUrlParams' value="reset=1&id=$id&cid=$contact_id&select=email"}
51 {if $invoicing}
52 <div class="css_right">
53 <a class="button no-popup" href="{crmURL p='civicrm/contribute/invoice' q=$pdfUrlParams}">
54 <i class="crm-i fa-print"></i>
55 {if $contribution_status != 'Refunded' && $contribution_status != 'Cancelled' }
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 <i class="crm-i fa-paper-plane"></i>
62 {ts}Email Invoice{/ts}</a>
63 </div>
64 {/if}
65 </div>
66 </div>
67 <table class="crm-info-panel">
68 <tr>
69 <td class="label">{ts}From{/ts}</td>
70 <td class="bold">{$displayName}</td>
71 </tr>
72 <tr>
73 <td class="label">{ts}Financial Type{/ts}</td>
74 <td>{$financial_type}{if $is_test} {ts}(test){/ts} {/if}</td>
75 </tr>
76 {if $displayLineItems}
77 <tr>
78 <td class="label">{ts}Contribution Amount{/ts}</td>
79 <td>{include file="CRM/Price/Page/LineItem.tpl" context="Contribution"}
80 {if $contribution_recur_id}
81 <strong>{ts}Recurring Contribution{/ts}</strong>
82 <br/>
83 {ts}Installments{/ts}: {if $recur_installments}{$recur_installments}{else}{ts}(ongoing){/ts}{/if}, {ts}Interval{/ts}: {$recur_frequency_interval} {$recur_frequency_unit}(s)
84 {/if}
85 </td>
86 </tr>
87 {else}
88 <tr>
89 <td class="label">{ts}Total Amount{/ts}</td>
90 <td><strong><a class="nowrap bold crm-expand-row" title="{ts}view payments{/ts}"
91 href="{crmURL p='civicrm/payment' q="view=transaction&component=contribution&action=browse&cid=`$contact_id`&id=`$contribution_id`&selector=1"}">
92 &nbsp; {$total_amount|crmMoney:$currency}
93 </strong></a>&nbsp;
94 {if $contribution_recur_id}
95 <strong>{ts}Recurring Contribution{/ts}</strong>
96 <br/>
97 {ts}Installments{/ts}: {if $recur_installments}{$recur_installments}{else}{ts}(ongoing){/ts}{/if}, {ts}Interval{/ts}: {$recur_frequency_interval} {$recur_frequency_unit}(s)
98 {/if}
99 </td>
100 </tr>
101 {/if}
102 {if $invoicing && $tax_amount}
103 <tr>
104 <td class="label">{ts}Total Tax Amount{/ts}</td>
105 <td>{$tax_amount|crmMoney:$currency}</td>
106 </tr>
107 {/if}
108 {if $non_deductible_amount}
109 <tr>
110 <td class="label">{ts}Non-deductible Amount{/ts}</td>
111 <td>{$non_deductible_amount|crmMoney:$currency}</td>
112 </tr>
113 {/if}
114 {if $fee_amount}
115 <tr>
116 <td class="label">{ts}Fee Amount{/ts}</td>
117 <td>{$fee_amount|crmMoney:$currency}</td>
118 </tr>
119 {/if}
120 {if $net_amount}
121 <tr>
122 <td class="label">{ts}Net Amount{/ts}</td>
123 <td>{$net_amount|crmMoney:$currency}</td>
124 </tr>
125 {/if}
126 {if $isDeferred AND $revenue_recognition_date}
127 <tr>
128 <td class="label">{ts}Revenue Recognition Date{/ts}</td>
129 <td>{$revenue_recognition_date|crmDate:"%B, %Y"}</td>
130 </tr>
131 {/if}
132 <tr>
133 <td class="label">{ts}Received{/ts}</td>
134 <td>{if $receive_date}{$receive_date|crmDate}{else}({ts}not available{/ts}){/if}</td>
135 </tr>
136 {if $to_financial_account }
137 <tr>
138 <td class="label">{ts}Received Into{/ts}</td>
139 <td>{$to_financial_account}</td>
140 </tr>
141 {/if}
142 <tr>
143 <td class="label">{ts}Contribution Status{/ts}</td>
144 <td {if $contribution_status_id eq 3} class="font-red bold"{/if}>{$contribution_status}
145 {if $contribution_status_id eq 2} {if $is_pay_later}: {ts}Pay Later{/ts} {else} : {ts}Incomplete Transaction{/ts} {/if}{/if}</td>
146 </tr>
147
148 {if $cancel_date}
149 <tr>
150 <td class="label">{ts}Cancelled / Refunded Date{/ts}</td>
151 <td>{$cancel_date|crmDate}</td>
152 </tr>
153 {if $cancel_reason}
154 <tr>
155 <td class="label">{ts}Cancellation / Refund Reason{/ts}</td>
156 <td>{$cancel_reason}</td>
157 </tr>
158 {/if}
159 {if $refund_trxn_id}
160 <tr>
161 <td class="label">{ts}Refund Transaction ID{/ts}</td>
162 <td>{$refund_trxn_id}</td>
163 </tr>
164 {/if}
165 {/if}
166 <tr>
167 <td class="label">{ts}Payment Method{/ts}</td>
168 <td>{$payment_instrument}{if $payment_processor_name} ({$payment_processor_name}){/if}</td>
169 </tr>
170
171 {if $payment_instrument eq 'Check'|ts}
172 <tr>
173 <td class="label">{ts}Check Number{/ts}</td>
174 <td>{$check_number}</td>
175 </tr>
176 {/if}
177 <tr>
178 <td class="label">{ts}Source{/ts}</td>
179 <td>{$source}</td>
180 </tr>
181
182 {if $campaign}
183 <tr>
184 <td class="label">{ts}Campaign{/ts}</td>
185 <td>{$campaign}</td>
186 </tr>
187 {/if}
188
189 {if $contribution_page_title}
190 <tr>
191 <td class="label">{ts}Online Contribution Page{/ts}</td>
192 <td>{$contribution_page_title}</td>
193 </tr>
194 {/if}
195 {if $receipt_date}
196 <tr>
197 <td class="label">{ts}Receipt Sent{/ts}</td>
198 <td>{$receipt_date|crmDate}</td>
199 </tr>
200 {/if}
201 {foreach from=$note item="rec"}
202 {if $rec }
203 <tr>
204 <td class="label">{ts}Note{/ts}</td>
205 <td>{$rec}</td>
206 </tr>
207 {/if}
208 {/foreach}
209
210 {if $trxn_id}
211 <tr>
212 <td class="label">{ts}Transaction ID{/ts}</td>
213 <td>{$trxn_id}</td>
214 </tr>
215 {/if}
216
217 {if $invoice_id}
218 <tr>
219 <td class="label">{ts}Invoice ID{/ts}</td>
220 <td>{$invoice_id}&nbsp;</td>
221 </tr>
222 {/if}
223
224 {if $thankyou_date}
225 <tr>
226 <td class="label">{ts}Thank-you Sent{/ts}</td>
227 <td>{$thankyou_date|crmDate}</td>
228 </tr>
229 {/if}
230 {if $participantId and $hasPayment}
231 <tr>
232 <td class='label'>{ts}Fees{/ts}</td>
233 <td id='payment-info'></td>
234 </tr>
235 {/if}
236 </table>
237
238 {if count($softContributions)} {* We show soft credit name with PCP section if contribution is linked to a PCP. *}
239 <div class="crm-accordion-wrapper crm-soft-credit-pane">
240 <div class="crm-accordion-header">
241 {ts}Soft Credit{/ts}
242 </div>
243 <div class="crm-accordion-body">
244 <table class="crm-info-panel crm-soft-credit-listing">
245 {foreach from=$softContributions item="softCont"}
246 <tr>
247 <td>
248 <a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$softCont.contact_id`"}"
249 title="{ts}View contact record{/ts}">{$softCont.contact_name}
250 </a>
251 </td>
252 <td>{$softCont.amount|crmMoney:$currency}
253 {if $softCont.soft_credit_type_label}
254 ({$softCont.soft_credit_type_label})
255 {/if}
256 </td>
257 </tr>
258 {/foreach}
259 </table>
260 </div>
261 </div>
262 {/if}
263
264 {if $premium}
265 <div class="crm-accordion-wrapper ">
266 <div class="crm-accordion-header">
267 {ts}Premium Information{/ts}
268 </div>
269 <div class="crm-accordion-body">
270 <table class="crm-info-panel">
271 <td class="label">{ts}Premium{/ts}</td>
272 <td>{$premium}</td>
273 <td class="label">{ts}Option{/ts}</td>
274 <td>{$option}</td>
275 <td class="label">{ts}Fulfilled{/ts}</td>
276 <td>{$fulfilled|truncate:10:''|crmDate}</td>
277 </table>
278 </div>
279 </div>
280 {/if}
281
282 {if $pcp_id}
283 <div id='PCPView' class="crm-accordion-wrapper ">
284 <div class="crm-accordion-header">
285 {ts}Personal Campaign Page Contribution Information{/ts}
286 </div>
287 <div class="crm-accordion-body">
288 <table class="crm-info-panel">
289 <tr>
290 <td class="label">{ts}Personal Campaign Page{/ts}</td>
291 <td><a href="{crmURL p="civicrm/pcp/info" q="reset=1&id=`$pcp_id`"}">{$pcp_title}</a><br/>
292 <span class="description">{ts}Contribution was made through this personal campaign page.{/ts}</span>
293 </td>
294 </tr>
295 <tr>
296 <td class="label">{ts}Soft Credit To{/ts}</td>
297 <td><a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$pcp_soft_credit_to_id`"}" id="view_contact"
298 title="{ts}View contact record{/ts}">{$pcp_soft_credit_to_name}</a></td>
299 </tr>
300 <tr>
301 <td class="label">{ts}In Public Honor Roll?{/ts}</td>
302 <td>{if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td>
303 </tr>
304 {if $pcp_roll_nickname}
305 <tr>
306 <td class="label">{ts}Honor Roll Name{/ts}</td>
307 <td>{$pcp_roll_nickname}</td>
308 </tr>
309 {/if}
310 {if $pcp_personal_note}
311 <tr>
312 <td class="label">{ts}Personal Note{/ts}</td>
313 <td>{$pcp_personal_note}</td>
314 </tr>
315 {/if}
316 </table>
317 </div>
318 </div>
319 {/if}
320
321 {include file="CRM/Custom/Page/CustomDataView.tpl"}
322
323 {if $billing_address}
324 <fieldset>
325 <legend>{ts}Billing Address{/ts}</legend>
326 <div class="form-item">
327 {$billing_address|nl2br}
328 </div>
329 </fieldset>
330 {/if}
331 {if $participantId and $hasPayment}
332 {include file="CRM/Contribute/Page/PaymentInfo.tpl" show='event-payment'}
333 {/if}
334
335 <div class="crm-submit-buttons">
336 {if (call_user_func(array('CRM_Core_Permission','check'), 'edit contributions') && call_user_func(array('CRM_Core_Permission', 'check'), "edit contributions of type $financial_type") && $canEdit) ||
337 (call_user_func(array('CRM_Core_Permission','check'), 'edit contributions') && $noACL)}
338 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
339 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
340 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
341 {/if}
342 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}" accesskey="e"><span><i class="crm-i fa-pencil"></i> {ts}Edit{/ts}</span></a>
343 {/if}
344 {if (call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviContribute') && call_user_func(array('CRM_Core_Permission', 'check'), "delete contributions of type $financial_type") && $canDelete) || (call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviContribute') && $noACL)}
345 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
346 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
347 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
348 {/if}
349 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}"><span><i class="crm-i fa-trash"></i> {ts}Delete{/ts}</span></a>
350 {/if}
351 {include file="CRM/common/formButtons.tpl" location="bottom"}
352 </div>
353 </div>
354 {crmScript file='js/crm.expandRow.js'}