Refresh notes in various actions.

This commit is contained in:
James Cole
2024-03-10 08:11:58 +01:00
parent 0b45c1aa76
commit 3413b9b5b5
14 changed files with 54 additions and 53 deletions

View File

@@ -27,6 +27,7 @@ use FireflyIII\Events\TriggeredAuditLog;
use FireflyIII\Models\Note;
use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\TransactionRules\Traits\RefreshNotesTrait;
/**
* Class AppendNotes.
@@ -34,6 +35,7 @@ use FireflyIII\Models\TransactionJournal;
*/
class AppendNotes implements ActionInterface
{
use RefreshNotesTrait;
private RuleAction $action;
/**
@@ -46,6 +48,7 @@ class AppendNotes implements ActionInterface
public function actOnArray(array $journal): bool
{
$this->refreshNotes($journal);
$dbNote = Note::where('noteable_id', (int)$journal['transaction_journal_id'])
->where('noteable_type', TransactionJournal::class)
->first(['notes.*'])