mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Use note object instead of field #888
This commit is contained in:
@@ -16,6 +16,7 @@ use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Import\Object\ImportJournal;
|
||||
use FireflyIII\Models\ImportJob;
|
||||
use FireflyIII\Models\Note;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
@@ -178,9 +179,14 @@ class ImportStorage
|
||||
|
||||
$this->storeBill($journal, $importJournal->bill->getBill());
|
||||
$this->storeMeta($journal, $importJournal->metaDates);
|
||||
$journal->setMeta('notes', $importJournal->notes);
|
||||
$this->storeTags($importJournal->tags, $journal);
|
||||
|
||||
// set notes for journal:
|
||||
$dbNote = new Note();
|
||||
$dbNote->noteable()->associate($journal);
|
||||
$dbNote->text = trim($importJournal->notes);
|
||||
$dbNote->save();
|
||||
|
||||
// set journal completed:
|
||||
$journal->completed = true;
|
||||
$journal->save();
|
||||
|
||||
Reference in New Issue
Block a user