CRM-16189, added link on contribution edit form to record payment for pending pay...
[civicrm-core.git] / templates / CRM / Contribute / Form / ContributionView.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
2c4c49ca 3 | CiviCRM version 4.7 |
6a488035 4 +--------------------------------------------------------------------+
fa938177 5 | Copyright CiviCRM LLC (c) 2004-2016 |
6a488035
TO
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">
6a488035 27<div class="action-link">
3bd06df9 28 <div class="crm-submit-buttons">
895d596d 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) ||
58c67511 30 (call_user_func(array('CRM_Core_Permission','check'), 'edit contributions') && $noACL)}
3bd06df9
KJ
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>
aac8c264 36 <i class="crm-i fa-pencil"></i> {ts}Edit{/ts}</span>
3bd06df9 37 </a>
685dc433
PN
38 {if $paymentButtonName}
39 <a class="button" href='{crmURL p="civicrm/payment" q="action=add&reset=1&component=`$component`&id=`$id`&cid=`$cid`"}'><i class="crm-i fa-plus-circle"></i> {ts}{$paymentButtonName}{/ts}</a>
40 {/if}
6a488035 41 {/if}
58c67511 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)}
3bd06df9
KJ
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>
aac8c264 48 <i class="crm-i fa-trash"></i> {ts}Delete{/ts}</span>
3bd06df9 49 </a>
6a488035
TO
50 {/if}
51 {include file="CRM/common/formButtons.tpl" location="top"}
03b412ae 52 {assign var='pdfUrlParams' value="reset=1&id=$id&cid=$contact_id"}
56ed0b01 53 {assign var='emailUrlParams' value="reset=1&id=$id&cid=$contact_id&select=email"}
9ece4458 54 {if $invoicing}
8c779cf8 55 <div class="css_right">
2695a1c9 56 <a class="button no-popup" href="{crmURL p='civicrm/contribute/invoice' q=$pdfUrlParams}">
aac8c264 57 <i class="crm-i fa-print"></i>
9ece4458 58 {if $contribution_status != 'Refunded' && $contribution_status != 'Cancelled' }
6bf96a62
PB
59 {ts}Print Invoice{/ts}</a>
60 {else}
61 {ts}Print Invoice and Credit Note{/ts}</a>
62 {/if}
03b412ae 63 <a class="button" href="{crmURL p='civicrm/contribute/invoice/email' q=$emailUrlParams}">
aac8c264 64 <i class="crm-i fa-paper-plane"></i>
6bf96a62
PB
65 {ts}Email Invoice{/ts}</a>
66 </div>
56ed0b01 67 {/if}
3bd06df9 68 </div>
6a488035
TO
69</div>
70<table class="crm-info-panel">
3bd06df9
KJ
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>
28b46c26 79 {if $displayLineItems}
6a488035 80 <tr>
3bd06df9
KJ
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>
6a488035 89 </tr>
3bd06df9 90 {else}
6a488035 91 <tr>
3bd06df9 92 <td class="label">{ts}Total Amount{/ts}</td>
03a81f5d
E
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;
3bd06df9
KJ
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>
6a488035 103 </tr>
3bd06df9 104 {/if}
6bf96a62 105 {if $invoicing && $tax_amount}
56ed0b01
PB
106 <tr>
107 <td class="label">{ts}Total Tax Amount{/ts}</td>
108 <td>{$tax_amount|crmMoney:$currency}</td>
109 </tr>
110 {/if}
3bd06df9 111 {if $non_deductible_amount}
6a488035 112 <tr>
3bd06df9
KJ
113 <td class="label">{ts}Non-deductible Amount{/ts}</td>
114 <td>{$non_deductible_amount|crmMoney:$currency}</td>
6a488035 115 </tr>
6a488035
TO
116 {/if}
117 {if $fee_amount}
3bd06df9
KJ
118 <tr>
119 <td class="label">{ts}Fee Amount{/ts}</td>
120 <td>{$fee_amount|crmMoney:$currency}</td>
121 </tr>
6a488035
TO
122 {/if}
123 {if $net_amount}
3bd06df9
KJ
124 <tr>
125 <td class="label">{ts}Net Amount{/ts}</td>
126 <td>{$net_amount|crmMoney:$currency}</td>
127 </tr>
6a488035 128 {/if}
46d173ef
PN
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}
6a488035 135 <tr>
3bd06df9
KJ
136 <td class="label">{ts}Received{/ts}</td>
137 <td>{if $receive_date}{$receive_date|crmDate}{else}({ts}not available{/ts}){/if}</td>
6a488035 138 </tr>
3bd06df9
KJ
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}
6a488035 145 <tr>
3bd06df9
KJ
146 <td class="label">{ts}Contribution Status{/ts}</td>
147 <td {if $contribution_status_id eq 3} class="font-red bold"{/if}>{$contribution_status}
6a488035
TO
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}
3bd06df9
KJ
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>
99cdd94d 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>
3bd06df9 167 {/if}
6a488035
TO
168 {/if}
169 <tr>
4db803dd 170 <td class="label">{ts}Payment Method{/ts}</td>
2cc6b631 171 <td>{$payment_instrument}{if $payment_processor_name} ({$payment_processor_name}){/if}</td>
6a488035
TO
172 </tr>
173
174 {if $payment_instrument eq 'Check'|ts}
3bd06df9
KJ
175 <tr>
176 <td class="label">{ts}Check Number{/ts}</td>
177 <td>{$check_number}</td>
178 </tr>
6a488035
TO
179 {/if}
180 <tr>
3bd06df9
KJ
181 <td class="label">{ts}Source{/ts}</td>
182 <td>{$source}</td>
6a488035
TO
183 </tr>
184
185 {if $campaign}
3bd06df9 186 <tr>
6a488035 187 <td class="label">{ts}Campaign{/ts}</td>
3bd06df9
KJ
188 <td>{$campaign}</td>
189 </tr>
6a488035
TO
190 {/if}
191
192 {if $contribution_page_title}
3bd06df9
KJ
193 <tr>
194 <td class="label">{ts}Online Contribution Page{/ts}</td>
195 <td>{$contribution_page_title}</td>
196 </tr>
197 {/if}
6a488035 198 {if $receipt_date}
3bd06df9
KJ
199 <tr>
200 <td class="label">{ts}Receipt Sent{/ts}</td>
201 <td>{$receipt_date|crmDate}</td>
202 </tr>
6a488035
TO
203 {/if}
204 {foreach from=$note item="rec"}
205 {if $rec }
3bd06df9
KJ
206 <tr>
207 <td class="label">{ts}Note{/ts}</td>
208 <td>{$rec}</td>
209 </tr>
6a488035
TO
210 {/if}
211 {/foreach}
212
213 {if $trxn_id}
3bd06df9
KJ
214 <tr>
215 <td class="label">{ts}Transaction ID{/ts}</td>
216 <td>{$trxn_id}</td>
217 </tr>
6a488035
TO
218 {/if}
219
220 {if $invoice_id}
3bd06df9
KJ
221 <tr>
222 <td class="label">{ts}Invoice ID{/ts}</td>
223 <td>{$invoice_id}&nbsp;</td>
224 </tr>
6a488035
TO
225 {/if}
226
6a488035 227 {if $thankyou_date}
3bd06df9
KJ
228 <tr>
229 <td class="label">{ts}Thank-you Sent{/ts}</td>
230 <td>{$thankyou_date|crmDate}</td>
231 </tr>
6a488035 232 {/if}
685dc433 233 {if $addRecordPayment}
f862cea0
PN
234 <tr>
235 <td class='label'>{ts}Fees{/ts}</td>
236 <td id='payment-info'></td>
237 </tr>
238 {/if}
2020b311 239</table>
6a488035 240
b6545333 241{if count($softContributions)} {* We show soft credit name with PCP section if contribution is linked to a PCP. *}
48762c66 242 <div class="crm-accordion-wrapper crm-soft-credit-pane">
3bd06df9
KJ
243 <div class="crm-accordion-header">
244 {ts}Soft Credit{/ts}
2020b311 245 </div>
3bd06df9 246 <div class="crm-accordion-body">
48762c66 247 <table class="crm-info-panel crm-soft-credit-listing">
b6545333 248 {foreach from=$softContributions item="softCont"}
7ccf8829
KJ
249 <tr>
250 <td>
251 <a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$softCont.contact_id`"}"
48762c66 252 title="{ts}View contact record{/ts}">{$softCont.contact_name}
7ccf8829
KJ
253 </a>
254 </td>
51fa20cb 255 <td>{$softCont.amount|crmMoney:$currency}
256 {if $softCont.soft_credit_type_label}
257 ({$softCont.soft_credit_type_label})
258 {/if}
259 </td>
7ccf8829 260 </tr>
3bd06df9
KJ
261 {/foreach}
262 </table>
263 </div>
264 </div>
265{/if}
6a488035
TO
266
267{if $premium}
3bd06df9
KJ
268 <div class="crm-accordion-wrapper ">
269 <div class="crm-accordion-header">
270 {ts}Premium Information{/ts}
271 </div>
272 <div class="crm-accordion-body">
273 <table class="crm-info-panel">
274 <td class="label">{ts}Premium{/ts}</td>
275 <td>{$premium}</td>
276 <td class="label">{ts}Option{/ts}</td>
277 <td>{$option}</td>
278 <td class="label">{ts}Fulfilled{/ts}</td>
279 <td>{$fulfilled|truncate:10:''|crmDate}</td>
280 </table>
6a488035 281 </div>
3bd06df9 282 </div>
6a488035
TO
283{/if}
284
285{if $pcp_id}
3bd06df9
KJ
286 <div id='PCPView' class="crm-accordion-wrapper ">
287 <div class="crm-accordion-header">
288 {ts}Personal Campaign Page Contribution Information{/ts}
6a488035 289 </div>
3bd06df9
KJ
290 <div class="crm-accordion-body">
291 <table class="crm-info-panel">
292 <tr>
293 <td class="label">{ts}Personal Campaign Page{/ts}</td>
b6545333 294 <td><a href="{crmURL p="civicrm/pcp/info" q="reset=1&id=`$pcp_id`"}">{$pcp_title}</a><br/>
3bd06df9
KJ
295 <span class="description">{ts}Contribution was made through this personal campaign page.{/ts}</span>
296 </td>
297 </tr>
298 <tr>
299 <td class="label">{ts}Soft Credit To{/ts}</td>
b6545333 300 <td><a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$pcp_soft_credit_to_id`"}" id="view_contact"
301 title="{ts}View contact record{/ts}">{$pcp_soft_credit_to_name}</a></td>
3bd06df9
KJ
302 </tr>
303 <tr>
304 <td class="label">{ts}In Public Honor Roll?{/ts}</td>
305 <td>{if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td>
306 </tr>
307 {if $pcp_roll_nickname}
308 <tr>
309 <td class="label">{ts}Honor Roll Name{/ts}</td>
310 <td>{$pcp_roll_nickname}</td>
311 </tr>
312 {/if}
313 {if $pcp_personal_note}
314 <tr>
315 <td class="label">{ts}Personal Note{/ts}</td>
316 <td>{$pcp_personal_note}</td>
317 </tr>
318 {/if}
319 </table>
320 </div>
321 </div>
6a488035
TO
322{/if}
323
324{include file="CRM/Custom/Page/CustomDataView.tpl"}
325
326{if $billing_address}
3bd06df9
KJ
327 <fieldset>
328 <legend>{ts}Billing Address{/ts}</legend>
329 <div class="form-item">
330 {$billing_address|nl2br}
331 </div>
332 </fieldset>
6a488035 333{/if}
685dc433
PN
334{if $addRecordPayment}
335 {include file="CRM/Contribute/Page/PaymentInfo.tpl" show='payments'}
f862cea0 336{/if}
6a488035
TO
337
338<div class="crm-submit-buttons">
895d596d 339 {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) ||
58c67511 340 (call_user_func(array('CRM_Core_Permission','check'), 'edit contributions') && $noACL)}
3bd06df9
KJ
341 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
342 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
343 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
6a488035 344 {/if}
aac8c264 345 <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>
685dc433
PN
346 {if $paymentButtonName}
347 <a class="button" href='{crmURL p="civicrm/payment" q="action=add&reset=1&component=`$component`&id=`$id`&cid=`$cid`"}'><i class="crm-i fa-plus-circle"></i> {ts}{$paymentButtonName}{/ts}</a>
348 {/if}
3bd06df9 349 {/if}
58c67511 350 {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)}
3bd06df9
KJ
351 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
352 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
353 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
6a488035 354 {/if}
aac8c264 355 <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>
3bd06df9
KJ
356 {/if}
357 {include file="CRM/common/formButtons.tpl" location="bottom"}
6a488035
TO
358</div>
359</div>
03a81f5d 360{crmScript file='js/crm.expandRow.js'}