CRM-17461: Contribution Batch Entry : eNotices and invalid / missing receipt data
authoryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 30 Oct 2015 09:08:37 +0000 (14:38 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 30 Oct 2015 09:08:37 +0000 (14:38 +0530)
----------------------------------------
* CRM-17461: Contribution Batch Entry : eNotices and invalid / missing receipt data
  https://issues.civicrm.org/jira/browse/CRM-17461

CRM/Batch/Form/Entry.php
CRM/Contribute/Form/AdditionalInfo.php

index 627ff79cc63b46c018bba9a46ee1d7603a4d54a8..6ae267597ad1faa67732ac7d06e09cf9e1010d11 100755 (executable)
@@ -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);
         }
       }
index ffe5793052fdff88becc79ffed9cb6c73ec98182..910772dcbf68c1d7f204979ffa289c8169ffbf05 100644 (file)
@@ -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