$this->assign('componentId', $id);
$this->assign('component', 'contribution');
}
+ $this->assignPaymentInfoBlock($id);
}
/**
));
}
+ /**
+ * Assign the values to build the payment info block.
+ *
+ * @todo - this is a bit too much copy & paste from AbstractEditPayment
+ * (justifying on the basis it's 'pretty short' and in a different inheritance
+ * tree. I feel like traits are probably the longer term answer).
+ *
+ * @param int $id
+ *
+ * @return string $title
+ * Block title.
+ */
+ protected function assignPaymentInfoBlock($id) {
+ // component is used in getPaymentInfo primarily to retrieve the contribution id, we
+ // already have that.
+ $paymentInfo = CRM_Contribute_BAO_Contribution::getPaymentInfo($id, 'contribution', TRUE);
+ $title = ts('View Payment');
+ $this->assign('transaction', TRUE);
+ $this->assign('payments', $paymentInfo['transaction']);
+ $this->assign('paymentLinks', $paymentInfo['payment_links']);
+ return $title;
+ }
+
}
{else}
<tr>
<td class="label">{ts}Total Amount{/ts}</td>
- <td><strong><a class="nowrap bold crm-expand-row" title="{ts}view payments{/ts}"
- href="{crmURL p='civicrm/payment' q="view=transaction&component=contribution&action=browse&cid=`$contact_id`&id=`$contribution_id`&selector=1"}">
- {$total_amount|crmMoney:$currency}
- </strong></a>
+ <td><strong>{$total_amount|crmMoney:$currency}</strong>
{if $contribution_recur_id}
<a class="crm-hover-button" href='{crmURL p="civicrm/contact/view/contributionrecur" q="reset=1&id=`$contribution_recur_id`&cid=`$contact_id`&context=contribution"}'>
<strong>{ts}Recurring Contribution{/ts}</strong>
<td>{$thankyou_date|crmDate}</td>
</tr>
{/if}
+ <tr>
+ <td class="label">{ts}Payment Details{/ts}</td>
+ <td>{include file="CRM/Contribute/Form/PaymentInfoBlock.tpl"}</td>
+ </tr>
{if $addRecordPayment}
<tr>
- <td class='label'>{ts}Fees{/ts}</td>
+ <td class='label'>{ts}Payment Summary{/ts}</td>
<td id='payment-info'></td>
</tr>
{/if}
{if $component eq "event"}
<th>{ts}Total Fee(s){/ts}</th>
{else}
- <th>{ts}Contribution Amount(s){/ts}</th>
+ <th>{ts}Contribution Total{/ts}</th>
{/if}
<th class="right">{ts}Total Paid{/ts}</th>
<th class="right">{ts}Balance{/ts}</th>