mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 13:36:15 +00:00
Initial code base for tag report.
This commit is contained in:
@@ -712,4 +712,18 @@ class JournalCollector implements JournalCollectorInterface
|
||||
$this->query->leftJoin('tag_transaction_journal', 'tag_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $tags
|
||||
*
|
||||
* @return JournalCollectorInterface
|
||||
*/
|
||||
public function setTags(Collection $tags): JournalCollectorInterface
|
||||
{
|
||||
$this->joinTagTables();
|
||||
$tagIds = $tags->pluck('id')->toArray();
|
||||
$this->query->whereIn('tag_transaction_journal.tag_id', $tagIds);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user