From: Sudha Bisht Date: Wed, 6 May 2015 09:16:09 +0000 (+0530) Subject: Fix for contribution time X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=53f568807bfe32f35ab302f3cad63c56eb8b8b55;p=civicrm-core.git Fix for contribution time --- diff --git a/CRM/Event/Form/EventFees.php b/CRM/Event/Form/EventFees.php index 6eb0b51ad7..0fe1414044 100644 --- a/CRM/Event/Form/EventFees.php +++ b/CRM/Event/Form/EventFees.php @@ -117,7 +117,7 @@ class CRM_Event_Form_EventFees { $defaults[$form->_pId]['receipt_text'] = $details[$form->_eventId]['confirm_email_text']; } - list($defaults[$form->_pId]['receive_date']) = CRM_Utils_Date::setDateDefaults(); + list($defaults[$form->_pId]['receive_date'], $defaults[$form->_pId]['receive_date_time']) = CRM_Utils_Date::setDateDefaults(); } //CRM-11601 we should keep the record contribution @@ -423,7 +423,7 @@ SELECT id, html_type array('' => ts('- select -')) + CRM_Contribute_PseudoConstant::financialType() ); - $form->addDate('receive_date', ts('Received'), FALSE, array('formatType' => 'activityDate')); + $form->addDateTime('receive_date', ts('Received'), FALSE, array('formatType' => 'activityDateTime')); $form->add('select', 'payment_instrument_id', ts('Paid By'), diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index f740dd7a32..3afc3d1820 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1050,7 +1050,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment unset($params['amount']); } $params['register_date'] = CRM_Utils_Date::processDate($params['register_date'], $params['register_date_time']); - $params['receive_date'] = CRM_Utils_Date::processDate(CRM_Utils_Array::value('receive_date', $params)); + $params['receive_date'] = CRM_Utils_Date::processDate(CRM_Utils_Array::value('receive_date', $params), CRM_Utils_Array::value('receive_date_time', $params)); $params['contact_id'] = $this->_contactId; // overwrite actual payment amount if entered