X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContribute%2FForm%2FContribution.php;h=2ef73e37443a006e1620a43d604f23760bd6f800;hb=8cae79dd003c4c47d81f821ee20c5e8dc0231382;hp=6ae27ada43ed2271c48ebd733e483544b2f42e8f;hpb=ce8e8b83bf35b89a8a22dfd18177a7b8b231d58c;p=civicrm-core.git diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 6ae27ada43..2ef73e3744 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -154,8 +154,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP protected $_formType; - public $_honoreeProfileType; - /** * Array of the payment fields to be displayed in the payment fieldset (pane) in billingBlock.tpl * this contains all the information to describe these fields from quickform. See CRM_Core_Form_Payment getPaymentFormFieldsMetadata @@ -301,10 +299,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP else { $this->setPageTitle($this->_ppID ? ts('Pledge Payment') : ts('Contribution')); } - - if ($this->_id) { - CRM_Contribute_Form_SoftCredit::preprocess($this); - } } /** @@ -1156,6 +1150,9 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP if (!empty($this->_params['receive_date'])) { $this->_params['receive_date'] = CRM_Utils_Date::processDate($this->_params['receive_date'], $this->_params['receive_date_time']); } + else { + $this->_params['receive_date'] = $now; + } $this->_params['pcp_display_in_roll'] = CRM_Utils_Array::value('pcp_display_in_roll', $params); $this->_params['pcp_roll_nickname'] = CRM_Utils_Array::value('pcp_roll_nickname', $params); @@ -1199,8 +1196,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP $paymentParams['receive_date'] = $this->_params['receive_date']; } - $this->_params['receive_date'] = $now; - if (!empty($this->_params['is_email_receipt'])) { $this->_params['receipt_date'] = $now; } @@ -1276,6 +1271,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP 'fee_amount' => CRM_Utils_Array::value('fee_amount', $result), 'card_type_id' => CRM_Utils_Array::value('card_type_id', $paymentParams), 'pan_truncation' => CRM_Utils_Array::value('pan_truncation', $paymentParams), + 'is_email_receipt' => FALSE, )); // This has now been set to 1 in the DB - declare it here also $contribution->contribution_status_id = 1; @@ -1597,8 +1593,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, 'pcp_id' => 0)); + civicrm_api3('ContributionSoft', 'get', array('contribution_id' => $this->_id, 'pcp_id' => NULL, 'api.ContributionSoft.delete' => 1)); } // set the contact, when contact is selected