elseif ($field == 'pledge_next_pay_amount') {
$row[$field] = $dao->pledge_next_pay_amount + $dao->pledge_outstanding_amount;
}
- elseif ($field == 'prefix_id' || $field == 'suffix_id' || $field == 'gender_id') {
- if ($field == 'prefix_id') {
- $row[$field] = $dao->individual_prefix;
- }
- elseif ($field == 'suffix_id') {
- $row[$field] = $dao->individual_suffix;
- }
- else {
- $row[$field] = $dao->gender;
- }
+ elseif (in_array(substr($field, 0, -3), array('gender', 'prefix', 'suffix'))) {
+ $row[$field] = CRM_Core_PseudoConstant::getLabel('CRM_Contact_DAO_Contact', $field, $dao->$field);
}
elseif (is_array($value) && $field == 'location') {
// fix header for location type case