From 77989e2720d5e8fe09661cc70d42949785554552 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 8 Jun 2015 18:50:48 +0200 Subject: [PATCH 1/2] Fix read me. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f105242ea2..3b0a3a4a9d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Firefly III (v3.4.4) +# Firefly III (v3.4.4.2) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/JC5/firefly-iii/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/JC5/firefly-iii/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/JC5/firefly-iii/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/JC5/firefly-iii/?branch=master) From 5fa87e18dbdb63a737a884bb965ee6948f50ae04 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 8 Jun 2015 18:51:45 +0200 Subject: [PATCH 2/2] Fix tag bug. (again) --- app/Repositories/Tag/TagRepository.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index 935c2967fa..6df1b60915 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -320,13 +320,18 @@ class TagRepository implements TagRepositoryInterface $match = true; /** @var TransactionJournal $check */ foreach ($tag->transactionjournals as $check) { - if ($check->source_account->id != $journal->source_account->id) { + // $checkAccount is the source_account for a withdrawal + // $checkAccount is the destination_account for a deposit + if ($check->transactionType->type == 'Withdrawal' && $check->source_account->id != $journal->destination_account->id) { $match = false; } + if ($check->transactionType->type == 'Deposit' && $check->destination_account->id != $journal->destination_account->id) { + $match = false; + } + } if ($match) { $journal->tags()->save($tag); - return true; }