// Handle soft credit and / or link to personal campaign page
if (CRM_Utils_Array::value('deleteSoftCredit', $params, TRUE)) {
// first delete soft credits if any
- CRM_Contribute_BAO_ContributionSoft::del($contribution->id);
+ //CRM_Contribute_BAO_ContributionSoft::del($contribution->id);
if ($pcp = CRM_Utils_Array::value('pcp', $params)) {
$softParams = array();
CRM_Price_BAO_Field::priceSetValidation($priceSetId, $fields, $errors);
}
}
- //CRM_CORE_ERROR::DEBUG($fields['soft_credit_amount']);
// if honor roll fields are populated but no PCP is selected
if (!CRM_Utils_Array::value('pcp_made_through_id', $fields)) {
// get the submitted form values.
$submittedValues = $this->controller->exportValues($this->_name);
-
if (CRM_Utils_Array::value('price_set_id', $submittedValues) && $this->_action & CRM_Core_Action::UPDATE) {
$line = CRM_Price_BAO_LineItem::getLineItems($this->_id, 'contribution');
$lineID = key($line);
$this->assign('lineItem', !empty($lineItem) && !$isQuickConfig ? $lineItem : FALSE);
if (CRM_Utils_Array::value('pcp_made_through_id', $submittedValues)) {
+ $pcp = array();
$fields = array(
'pcp_made_through_id',
'pcp_display_in_roll',
if ($val && $submittedValues['soft_credit_amount'][$key]) {
$softParams[$key]['contact_id'] = $val;
$softParams[$key]['amount'] = $submittedValues['soft_credit_amount'][$key];
+ if ($submittedValues['soft_credit_id'][$key]) {
+ $softParams[$key]['id'] = $submittedValues['soft_credit_id'][$key];
+ }
}
}
}