From 7bc6b5bb7a003be0bebd9a65d276947d783c5433 Mon Sep 17 00:00:00 2001
From: Coleman Watts
Date: Sat, 1 Aug 2015 11:34:39 -0400
Subject: [PATCH 1/1] CRM-14078 - Consolodate contribution 'Date Received'
field label
---
CRM/Contribute/Form/AdditionalPayment.php | 2 +-
CRM/Core/BAO/UFField.php | 2 +-
CRM/Core/SelectValues.php | 2 +-
CRM/Export/BAO/Export.php | 2 +-
CRM/Report/Form/Contribute/Detail.php | 2 +-
CRM/Report/Form/Member/Detail.php | 2 +-
.../message_templates/pcp_owner_notify_html.tpl | 2 +-
.../message_templates/pcp_owner_notify_text.tpl | 2 +-
templates/CRM/Contribute/Form/Search/Common.tpl | 2 +-
tests/phpunit/WebTest/Contact/SearchbyDateFilterTest.php | 4 ++--
xml/schema/Contribute/Contribution.xml | 3 ++-
.../message_templates/contribution_offline_receipt_html.tpl | 2 +-
.../message_templates/contribution_offline_receipt_text.tpl | 2 +-
.../message_templates/membership_offline_receipt_html.tpl | 2 +-
.../message_templates/membership_offline_receipt_text.tpl | 2 +-
xml/templates/message_templates/pcp_owner_notify_html.tpl | 2 +-
xml/templates/message_templates/pcp_owner_notify_text.tpl | 2 +-
17 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/CRM/Contribute/Form/AdditionalPayment.php b/CRM/Contribute/Form/AdditionalPayment.php
index 05be49a28b..234c3a0c3c 100644
--- a/CRM/Contribute/Form/AdditionalPayment.php
+++ b/CRM/Contribute/Form/AdditionalPayment.php
@@ -287,7 +287,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
$this->add('textarea', 'receipt_text', ts('Confirmation Message'));
// add various dates
- $dateLabel = ($this->_refund) ? ts('Refund Date') : ts('Received Date');
+ $dateLabel = ($this->_refund) ? ts('Refund Date') : ts('Date Received');
$this->addDateTime('trxn_date', $dateLabel, FALSE, array('formatType' => 'activityDateTime'));
if ($this->_contactId && $this->_id) {
diff --git a/CRM/Core/BAO/UFField.php b/CRM/Core/BAO/UFField.php
index 5b6204053c..bcc9ebff73 100644
--- a/CRM/Core/BAO/UFField.php
+++ b/CRM/Core/BAO/UFField.php
@@ -1137,7 +1137,7 @@ SELECT id
),
'receive_date' => array(
'name' => 'receive_date',
- 'title' => ts('Receive Date'),
+ 'title' => ts('Date Received'),
),
'payment_instrument' => array(
'name' => 'payment_instrument',
diff --git a/CRM/Core/SelectValues.php b/CRM/Core/SelectValues.php
index 6c2a9fb538..072dbd4bf4 100644
--- a/CRM/Core/SelectValues.php
+++ b/CRM/Core/SelectValues.php
@@ -553,7 +553,7 @@ class CRM_Core_SelectValues {
'{contribution.fee_amount}' => ts('Fee Amount'),
'{contribution.net_amount}' => ts('Net Amount'),
'{contribution.non_deductible_amount}' => ts('Non-deductible Amount'),
- '{contribution.receive_date}' => ts('Contribution Receive Date'),
+ '{contribution.receive_date}' => ts('Contribution Date Received'),
'{contribution.payment_instrument}' => ts('Payment Instrument'),
'{contribution.trxn_id}' => ts('Transaction ID'),
'{contribution.invoice_id}' => ts('Invoice ID'),
diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php
index 41c83b3081..42d6360b25 100644
--- a/CRM/Export/BAO/Export.php
+++ b/CRM/Export/BAO/Export.php
@@ -2038,7 +2038,7 @@ WHERE {$whereClause}";
$componentPaymentFields = array(
'componentPaymentField_total_amount' => ts('Total Amount'),
'componentPaymentField_contribution_status' => ts('Contribution Status'),
- 'componentPaymentField_received_date' => ts('Received Date'),
+ 'componentPaymentField_received_date' => ts('Date Received'),
'componentPaymentField_payment_instrument' => ts('Payment Instrument'),
'componentPaymentField_transaction_id' => ts('Transaction ID'),
);
diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php
index 72f848fc51..23c7ac944c 100644
--- a/CRM/Report/Form/Contribute/Detail.php
+++ b/CRM/Report/Form/Contribute/Detail.php
@@ -283,7 +283,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form {
'financial_type_id' => array('title' => ts('Financial Type')),
'contribution_status_id' => array('title' => ts('Contribution Status')),
'payment_instrument_id' => array('title' => ts('Payment Instrument')),
- 'receive_date' => array('title' => ts('Receive Date')),
+ 'receive_date' => array('title' => ts('Date Received')),
),
'grouping' => 'contri-fields',
),
diff --git a/CRM/Report/Form/Member/Detail.php b/CRM/Report/Form/Member/Detail.php
index d5fb73c29d..1c6bdbd91d 100644
--- a/CRM/Report/Form/Member/Detail.php
+++ b/CRM/Report/Form/Member/Detail.php
@@ -264,7 +264,7 @@ class CRM_Report_Form_Member_Detail extends CRM_Report_Form {
),
'order_bys' => array(
'receive_date' => array(
- 'title' => ts('Receive Date'),
+ 'title' => ts('Date Received'),
'default_weight' => '2',
'default_order' => 'DESC',
),
diff --git a/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/pcp_owner_notify_html.tpl b/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/pcp_owner_notify_html.tpl
index 78de6adb7c..9e4b6d29d6 100644
--- a/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/pcp_owner_notify_html.tpl
+++ b/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/pcp_owner_notify_html.tpl
@@ -18,7 +18,7 @@
{/if}
- {ts}Receive Date{/ts}: {$receive_date|crmDate}
+ {ts}Received{/ts}: {$receive_date|crmDate}
{ts}Amount{/ts}: {$total_amount|crmMoney:$currency}
{ts}Name{/ts}: {$donors_display_name}
{ts}Email{/ts}: {$donors_email}
diff --git a/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/pcp_owner_notify_text.tpl b/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/pcp_owner_notify_text.tpl
index ea9ae9b2c2..4c7f7841af 100644
--- a/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/pcp_owner_notify_text.tpl
+++ b/CRM/Upgrade/4.7.alpha1.msg_template/message_templates/pcp_owner_notify_text.tpl
@@ -11,7 +11,7 @@
{ts}The donor's name has been added to your honor roll unless they asked not to be included.{/ts}
{/if}
-{ts}Receive Date{/ts}: {$receive_date|crmDate}
+{ts}Received{/ts}: {$receive_date|crmDate}
{ts}Amount{/ts}: {$total_amount|crmMoney:$currency}
diff --git a/templates/CRM/Contribute/Form/Search/Common.tpl b/templates/CRM/Contribute/Form/Search/Common.tpl
index 056b65c142..b06d5ac0b7 100644
--- a/templates/CRM/Contribute/Form/Search/Common.tpl
+++ b/templates/CRM/Contribute/Form/Search/Common.tpl
@@ -24,7 +24,7 @@
+--------------------------------------------------------------------+
*}
-{ts}Contribution Dates{/ts}
+{ts}Date Received{/ts}
{include file="CRM/Core/DateRange.tpl" fieldName="contribution_date" from='_low' to='_high'}
diff --git a/tests/phpunit/WebTest/Contact/SearchbyDateFilterTest.php b/tests/phpunit/WebTest/Contact/SearchbyDateFilterTest.php
index fd378de339..97732afbcb 100644
--- a/tests/phpunit/WebTest/Contact/SearchbyDateFilterTest.php
+++ b/tests/phpunit/WebTest/Contact/SearchbyDateFilterTest.php
@@ -289,7 +289,7 @@ class WebTest_Contact_SearchbyDateFilterTest extends CiviSeleniumTestCase {
'bodyLocator' => 'select#financial_type_id',
'title' => 'Contributions',
'fields' => array(
- 'Contribution Dates' => array(
+ 'Date Received' => array(
'type' => 'select',
'locator' => 'contribution_date_relative',
'values' => array('Today'),
@@ -301,7 +301,7 @@ class WebTest_Contact_SearchbyDateFilterTest extends CiviSeleniumTestCase {
'bodyLocator' => 'select#pledge_payment_date_relative',
'title' => 'Pledges',
'fields' => array(
- 'Contribution Dates' => array(
+ 'Date Received' => array(
'type' => 'select',
'locator' => 'pledge_payment_date_relative',
'values' => array('Prior to Previous Month'),
diff --git a/xml/schema/Contribute/Contribution.xml b/xml/schema/Contribute/Contribution.xml
index e7b166204e..02f271a097 100644
--- a/xml/schema/Contribute/Contribution.xml
+++ b/xml/schema/Contribute/Contribution.xml
@@ -140,11 +140,12 @@
receive_date
+ Date Received
datetime
true
/receive(.?date)?/i
/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/
- when was gift received
+ Date contribution was received - not necessarily the creation date of the record
1.3
Select Date
diff --git a/xml/templates/message_templates/contribution_offline_receipt_html.tpl b/xml/templates/message_templates/contribution_offline_receipt_html.tpl
index af1145a26e..8a840cef62 100644
--- a/xml/templates/message_templates/contribution_offline_receipt_html.tpl
+++ b/xml/templates/message_templates/contribution_offline_receipt_html.tpl
@@ -148,7 +148,7 @@
{if $receive_date}
- {ts}Received Date{/ts}
+ {ts}Date Received{/ts}
{$receive_date|truncate:10:''|crmDate}
diff --git a/xml/templates/message_templates/contribution_offline_receipt_text.tpl b/xml/templates/message_templates/contribution_offline_receipt_text.tpl
index cb3547a089..6b46e34259 100644
--- a/xml/templates/message_templates/contribution_offline_receipt_text.tpl
+++ b/xml/templates/message_templates/contribution_offline_receipt_text.tpl
@@ -47,7 +47,7 @@
{/if}
{ts}Total Amount{/ts} : {$formValues.total_amount|crmMoney:$currency}
{if $receive_date}
-{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
+{ts}Date Received{/ts}: {$receive_date|truncate:10:''|crmDate}
{/if}
{if $receipt_date}
{ts}Receipt Date{/ts}: {$receipt_date|truncate:10:''|crmDate}
diff --git a/xml/templates/message_templates/membership_offline_receipt_html.tpl b/xml/templates/message_templates/membership_offline_receipt_html.tpl
index 2abdab7c54..8d5347a721 100644
--- a/xml/templates/message_templates/membership_offline_receipt_html.tpl
+++ b/xml/templates/message_templates/membership_offline_receipt_html.tpl
@@ -186,7 +186,7 @@
{if $receive_date}
- {ts}Received Date{/ts}
+ {ts}Date Received{/ts}
{$receive_date|truncate:10:''|crmDate}
diff --git a/xml/templates/message_templates/membership_offline_receipt_text.tpl b/xml/templates/message_templates/membership_offline_receipt_text.tpl
index 0254609ceb..7df285af46 100644
--- a/xml/templates/message_templates/membership_offline_receipt_text.tpl
+++ b/xml/templates/message_templates/membership_offline_receipt_text.tpl
@@ -69,7 +69,7 @@
{ts}Amount{/ts}: {$formValues.total_amount|crmMoney}
{if $receive_date}
-{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
+{ts}Date Received{/ts}: {$receive_date|truncate:10:''|crmDate}
{/if}
{if $formValues.paidBy}
{ts}Paid By{/ts}: {$formValues.paidBy}
diff --git a/xml/templates/message_templates/pcp_owner_notify_html.tpl b/xml/templates/message_templates/pcp_owner_notify_html.tpl
index 78de6adb7c..9e4b6d29d6 100644
--- a/xml/templates/message_templates/pcp_owner_notify_html.tpl
+++ b/xml/templates/message_templates/pcp_owner_notify_html.tpl
@@ -18,7 +18,7 @@
{/if}
- {ts}Receive Date{/ts}: {$receive_date|crmDate}
+ {ts}Received{/ts}: {$receive_date|crmDate}
{ts}Amount{/ts}: {$total_amount|crmMoney:$currency}
{ts}Name{/ts}: {$donors_display_name}
{ts}Email{/ts}: {$donors_email}
diff --git a/xml/templates/message_templates/pcp_owner_notify_text.tpl b/xml/templates/message_templates/pcp_owner_notify_text.tpl
index ea9ae9b2c2..4c7f7841af 100644
--- a/xml/templates/message_templates/pcp_owner_notify_text.tpl
+++ b/xml/templates/message_templates/pcp_owner_notify_text.tpl
@@ -11,7 +11,7 @@
{ts}The donor's name has been added to your honor roll unless they asked not to be included.{/ts}
{/if}
-{ts}Receive Date{/ts}: {$receive_date|crmDate}
+{ts}Received{/ts}: {$receive_date|crmDate}
{ts}Amount{/ts}: {$total_amount|crmMoney:$currency}
--
2.25.1