Explicitly retrieve label for contributionStatus (no change in behaviour)
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Sun, 6 Oct 2019 17:21:41 +0000 (19:21 +0200)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Sun, 6 Oct 2019 17:24:05 +0000 (19:24 +0200)
CRM/Contribute/BAO/Contribution.php
CRM/Report/Form/Contact/Detail.php
CRM/Report/Form/Contribute/HouseholdSummary.php
CRM/Report/Form/Contribute/OrganizationSummary.php

index 1f6047f9a3c49107f2fe236033393be9f2de965b..5159380fde1442d30eefbb48e7d4905043b06f92 100644 (file)
@@ -1634,7 +1634,7 @@ GROUP BY p.id
         $params[$contributionDAO->id]['amount'] = CRM_Utils_Money::format($contributionDAO->total_amount, $contributionDAO->currency);
         $params[$contributionDAO->id]['source'] = $contributionDAO->source;
         $params[$contributionDAO->id]['receive_date'] = $contributionDAO->receive_date;
-        $params[$contributionDAO->id]['contribution_status'] = CRM_Contribute_PseudoConstant::contributionStatus($contributionDAO->contribution_status_id);
+        $params[$contributionDAO->id]['contribution_status'] = CRM_Contribute_PseudoConstant::contributionStatus($contributionDAO->contribution_status_id, 'label');
       }
     }
 
index 5b8512748eb426d8c3f504c7dc237bbf920aaf6c..4ed4723298a4059e59c764514be38006f89612cf 100644 (file)
@@ -861,7 +861,7 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form {
             }
 
             if ($val = CRM_Utils_Array::value('civicrm_contribution_contribution_status_id', $row)) {
-              $componentRows[$contactID][$component][$rowNum]['civicrm_contribution_contribution_status_id'] = CRM_Contribute_PseudoConstant::contributionStatus($val);
+              $componentRows[$contactID][$component][$rowNum]['civicrm_contribution_contribution_status_id'] = CRM_Contribute_PseudoConstant::contributionStatus($val, 'label');
             }
             $entryFound = TRUE;
           }
index bed14f6bb6e9d57171f0fa63d8dfe824a6c8161f..8b300a0cbbccc331a999b41171dc067b7fa80230 100644 (file)
@@ -491,7 +491,7 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form {
 
       if (array_key_exists('civicrm_contribution_contribution_status_id', $row)) {
         if ($value = $row['civicrm_contribution_contribution_status_id']) {
-          $rows[$rowNum]['civicrm_contribution_contribution_status_id'] = CRM_Contribute_PseudoConstant::contributionStatus($value);
+          $rows[$rowNum]['civicrm_contribution_contribution_status_id'] = CRM_Contribute_PseudoConstant::contributionStatus($value, 'label');
         }
       }
 
index 6a670fad5f8f56e63b31020ebc9b1882530d9977..92d98e2521122ced15bb28065f7711ffd8f03f83 100644 (file)
@@ -500,7 +500,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form {
 
       if (array_key_exists('civicrm_contribution_contribution_status_id', $row)) {
         if ($value = $row['civicrm_contribution_contribution_status_id']) {
-          $rows[$rowNum]['civicrm_contribution_contribution_status_id'] = CRM_Contribute_PseudoConstant::contributionStatus($value);
+          $rows[$rowNum]['civicrm_contribution_contribution_status_id'] = CRM_Contribute_PseudoConstant::contributionStatus($value, 'label');
         }
       }