From 5a9f7af1b9db95b85b1ca63d6bddc1353986e89c Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Wed, 18 Jul 2018 02:05:46 +0530 Subject: [PATCH] dev/financial/issues/28, Financial Account cannot be change to non deductible --- CRM/Financial/Form/FinancialAccount.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CRM/Financial/Form/FinancialAccount.php b/CRM/Financial/Form/FinancialAccount.php index 5b9b8f49c3..1b1eb9e3ac 100644 --- a/CRM/Financial/Form/FinancialAccount.php +++ b/CRM/Financial/Form/FinancialAccount.php @@ -200,7 +200,14 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { if ($this->_action & CRM_Core_Action::UPDATE) { $params['id'] = $this->_id; } - + foreach ([ + 'is_active', + 'is_deductible', + 'is_tax', + 'is_default', + ] as $field) { + $params[$field] = CRM_Utils_Array::value($field, $params, FALSE); + } $financialAccount = CRM_Financial_BAO_FinancialAccount::add($params); CRM_Core_Session::setStatus(ts('The Financial Account \'%1\' has been saved.', array(1 => $financialAccount->name)), ts('Saved'), 'success'); } -- 2.25.1