* @param int $contributionNoteID
*/
public static function processNote($params, $contactID, $contributionID, $contributionNoteID = NULL) {
+ if (CRM_Utils_System::isNull($params['note']) && $contributionNoteID) {
+ CRM_Core_BAO_Note::del($contributionNoteID);
+ return;
+ }
//process note
$noteParams = array(
'entity_table' => 'civicrm_contribution',
}
if ($this->_noteID &&
- isset($this->_values['note'])
+ !CRM_Utils_System::isNull($this->_values['note'])
) {
$defaults['hidden_AdditionalDetail'] = 1;
}
);
}
- if ($contribution->id && !empty($submittedValues['note'])) {
+ if ($contribution->id) {
CRM_Contribute_Form_AdditionalInfo::processNote($submittedValues, $this->_contactID, $contribution->id, $this->_noteID);
}