diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 5e5b83431101..5e668527f562 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -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. @@ -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', + $this->getFinancialTypeID() + ); return $this->emailReceipt($this, $formValues, $membership); }