From f1fc3638556b83ad84cc65ee31c5931e2430356c Mon Sep 17 00:00:00 2001 From: jagrutiP Date: Mon, 20 Apr 2015 15:37:45 +0530 Subject: [PATCH] Receive date is missing when contribution with pay later.CRM-16317 ---------------------------------------- * CRM-16317: Receive date is missing when contribution with pay later https://issues.civicrm.org/jira/browse/CRM-16317 --- CRM/Contribute/BAO/Contribution/Utils.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution/Utils.php b/CRM/Contribute/BAO/Contribution/Utils.php index 2f5772729e..b487eda352 100644 --- a/CRM/Contribute/BAO/Contribution/Utils.php +++ b/CRM/Contribute/BAO/Contribution/Utils.php @@ -98,8 +98,12 @@ class CRM_Contribute_BAO_Contribution_Utils { } //fix for CRM-2062 - $now = date('YmdHis'); + //fix for CRM-16317 + $now = $form->_params['receive_date'] = date('YmdHis'); + $form->assign('receive_date', + CRM_Utils_Date::mysqlToIso($form->_params['receive_date']) + ); $result = NULL; if ($form->_contributeMode == 'notify' || $isPayLater @@ -125,7 +129,6 @@ class CRM_Contribute_BAO_Contribution_Utils { $form->_params['contributionTypeID'] = $contributionTypeId; $form->_params['item_name'] = $form->_params['description']; - $form->_params['receive_date'] = $now; if ($contribution && $form->_values['is_recur'] && $contribution->contribution_recur_id @@ -290,12 +293,8 @@ class CRM_Contribute_BAO_Contribution_Utils { if ($result) { $form->_params = array_merge($form->_params, $result); } - $form->_params['receive_date'] = $now; $form->set('params', $form->_params); $form->assign('trxn_id', CRM_Utils_Array::value('trxn_id', $result)); - $form->assign('receive_date', - CRM_Utils_Date::mysqlToIso($form->_params['receive_date']) - ); // result has all the stuff we need // lets archive it to a financial transaction -- 2.25.1