Fix for financial_type_id not returned on Contribution get
authorSudha Bisht <sudha.bisht@webaccessglobal.com>
Fri, 19 Jun 2015 07:01:21 +0000 (12:31 +0530)
committerSudha Bisht <sudha.bisht@webaccessglobal.com>
Fri, 19 Jun 2015 07:01:21 +0000 (12:31 +0530)
CRM/Contribute/BAO/Query.php

index 4dd1cefc42110c0ebf8031452adc7674a7c7a4b3..29d9641c60c7d036e7af91caaa8561077e4e5d83 100644 (file)
@@ -217,6 +217,11 @@ class CRM_Contribute_BAO_Query {
       $query->_select['contribution_campaign_title'] = "civicrm_campaign.title as contribution_campaign_title";
       $query->_element['contribution_campaign_title'] = $query->_tables['civicrm_campaign'] = 1;
     }
+    //CRM-16116: get financial_type_id
+    if (!empty($query->_returnProperties['financial_type_id'])) {
+      $query->_select['financial_type_id'] = "civicrm_contribution.financial_type_id as financial_type_id";
+      $query->_element['financial_type_id'] = $query->_tables['civicrm_contribution'] = 1;
+    }
     // LCD 716 END
   }