Skip to content
Snippets Groups Projects
Commit 1013a61f authored by Pradeep Nayak's avatar Pradeep Nayak
Browse files

-- fixed status msg for CRM-12492

----------------------------------------
* CRM-12492: Prevent deletion of last AR financial account, and of A/R relationship for Financial Type
  http://issues.civicrm.org/jira/browse/CRM-12492
parent 20b8e461
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
&& !CRM_Financial_BAO_FinancialAccount::getARAccounts($this->_id, array_search('Asset', $financialAccountType))) {
$this->_isARFlag = TRUE;
if ($this->_action & CRM_Core_Action::DELETE) {
CRM_Core_Session::setStatus(ts("Financial account with 'AR' account cannot be deleted."),
CRM_Core_Session::setStatus(ts("The selected financial account cannot be deleted because least one Accounts Receivable type account is required (to ensure that accounting transactions are in balance)."),
'', 'error');
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/financial/financialAccount',
"reset=1&action=browse"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment