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

CRM-20990 add contributionStatus to online template #10793

Merged
merged 1 commit into from
Aug 9, 2017
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -4812,6 +4812,7 @@ public static function sendMail(&$input, &$ids, $contributionID, &$values,
if (!$returnMessageText) {
list($values['receipt_from_name'], $values['receipt_from_email']) = self::generateFromEmailAndName($input, $contribution);
}
$values['contribution_status'] = CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $contribution->contribution_status_id);
$return = $contribution->composeMessageArray($input, $ids, $values, $returnMessageText);
// Contribution ID should really always be set. But ?
if (!$returnMessageText && (!isset($input['receipt_update']) || $input['receipt_update']) && empty($contribution->receipt_date)) {
Expand Down
1 change: 1 addition & 0 deletions CRM/Contribute/BAO/ContributionPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ public static function sendMail($contactID, $values, $isTest = FALSE, $returnMes
'receipt_date' => !$values['receipt_date'] ? NULL : date('YmdHis', strtotime($values['receipt_date'])),
'pay_later_receipt' => CRM_Utils_Array::value('pay_later_receipt', $values),
'honor_block_is_active' => CRM_Utils_Array::value('honor_block_is_active', $values),
'contributionStatus' => CRM_Utils_Array::value('contribution_status', $values),
);

if ($contributionTypeId = CRM_Utils_Array::value('financial_type_id', $values)) {
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/api/v3/ContributionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,7 @@ public function testCompleteTransaction() {
'contributeMode:::notify',
'title:::Contribution',
'displayName:::Mr. Anthony Anderson II',
'contributionStatus:::Completed',
));
$mut->stop();
$this->revertTemplateToReservedTemplate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
price:::{$price}
customPre_grouptitle:::{$customPre_grouptitle}
customPost_grouptitle:::{$customPost_grouptitle}
contributionStatus:::{$contributionStatus}
{foreach from=$lineItem item=value key=priceset}
{foreach from=$value item=line}
line.html_type:::{$line.html_type}
Expand Down