From 43f77a2cab8c48b1285ddf5e8ab3b1d1211b46e3 Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 30 Oct 2015 14:38:37 +0530 Subject: [PATCH] CRM-17461: Contribution Batch Entry : eNotices and invalid / missing receipt data ---------------------------------------- * CRM-17461: Contribution Batch Entry : eNotices and invalid / missing receipt data https://issues.civicrm.org/jira/browse/CRM-17461 --- CRM/Batch/Form/Entry.php | 3 +++ CRM/Contribute/Form/AdditionalInfo.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index 627ff79cc6..6ae267597a 100755 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -596,6 +596,9 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { $domainEmail = "$domainEmail[0] <$domainEmail[1]>"; $value['from_email_address'] = $domainEmail; $value['contribution_id'] = $contribution->id; + if (!empty($value['soft_credit'])) { + $value = array_merge($value, CRM_Contribute_BAO_ContributionSoft::getSoftContribution($contribution->id)); + } CRM_Contribute_Form_AdditionalInfo::emailReceipt($this, $value); } } diff --git a/CRM/Contribute/Form/AdditionalInfo.php b/CRM/Contribute/Form/AdditionalInfo.php index ffe5793052..910772dcbf 100644 --- a/CRM/Contribute/Form/AdditionalInfo.php +++ b/CRM/Contribute/Form/AdditionalInfo.php @@ -337,6 +337,9 @@ class CRM_Contribute_Form_AdditionalInfo { if (!empty($params['payment_instrument_id'])) { $paymentInstrument = CRM_Contribute_PseudoConstant::paymentInstrument(); $params['paidBy'] = $paymentInstrument[$params['payment_instrument_id']]; + if ($params['paidBy'] != 'Check' && isset($params['check_number'])) { + unset($params['check_number']); + } } // retrieve individual prefix value for honoree -- 2.25.1