-- fixed db reference checks for financial_type_id, CRM-12470
authorPradeep Nayak <pradeep@pradeep.(none)>
Wed, 29 May 2013 09:22:01 +0000 (14:52 +0530)
committerPradeep Nayak <pradeep@pradeep.(none)>
Wed, 29 May 2013 09:22:01 +0000 (14:52 +0530)
----------------------------------------
* CRM-12470: Creating new financial type without AR account leads to unbalanced transactions
  http://issues.civicrm.org/jira/browse/CRM-12470

CRM/Financial/BAO/FinancialType.php

index ebdb005c799cfc51269e7d26552188e98782e01b..f539ad12180ae869d6fa82203e69f96e2acec26e 100644 (file)
@@ -148,6 +148,38 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
           'table'  => 'civicrm_pledge',
           'column' => 'financial_type_id',
         ),
+        array(
+          'table'  => 'civicrm_grant',
+          'column' => 'financial_type_id',
+        ),
+        array(
+          'table'  => 'civicrm_product',
+          'column' => 'financial_type_id',
+        ),
+        array(
+          'table'  => 'civicrm_event',
+          'column' => 'financial_type_id',
+        ),
+        array(
+          'table'  => 'civicrm_premiums_product',
+          'column' => 'financial_type_id',
+        ),
+        array(
+          'table'  => 'civicrm_price_set',
+          'column' => 'financial_type_id',
+        ),
+        array(
+          'table'  => 'civicrm_price_field_value',
+          'column' => 'financial_type_id',
+        ),
+        array(
+          'table'  => 'civicrm_line_item',
+          'column' => 'financial_type_id',
+        ),
+        array(
+          'table'  => 'civicrm_contribution_product ',
+          'column' => 'financial_type_id',
+        ),
       );
 
     $errors = array();