From: Pradeep Nayak Date: Wed, 20 Jul 2016 15:29:01 +0000 (+0530) Subject: CRM-16189, updated the docblock and checked isnull for previous recognition date X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c849d761146134d50978f342af72b7bf97ac6a5b;p=civicrm-core.git CRM-16189, updated the docblock and checked isnull for previous recognition date ---------------------------------------- * CRM-16189: Improve support for Accrual Method bookkeeping https://issues.civicrm.org/jira/browse/CRM-16189 --- diff --git a/CRM/Financial/BAO/FinancialAccount.php b/CRM/Financial/BAO/FinancialAccount.php index 3a69abde0e..a71a99eec4 100644 --- a/CRM/Financial/BAO/FinancialAccount.php +++ b/CRM/Financial/BAO/FinancialAccount.php @@ -361,10 +361,13 @@ LIMIT 1"; * with Financial Account * * @param array $params + * Holds submitted formvalues and params from api for updating/adding contribution * * @param int $contributionID + * Contribution ID * * @param obj $form + * Holds form object of CRM_Contribute_Form_Contribution * * @return bool * @@ -375,7 +378,7 @@ LIMIT 1"; } $recognitionDate = CRM_Utils_Array::value('revenue_recognition_date', $params); if (!(!CRM_Utils_System::isNull($recognitionDate) - || ($contributionID && $params['prevContribution']->revenue_recognition_date)) + || ($contributionID && !CRM_Utils_System::isNull($params['prevContribution']->revenue_recognition_date))) ) { return FALSE; }