}
$params['non_deductible_amount'] = $this->calculateNonDeductibleAmount($params, $formValues);
+ // we are already handling note below, so to avoid duplicate notes against $contribution
+ if (!empty($params['note']) && !empty($submittedValues['note'])) {
+ unset($params['note']);
+ }
$contribution = CRM_Contribute_BAO_Contribution::create($params, $ids);
// process associated membership / participant, CRM-4395
);
}
- if ($contribution->id && isset($submittedValues['note'])) {
+ if ($contribution->id && !empty($submittedValues['note'])) {
CRM_Contribute_Form_AdditionalInfo::processNote($submittedValues, $this->_contactID, $contribution->id, $this->_noteID);
}
*/
public function testGetFinancialTransactionsList() {
$individualID = $this->individualCreate();
- $this->contributionCreate($individualID);
+ $this->contributionCreate(array('contact_id' => $individualID));
$batch = $this->callAPISuccess('Batch', 'create', array('title' => 'test', 'status_id' => 'Open'));
CRM_Core_DAO::executeQuery("
INSERT INTO civicrm_entity_batch (entity_table, entity_id, batch_id)