From 48f50324642fa04a915b8930ad1e2e456f751266 Mon Sep 17 00:00:00 2001 From: Elliott Eggleston Date: Mon, 8 Aug 2016 14:27:48 -0400 Subject: [PATCH] Check the right next_sched dates for update Need to look at $existing, not $params. --- CRM/Contribute/BAO/ContributionRecur.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contribute/BAO/ContributionRecur.php b/CRM/Contribute/BAO/ContributionRecur.php index 99c49a2f5a..70ad805aff 100644 --- a/CRM/Contribute/BAO/ContributionRecur.php +++ b/CRM/Contribute/BAO/ContributionRecur.php @@ -861,7 +861,7 @@ INNER JOIN civicrm_contribution con ON ( con.id = mp.contribution_id ) else { // Only update next sched date if it's empty or 'just now' because payment processors may be managing // the scheduled date themselves as core did not previously provide any help. - if (empty($params['next_sched_contribution_date']) || strtotime($params['next_sched_contribution_date']) == + if (empty($existing['next_sched_contribution_date']) || strtotime($existing['next_sched_contribution_date']) == strtotime(date('Y-m-d'))) { $params['next_sched_contribution_date'] = date('Y-m-d', strtotime('+' . $existing['frequency_interval'] . ' ' . $existing['frequency_unit'])); } -- 2.25.1