From 74db66152d7c37934e6808e4779c5f502bf456b3 Mon Sep 17 00:00:00 2001 From: nishant-bhorodia Date: Thu, 27 Aug 2015 18:24:52 +0530 Subject: [PATCH] PG-107 --- .../Report/Form/Contribute/GiftAid.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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