mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 05:06:37 +00:00
Account search fixed.
This commit is contained in:
@@ -45,30 +45,6 @@ class PrependNotes implements ActionInterface
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepend notes with X
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function act(TransactionJournal $journal): bool
|
||||
{
|
||||
$dbNote = $journal->notes()->first();
|
||||
if (null === $dbNote) {
|
||||
$dbNote = new Note;
|
||||
$dbNote->noteable()->associate($journal);
|
||||
}
|
||||
$notes = $dbNote->text;
|
||||
Log::debug(sprintf('RuleAction PrependNotes prepended "%s" with "%s".', $notes, $this->action->action_value));
|
||||
$notes = $this->action->action_value . $notes;
|
||||
$dbNote->text = $notes;
|
||||
$dbNote->save();
|
||||
$journal->save();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user