CRM-16189 - Notice Fix #8848
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Tue, 20 Sep 2016 11:46:26 +0000 (17:16 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Tue, 20 Sep 2016 11:46:26 +0000 (17:16 +0530)
CRM/Contribute/BAO/Contribution.php

index 605ef432b2e14c60a8bcc05c5f3f0ef96170d0e7..45ed69e33582405a48cb80b595a04cc276d287a4 100644 (file)
@@ -188,7 +188,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution {
 
     // CRM-16189
     CRM_Financial_BAO_FinancialAccount::checkFinancialTypeHasDeferred($params, $contributionID);
-    if ($contributionID && !empty($params['revenue_recognition_date'])
+    if ($contributionID && !empty($params['revenue_recognition_date']) && !empty($params['prevContribution'])
       && !($contributionStatus[$params['prevContribution']->contribution_status_id] == 'Pending')
       && !self::allowUpdateRevenueRecognitionDate($contributionID)
     ) {