----------------------------------------
* CRM-16189: Improve support for Accrual Method bookkeeping
https://issues.civicrm.org/jira/browse/CRM-16189
Conflicts:
CRM/Contribute/Form/Contribution.php
$params['prevContribution'] = self::getValues(array('id' => $contributionID), CRM_Core_DAO::$_nullArray, CRM_Core_DAO::$_nullArray);
}
+ // CRM-16189
+ $error = CRM_Financial_BAO_FinancialAccount::checkForValidFinancialType($params, $contributionID);
+ if ($error) {
+ throw new CRM_Core_Exception($error);
+ }
if ($contributionID) {
CRM_Utils_Hook::pre('edit', 'Contribution', $contributionID, $params);
}
) {
$errors['revenue_recognition_date'] = ts('Month and Year are required field for Revenue Recognition.');
}
+ // CRM-16189
+ $errorMessage = CRM_Financial_BAO_FinancialAccount::checkForValidFinancialType($fields, $self->_id, $self);
+ if ($errorMessage) {
+ $errors['financial_type_id'] = $errorMessage;
+ }
$errors = array_merge($errors, $softErrors);
return $errors;
}