diff --git a/CRM/Civigiftaid/Report/Form/Contribute/GiftAid.php b/CRM/Civigiftaid/Report/Form/Contribute/GiftAid.php index ae5773f..18e423e 100644 --- a/CRM/Civigiftaid/Report/Form/Contribute/GiftAid.php +++ b/CRM/Civigiftaid/Report/Form/Contribute/GiftAid.php @@ -339,6 +339,22 @@ public function alterDisplay(&$rows) { $entryFound = TRUE; } + + // handle State/Province Codes + if (array_key_exists('civicrm_address_state_province_id', $row)) { + if ($value = $row['civicrm_address_state_province_id']) { + $rows[$rowNum]['civicrm_address_state_province_id'] = CRM_Core_PseudoConstant::stateProvince($value, FALSE); + } + $entryFound = TRUE; + } + + // handle Country Codes + if (array_key_exists('civicrm_address_country_id', $row)) { + if ($value = $row['civicrm_address_country_id']) { + $rows[$rowNum]['civicrm_address_country_id'] = CRM_Core_PseudoConstant::country($value, FALSE); + } + $entryFound = TRUE; + } // skip looking further in rows, if first row itself doesn't // have the column we need