Account search fixed.

This commit is contained in:
James Cole
2020-08-28 11:24:55 +02:00
parent 63794cab07
commit 093f34b7a8
26 changed files with 157 additions and 996 deletions

View File

@@ -44,31 +44,6 @@ class SetNotes implements ActionInterface
$this->action = $action;
}
/**
* Set notes to X
*
* @param TransactionJournal $journal
* @return bool
* @deprecated
* @codeCoverageIgnore
*/
public function act(TransactionJournal $journal): bool
{
$dbNote = $journal->notes()->first();
if (null === $dbNote) {
$dbNote = new Note;
$dbNote->noteable()->associate($journal);
}
$oldNotes = $dbNote->text;
$dbNote->text = $this->action->action_value;
$dbNote->save();
$journal->save();
Log::debug(sprintf('RuleAction SetNotes changed the notes of journal #%d from "%s" to "%s".', $journal->id, $oldNotes, $this->action->action_value));
return true;
}
/**
* @inheritDoc
*/