X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContribute%2FPage%2FUserDashboard.php;h=0a4c9f0fe1ced243b317bf9644608a68b5fc01b9;hb=7fc328b34ceee79a202cc896b150c54b84ad03dc;hp=11adcd89e3a21913fb3c0c57630cdecde267071b;hpb=44bc4f0c398b4c64cdd5c7a5000b653e6d281726;p=civicrm-core.git diff --git a/CRM/Contribute/Page/UserDashboard.php b/CRM/Contribute/Page/UserDashboard.php index 11adcd89e3..0a4c9f0fe1 100644 --- a/CRM/Contribute/Page/UserDashboard.php +++ b/CRM/Contribute/Page/UserDashboard.php @@ -48,7 +48,10 @@ class CRM_Contribute_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBo // This is required for tpl logic. We should move away from hard-code this to adding an array of actions to the row // which the tpl can iterate through - this should allow us to cope with competing attempts to add new buttons // and allow extensions to assign new ones through the pageRun hook - if ('Pending' === CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $row['contribution_status_id'])) { + $row['balance_amount'] = CRM_Contribute_BAO_Contribution::getContributionBalance($row['contribution_id']); + $contributionStatus = CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $row['contribution_status_id']); + + if (in_array($contributionStatus, ['Pending', 'Partially paid'])) { $row['buttons']['pay'] = [ 'class' => 'button', 'label' => ts('Pay Now'),