From: yashodha Date: Tue, 7 Jul 2015 11:35:42 +0000 (+0530) Subject: CRM-16735 fixes - PCP notification email should not be sent when contribution record... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=64c99ba0361867205fec05bf16ebedbba93fe6e3;p=civicrm-core.git CRM-16735 fixes - PCP notification email should not be sent when contribution record is updated UNLESS a new PCP soft credit is added https://issues.civicrm.org/jira/browse/CRM-16735 --- diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index cc2376f24a..31443e6971 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -1153,7 +1153,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP $isEmpty = array_keys(array_flip($submittedValues['soft_credit_contact_id'])); if ($this->_id && count($isEmpty) == 1 && key($isEmpty) == NULL) { //Delete existing soft credit records if soft credit list is empty on update - CRM_Contribute_BAO_ContributionSoft::del(array('contribution_id' => $this->_id)); + CRM_Contribute_BAO_ContributionSoft::del(array('contribution_id' => $this->_id, 'pcp_id' => 0)); } else { //build soft credit params