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