From: yashodha Date: Fri, 4 Sep 2015 09:18:41 +0000 (+0530) Subject: CRM-17146: updating the contribution state in finding contriutions does not update... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=59626c7fed3835249bfe7cf7732585a361d3938e;p=civicrm-core.git CRM-17146: updating the contribution state in finding contriutions does not update the receive date ---------------------------------------- * CRM-17146: updating the contribution state in finding contriutions does not update the receive date https://issues.civicrm.org/jira/browse/CRM-17146 --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index f0035ca5ae..861b6494e9 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -4073,8 +4073,7 @@ WHERE con.id = {$contributionId} * @param int $isFirstOrLastRecurringPayment * Deprecated param only used by AuthorizeNetIPN. */ - public static function completeOrder(&$input, &$ids, $objects, $transaction, $recur, $contribution, $isRecurring, - $isFirstOrLastRecurringPayment) { + public static function completeOrder(&$input, &$ids, $objects, $transaction, $recur, $contribution, $isRecurring, $isFirstOrLastRecurringPayment) { $primaryContributionID = isset($contribution->id) ? $contribution->id : $objects['first_contribution']->id; // The previous details are used when calculating line items so keep it before any code that 'does something' if (!empty($contribution->id)) { @@ -4131,6 +4130,10 @@ WHERE con.id = {$contributionId} $values['receipt_from_email'] = $domainValues[1]; } + if (empty($values['receive_date']) && $changeDate) { + $contributionParams['receive_date'] = $changeDate; + } + if ($recurContrib && $recurContrib->id && !isset($input['is_email_receipt'])) { //CRM-13273 - is_email_receipt setting on recurring contribution should take precedence over contribution page setting // but CRM-16124 if $input['is_email_receipt'] is set then that should not be overridden.