Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tpl assignment to email function #20013

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CRM/Member/Form/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -1072,10 +1072,6 @@ public function submit(): void {
$params['receipt_date'] = $formValues['receive_date'] ?? NULL;
}

//insert financial type name in receipt.
$formValues['contributionType_name'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType',
$this->getFinancialTypeID()
);
}

// process line items, until no previous line items.
Expand Down Expand Up @@ -1600,6 +1596,10 @@ protected function emailMembershipReceipt($formValues, $membership) {
$this->assign('is_pay_later', 0);
$this->assign('isPrimary', 1);
}
//insert financial type name in receipt.
$formValues['contributionType_name'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a general urgh here for the variable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seamuslee001 just hold your nose & look away

$this->getFinancialTypeID()
);
return $this->emailReceipt($this, $formValues, $membership);
}

Expand Down