diff --git a/CRM/Contribute/Form/AdditionalInfo.php b/CRM/Contribute/Form/AdditionalInfo.php index e6423b02f462..d8b6b5ff7fd3 100644 --- a/CRM/Contribute/Form/AdditionalInfo.php +++ b/CRM/Contribute/Form/AdditionalInfo.php @@ -96,7 +96,7 @@ public static function buildAdditionalDetail(&$form) { $attributes = CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Contribution'); - $form->addDateTime('thankyou_date', ts('Thank-you Sent'), FALSE, array('formatType' => 'activityDateTime')); + $form->addField('thankyou_date', array('entity' => 'contribution'), FALSE, FALSE); // add various amounts $nonDeductAmount = &$form->add('text', 'non_deductible_amount', ts('Non-deductible Amount'), diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 89bb290064e3..a9c18b80c482 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -203,6 +203,13 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP */ protected $statusMessageTitle; + /** + * Explicitly declare the form context. + */ + public function getDefaultContext() { + return 'create'; + } + /** * Set variables up before form is built. */ @@ -418,28 +425,11 @@ public function setDefaultValues() { else { $defaults['refund_trxn_id'] = isset($defaults['trxn_id']) ? $defaults['trxn_id'] : NULL; } - $dates = array( - 'receive_date', - 'receipt_date', - 'cancel_date', - 'thankyou_date', - ); - foreach ($dates as $key) { - if (!empty($defaults[$key])) { - list($defaults[$key], $defaults[$key . '_time']) - = CRM_Utils_Date::setDateDefaults(CRM_Utils_Array::value($key, $defaults), 'activityDateTime'); - } - } if (!$this->_id && empty($defaults['receive_date'])) { - list($defaults['receive_date'], - $defaults['receive_date_time'] - ) = CRM_Utils_Date::setDateDefaults(NULL, 'activityDateTime'); + $defaults['receive_date'] = date('Y-m-d H:i:s'); } - $this->assign('receive_date', CRM_Utils_Date::processDate(CRM_Utils_Array::value('receive_date', $defaults), - CRM_Utils_Array::value('receive_date_time', $defaults) - )); $currency = CRM_Utils_Array::value('currency', $defaults); $this->assign('currency', $currency); // Hack to get currency info to the js layer. CRM-11440. @@ -698,15 +688,14 @@ public function buildQuickForm() { } // add various dates - $this->addDateTime('receive_date', ts('Received'), FALSE, array('formatType' => 'activityDateTime')); + $this->addField('receive_date', array('entity' => 'contribution'), FALSE, FALSE); + $this->addField('receipt_date', array('entity' => 'contribution'), FALSE, FALSE); + $this->addField('cancel_date', array('entity' => 'contribution', 'label' => ts('Cancelled / Refunded Date')), FALSE, FALSE); if ($this->_online) { $this->assign('hideCalender', TRUE); } - $this->addDateTime('receipt_date', ts('Receipt Date'), FALSE, array('formatType' => 'activityDateTime')); - $this->addDateTime('cancel_date', ts('Cancelled / Refunded Date'), FALSE, array('formatType' => 'activityDateTime')); - $this->add('textarea', 'cancel_reason', ts('Cancellation / Refund Reason'), $attributes['cancel_reason']); $totalAmount = NULL; @@ -1082,13 +1071,6 @@ protected function processCreditCard($submittedValues, $lineItem, $contactID) { CRM_Core_Config::singleton()->defaultCurrency ); - if (!empty($this->_params['receive_date'])) { - $this->_params['receive_date'] = CRM_Utils_Date::processDate($this->_params['receive_date'], $this->_params['receive_date_time']); - } - else { - $this->_params['receive_date'] = $now; - } - $this->_params['pcp_display_in_roll'] = CRM_Utils_Array::value('pcp_display_in_roll', $params); $this->_params['pcp_roll_nickname'] = CRM_Utils_Array::value('pcp_roll_nickname', $params); $this->_params['pcp_personal_note'] = CRM_Utils_Array::value('pcp_personal_note', $params); @@ -1134,11 +1116,6 @@ protected function processCreditCard($submittedValues, $lineItem, $contactID) { if (!empty($this->_params['is_email_receipt'])) { $this->_params['receipt_date'] = $now; } - else { - $this->_params['receipt_date'] = CRM_Utils_Date::processDate($this->_params['receipt_date'], - $params['receipt_date_time'], TRUE - ); - } $this->set('params', $this->_params); @@ -1311,10 +1288,9 @@ protected function generatePane($type, $defaults) { public function testSubmit($params, $action, $creditCardMode = NULL) { $defaults = array( 'soft_credit_contact_id' => array(), + 'receive_date' => date('Y-m-d H:i:s'), 'receipt_date' => '', - 'receipt_date_time' => '', 'cancel_date' => '', - 'cancel_date_time' => '', 'hidden_Premium' => 1, ); $this->_bltID = 5; @@ -1608,17 +1584,6 @@ protected function submit($submittedValues, $action, $pledgePaymentID) { '01-' . implode('-', $formValues['revenue_recognition_date']) ); } - $dates = array( - 'receive_date', - 'receipt_date', - 'cancel_date', - ); - - foreach ($dates as $d) { - if (isset($formValues[$d])) { - $params[$d] = CRM_Utils_Date::processDate($formValues[$d], CRM_Utils_Array::value($d . '_time', $formValues), TRUE); - } - } if (!empty($formValues['is_email_receipt'])) { $params['receipt_date'] = date("Y-m-d"); diff --git a/api/v3/examples/ContributionPage/Submit.php b/api/v3/examples/ContributionPage/Submit.php index c24c4dbcb393..a1d8932776c8 100644 --- a/api/v3/examples/ContributionPage/Submit.php +++ b/api/v3/examples/ContributionPage/Submit.php @@ -26,8 +26,8 @@ function contribution_page_submit_example() { ), 'cvv2' => 123, 'pledge_id' => '1', - 'cid' => '77', - 'contact_id' => '77', + 'cid' => '83', + 'contact_id' => '83', 'amount' => '100', 'is_pledge' => TRUE, 'pledge_block_id' => 2, diff --git a/templates/CRM/Contribute/Form/AdditionalInfo/AdditionalDetail.tpl b/templates/CRM/Contribute/Form/AdditionalInfo/AdditionalDetail.tpl index d0dced90077a..22739276db97 100644 --- a/templates/CRM/Contribute/Form/AdditionalInfo/AdditionalDetail.tpl +++ b/templates/CRM/Contribute/Form/AdditionalInfo/AdditionalDetail.tpl @@ -40,7 +40,7 @@ {ts}Unique internal reference ID for this contribution.{/ts} {$form.creditnote_id.label}{$form.creditnote_id.html}
{ts}Unique internal Credit Note ID for this contribution.{/ts} - {$form.thankyou_date.label}{include file="CRM/common/jcalendar.tpl" elementName=thankyou_date}
+ {$form.thankyou_date.label}{$form.thankyou_date.html}
{ts}Date that a thank-you message was sent to the contributor.{/ts} diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl index 8d7d73fd9852..55fef650d6dc 100644 --- a/templates/CRM/Contribute/Form/Contribution.tpl +++ b/templates/CRM/Contribute/Form/Contribution.tpl @@ -139,7 +139,7 @@ {if $contributionMode && $processorSupportsFutureStartDate} {ts}Start Date{/ts} - {if $hideCalender neq true}{include file="CRM/common/jcalendar.tpl" elementName=receive_date}{else}{$receive_date|crmDate}{/if}
+ {if $hideCalender neq true}{$form.receive_date.html}{/if}
{ts}You can set a start date for recurring contributions and the first payment will be on that date. For a single post-dated contribution you must select recurring and choose one installment{/ts} @@ -179,7 +179,7 @@ {$form.cancel_date.label} {if $hideCalendar neq true} - {include file="CRM/common/jcalendar.tpl" elementName=cancel_date} + {$form.cancel_date.html} {else} {$form.cancel_date.value|crmDate} {/if} @@ -203,7 +203,7 @@ {$form.receive_date.label} - {include file="CRM/common/jcalendar.tpl" elementName=receive_date}
+ {$form.receive_date.html}
{ts}The date this contribution was received.{/ts} @@ -235,7 +235,7 @@ {$form.receipt_date.label} - {include file="CRM/common/jcalendar.tpl" elementName=receipt_date}
+ {$form.receipt_date.html}
{ts}Date that a receipt was sent to the contributor.{/ts} diff --git a/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php b/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php index 847e710196c3..8ff2a2021e74 100644 --- a/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php @@ -1203,8 +1203,6 @@ public function createContributionWithTax() { $form->testSubmit(array( 'total_amount' => 100, 'financial_type_id' => $financialType['id'], - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $contactId, 'contribution_status_id' => 1, 'price_set_id' => 0, diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php index 68d96949e56c..005ca08bf482 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php @@ -149,8 +149,6 @@ public function testSubmit() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -168,8 +166,6 @@ public function testSubmitCreditCard() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -195,8 +191,6 @@ public function testSubmitCreditCardPayPal() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'contribution_status_id' => 1, 'credit_card_number' => 4444333322221111, @@ -267,8 +261,6 @@ public function testSubmitCreditCardWithEmailReceipt() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'contribution_status_id' => 1, 'credit_card_number' => 4444333322221111, @@ -332,8 +324,6 @@ public function testSubmitCreditCardNoReceipt() { $form->testSubmit(array( 'total_amount' => 60, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'contribution_status_id' => 1, 'credit_card_number' => 4444333322221111, @@ -393,8 +383,6 @@ public function testSubmitCreditCardFee() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -446,8 +434,6 @@ public function testSubmitCreditCardFullyDeductible() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -506,8 +492,6 @@ public function testSubmitCreditCardInvalid() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), 'payment_processor_id' => $this->paymentProcessorID, @@ -546,8 +530,6 @@ public function testSubmitCreditCardWithBillingAddress() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), 'payment_processor_id' => $this->paymentProcessorID, @@ -572,7 +554,7 @@ public function testSubmitCreditCardWithBillingAddress() { */ public function testSubmitCreditCardWithRecur() { $form = new CRM_Contribute_Form_Contribution(); - $receiveDate = date('m/d/Y', strtotime('+1 month')); + $receiveDate = date('Y-m-d H:i:s', strtotime('+1 month')); $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, @@ -581,7 +563,6 @@ public function testSubmitCreditCardWithRecur() { 'frequency_unit' => 'month', 'installments' => 2, 'receive_date' => $receiveDate, - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), 'payment_processor_id' => $this->paymentProcessorID, @@ -592,7 +573,7 @@ public function testSubmitCreditCardWithRecur() { 'live' ); $contribution = $this->callAPISuccessGetSingle('Contribution', array('return' => 'receive_date')); - $this->assertEquals(date("m/d/Y", strtotime($contribution['receive_date'])), $receiveDate); + $this->assertEquals($contribution['receive_date'], $receiveDate); } /** @@ -603,8 +584,6 @@ public function testSubmitCreditCardWithNoBillingAddress() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), 'payment_processor_id' => $this->paymentProcessorID, @@ -630,8 +609,6 @@ public function testSubmitEmailReceipt() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'is_email_receipt' => TRUE, 'from_email_address' => 'test@test.com', @@ -688,8 +665,6 @@ public function testEmailReceiptOnPayLater() { $params = array( 'total_amount' => 100, 'financial_type_id' => $donationFT, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'is_email_receipt' => TRUE, 'from_email_address' => 'test@test.com', @@ -746,8 +721,6 @@ public function testUpdatePledge() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'pledge_payment_id' => $pledgePaymentID, @@ -768,8 +741,6 @@ public function testPremiumUpdate() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -797,8 +768,6 @@ public function testPremiumUpdateCreditCard() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -829,8 +798,6 @@ public function testSubmitWithNote() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -851,8 +818,6 @@ public function testSubmitWithNoteCreditCard() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -876,8 +841,6 @@ public function testEnterNegativeContribution() { $form->testSubmit(array( 'total_amount' => -5, 'financial_type_id' => 1, - 'receive_date' => '04/24/2016', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -900,8 +863,6 @@ public function testSubmitUpdate() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -913,8 +874,6 @@ public function testSubmitUpdate() { 'total_amount' => 45, 'net_amount' => 45, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -943,8 +902,6 @@ public function testSubmitUpdateChangePaymentInstrument() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'check_number' => '123AX', @@ -957,8 +914,6 @@ public function testSubmitUpdateChangePaymentInstrument() { 'total_amount' => 50, 'net_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), 'card_type_id' => CRM_Core_PseudoConstant::getKey('CRM_Financial_DAO_FinancialTrxn', 'card_type_id', 'Visa'), @@ -1014,8 +969,6 @@ public function testPartialPaymentWithCreditCard() { array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'check_number' => substr(sha1(rand()), 0, 7), @@ -1035,8 +988,6 @@ public function testPartialPaymentWithCreditCard() { 'total_amount' => 50, 'currency' => 'USD', 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit card', $this->paymentInstruments), 'payment_processor_id' => $this->paymentProcessorID, @@ -1066,8 +1017,6 @@ public function testSubmitSaleTax() { $form->testSubmit(array( 'total_amount' => 100, 'financial_type_id' => $this->_financialTypeId, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -1093,8 +1042,6 @@ public function testSubmitSaleTax() { $form->testSubmit(array( 'id' => $contribution['id'], 'financial_type_id' => 3, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -1118,8 +1065,6 @@ public function testSubmitWithOutSaleTax() { $form->testSubmit(array( 'total_amount' => 100, 'financial_type_id' => 3, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -1279,8 +1224,7 @@ protected function doInitialSubmit() { $form->testSubmit(array( 'total_amount' => 100, 'financial_type_id' => $this->_financialTypeId, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', + 'receive_date' => '2015-04-21 00:00:00', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -1316,8 +1260,6 @@ public function testCardTypeAndPanTruncation() { array( 'total_amount' => 100, 'financial_type_id' => 3, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), 'contribution_status_id' => 1, @@ -1405,8 +1347,6 @@ public function testCardTypeAndPanTruncationLiveMode() { array( 'total_amount' => 50, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'credit_card_number' => 4444333322221111, 'payment_instrument_id' => array_search('Credit Card', $this->paymentInstruments), diff --git a/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php b/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php index a9b56cf00f36..cece2bb61df4 100644 --- a/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php +++ b/tests/phpunit/CRM/Financial/BAO/FinancialItemTest.php @@ -326,8 +326,6 @@ public function testGetPreviousFinancialItemHavingTax($thousandSeparator) { $form->testSubmit(array( 'total_amount' => 100, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $contactId, 'contribution_status_id' => 1, 'price_set_id' => 0, diff --git a/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php b/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php index e68771d13fdf..bbc8cb47b2ee 100644 --- a/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php +++ b/tests/phpunit/CRM/Financial/Form/PaymentEditTest.php @@ -58,9 +58,8 @@ public function testSubmitOnPaymentInstrumentChange() { $form = new CRM_Contribute_Form_Contribution(); $form->testSubmit(array( 'total_amount' => 50, + 'receive_date' => '2015-04-21 23:27:00', 'financial_type_id' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'financial_type_id', 'Donation'), - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualID, 'payment_instrument_id' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'payment_instrument_id', 'Check'), 'check_number' => '123XA', @@ -131,8 +130,6 @@ public function testSubmitOnCheckNumberChange() { $form->testSubmit(array( 'total_amount' => 50, 'financial_type_id' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'financial_type_id', 'Donation'), - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualID, 'payment_instrument_id' => $checkPaymentInstrumentID, 'check_number' => $checkNumber1, diff --git a/tests/phpunit/api/v3/ContributionPageTest.php b/tests/phpunit/api/v3/ContributionPageTest.php index ecaca1a1ddfa..6d462ab2ca08 100644 --- a/tests/phpunit/api/v3/ContributionPageTest.php +++ b/tests/phpunit/api/v3/ContributionPageTest.php @@ -1687,6 +1687,7 @@ public function testSubmitContributionPageWithPriceSetQuantity($thousandSeparato 'last_name' => 'T', 'email' => 'JT@ohcanada.ca', 'is_pay_later' => TRUE, + 'receive_date' => date('Y-m-d H:i:s'), ); // Create PriceSet/PriceField diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index a1455923045f..2102975ec3df 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -2902,8 +2902,6 @@ public function testPendingToCompleteContribution() { 'net_amount' => 20, 'fee_amount' => 0, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $this->_individualId, 'contribution_status_id' => 1, 'billing_middle_name' => '', diff --git a/tests/phpunit/api/v3/MembershipTest.php b/tests/phpunit/api/v3/MembershipTest.php index 3738afe92814..1cc7def0b104 100644 --- a/tests/phpunit/api/v3/MembershipTest.php +++ b/tests/phpunit/api/v3/MembershipTest.php @@ -190,8 +190,6 @@ public function testActivityForCancelledContribution() { $form->testSubmit(array( 'total_amount' => 100, 'financial_type_id' => 1, - 'receive_date' => '04/21/2015', - 'receive_date_time' => '11:27PM', 'contact_id' => $contactId, 'payment_instrument_id' => array_search('Check', $this->paymentInstruments), 'contribution_status_id' => 3,