From 3b85fc04e9718240605f6bd1a54a5ff08a9a379e Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 4 Sep 2014 02:14:42 +0530 Subject: [PATCH] --CRM-15055, fixed date formatting issue in message template for line-item --- CRM/Member/BAO/Membership.php | 4 ++-- CRM/Member/Form/Membership.php | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index b0833e8e94..030b04de67 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -1327,8 +1327,8 @@ AND civicrm_membership.is_test = %2"; isset($createdMemberships[$priceFieldOp['membership_type_id']]) ) { $membershipOb = $createdMemberships[$priceFieldOp['membership_type_id']]; - $priceFieldOp['start_date'] = $membershipOb->start_date ? CRM_Utils_Date::customFormat($membershipOb->start_date, '%d%f %b, %Y') : '-'; - $priceFieldOp['end_date'] = $membershipOb->end_date ? CRM_Utils_Date::customFormat($membershipOb->end_date, '%d%f %b, %Y') : '-'; + $priceFieldOp['start_date'] = $membershipOb->start_date ? CRM_Utils_Date::customFormat($membershipOb->start_date, '%B %E%f, %Y') : '-'; + $priceFieldOp['end_date'] = $membershipOb->end_date ? CRM_Utils_Date::customFormat($membershipOb->end_date, '%B %E%f, %Y') : '-'; } else { $priceFieldOp['start_date'] = $priceFieldOp['end_date'] = 'N/A'; diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index bf182330c9..cfc3ee010f 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -1639,10 +1639,8 @@ WHERE id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )'; if (!empty($lineItem[$priceSetId])) { foreach ($lineItem[$priceSetId] as & $priceFieldOp) { if (!empty($priceFieldOp['membership_type_id'])) { - $priceFieldOp['start_date'] = $membershipTypeValues[$priceFieldOp['membership_type_id']]['start_date'] ? CRM_Utils_Date::customFormat($membershipTypeValues[$priceFieldOp['membership_type_id']]['start_date'], '%d%f %b, %Y') : '-'; - - - $priceFieldOp['end_date'] = $membershipTypeValues[$priceFieldOp['membership_type_id']]['end_date'] ? CRM_Utils_Date::customFormat($membershipTypeValues[$priceFieldOp['membership_type_id']]['end_date'], '%d%f %b, %Y') : '-'; + $priceFieldOp['start_date'] = $membershipTypeValues[$priceFieldOp['membership_type_id']]['start_date'] ? CRM_Utils_Date::customFormat($membershipTypeValues[$priceFieldOp['membership_type_id']]['start_date'], '%B %E%f, %Y') : '-'; + $priceFieldOp['end_date'] = $membershipTypeValues[$priceFieldOp['membership_type_id']]['end_date'] ? CRM_Utils_Date::customFormat($membershipTypeValues[$priceFieldOp['membership_type_id']]['end_date'], '%B %E%f, %Y') : '-'; } else { $priceFieldOp['start_date'] = $priceFieldOp['end_date'] = 'N/A'; -- 2.25.1