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