Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
a94dfd5e
Unverified
Commit
a94dfd5e
authored
4 years ago
by
Seamus Lee
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #19405 from eileenmcnaughton/inv
[REF] Minor cleanup on emailReceipt
parents
efbd9747
48b9327c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Member/Form/Membership.php
+7
-11
7 additions, 11 deletions
CRM/Member/Form/Membership.php
with
7 additions
and
11 deletions
CRM/Member/Form/Membership.php
+
7
−
11
View file @
a94dfd5e
...
...
@@ -900,7 +900,6 @@ DESC limit 1");
* @param array $formValues
* @param object $membership
* Object.
* @param array $customValues
*
* @return bool
* true if mail was sent successfully
...
...
@@ -911,7 +910,7 @@ DESC limit 1");
* & needs rationalising.
*
*/
public
static
function
emailReceipt
(
&
$form
,
&
$formValues
,
&
$membership
,
$customValues
=
NULL
)
{
public
static
function
emailReceipt
(
$form
,
&
$formValues
,
$membership
)
{
// retrieve 'from email id' for acknowledgement
$receiptFrom
=
$formValues
[
'from_email_address'
]
??
NULL
;
...
...
@@ -921,8 +920,6 @@ DESC limit 1");
$formValues
[
'paidBy'
]
=
$paymentInstrument
[
$formValues
[
'payment_instrument_id'
]];
}
$form
->
assign
(
'customValues'
,
$customValues
);
if
(
$form
->
_mode
)
{
// @todo move this outside shared code as Batch entry just doesn't
$form
->
assign
(
'address'
,
CRM_Utils_Address
::
getFormattedBillingAddressFieldsFromParameters
(
...
...
@@ -959,13 +956,11 @@ DESC limit 1");
$form
->
assign
(
'receive_date'
,
CRM_Utils_Array
::
value
(
'receive_date'
,
$formValues
));
$form
->
assign
(
'formValues'
,
$formValues
);
if
(
empty
(
$lineItem
))
{
$form
->
assign
(
'mem_start_date'
,
CRM_Utils_Date
::
formatDateOnlyLong
(
$membership
->
start_date
));
if
(
!
CRM_Utils_System
::
isNull
(
$membership
->
end_date
))
{
$form
->
assign
(
'mem_end_date'
,
CRM_Utils_Date
::
formatDateOnlyLong
(
$membership
->
end_date
));
}
$form
->
assign
(
'membership_name'
,
CRM_Member_PseudoConstant
::
membershipType
(
$membership
->
membership_type_id
));
$form
->
assign
(
'mem_start_date'
,
CRM_Utils_Date
::
formatDateOnlyLong
(
$membership
->
start_date
));
if
(
!
CRM_Utils_System
::
isNull
(
$membership
->
end_date
))
{
$form
->
assign
(
'mem_end_date'
,
CRM_Utils_Date
::
formatDateOnlyLong
(
$membership
->
end_date
));
}
$form
->
assign
(
'membership_name'
,
CRM_Member_PseudoConstant
::
membershipType
(
$membership
->
membership_type_id
));
// @todo - if we have to figure out if this is for batch processing it doesn't belong in the shared function.
$isBatchProcess
=
is_a
(
$form
,
'CRM_Batch_Form_Entry'
);
...
...
@@ -1769,8 +1764,9 @@ DESC limit 1");
*/
protected
function
emailMembershipReceipt
(
$formValues
,
$membership
)
{
$customValues
=
$this
->
getCustomValuesForReceipt
(
$formValues
,
$membership
);
$this
->
assign
(
'customValues'
,
$customValues
);
return
self
::
emailReceipt
(
$this
,
$formValues
,
$membership
,
$customValues
);
return
self
::
emailReceipt
(
$this
,
$formValues
,
$membership
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment