mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
Implement tag count and fix a count thing.
This commit is contained in:
@@ -158,14 +158,13 @@ class TransactionJournal extends Model
|
||||
$amount = $t->amount;
|
||||
}
|
||||
}
|
||||
$count = $this->tags()->count();
|
||||
|
||||
if ($count === 1) {
|
||||
if ($this->tag_count === 1) {
|
||||
// get amount for single tag:
|
||||
$amount = $this->amountByTag($this->tags()->first(), $amount);
|
||||
}
|
||||
|
||||
if ($count > 1) {
|
||||
if ($this->tag_count > 1) {
|
||||
// get amount for either tag.
|
||||
$amount = $this->amountByTags($amount);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user