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