From f0d6e4c56132398a2ef71cabbd1719030e28aac7 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Mon, 31 Oct 2016 18:48:19 +0530 Subject: [PATCH] CRM-19587, donot delete financial account if its present in civicrm_financial_item table ---------------------------------------- * CRM-19587: DB Error when trying to delete FInancial Account https://issues.civicrm.org/jira/browse/CRM-19587 --- CRM/Financial/BAO/FinancialAccount.php | 1 + 1 file changed, 1 insertion(+) diff --git a/CRM/Financial/BAO/FinancialAccount.php b/CRM/Financial/BAO/FinancialAccount.php index af7d05e282..03902b4da8 100644 --- a/CRM/Financial/BAO/FinancialAccount.php +++ b/CRM/Financial/BAO/FinancialAccount.php @@ -144,6 +144,7 @@ class CRM_Financial_BAO_FinancialAccount extends CRM_Financial_DAO_FinancialAcco $dependency = array( array('Core', 'FinancialTrxn', 'to_financial_account_id'), array('Financial', 'FinancialTypeAccount', 'financial_account_id'), + array('Financial', 'FinancialItem', 'financial_account_id'), ); foreach ($dependency as $name) { require_once str_replace('_', DIRECTORY_SEPARATOR, "CRM_" . $name[0] . "_BAO_" . $name[1]) . ".php"; -- 2.25.1