mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 01:06:46 +00:00
Delete tags now possible.
This commit is contained in:
@@ -230,6 +230,10 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
if (count($ids) > 0) {
|
if (count($ids) > 0) {
|
||||||
DB::table('tag_transaction_journal')->where('transaction_journal_id', $journal->id)->whereNotIn('tag_id', $ids)->delete();
|
DB::table('tag_transaction_journal')->where('transaction_journal_id', $journal->id)->whereNotIn('tag_id', $ids)->delete();
|
||||||
}
|
}
|
||||||
|
// if count is zero, delete them all:
|
||||||
|
if(count($ids) == 0) {
|
||||||
|
DB::table('tag_transaction_journal')->where('transaction_journal_id', $journal->id)->delete();
|
||||||
|
}
|
||||||
|
|
||||||
// connect each tag to journal (if not yet connected):
|
// connect each tag to journal (if not yet connected):
|
||||||
/** @var Tag $tag */
|
/** @var Tag $tag */
|
||||||
|
Reference in New Issue
Block a user