From a44e5da421b08cf988fcedfba258cfeda6c98496 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 16 Jun 2015 06:52:30 +0200 Subject: [PATCH] Add save routine to each transaction. [skip ci] --- app/Repositories/Tag/TagRepository.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index 3550a119ae..7353dd1210 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -41,6 +41,7 @@ class TagRepository implements TagRepositoryInterface switch ($tag->tagMode) { case 'nothing': $journal->tags()->save($tag); + $journal->save(); return true; case 'balancingAct': @@ -248,12 +249,14 @@ class TagRepository implements TagRepositoryInterface // only if this is the only withdrawal. if ($journal->transaction_type_id == $withdrawal->id && $withdrawals < 1) { $journal->tags()->save($tag); + $journal->save(); return true; } // and only if this is the only transfer if ($journal->transaction_type_id == $transfer->id && $transfers < 1) { $journal->tags()->save($tag); + $journal->save(); return true; } @@ -290,6 +293,7 @@ class TagRepository implements TagRepositoryInterface // tag is attached just like that: if ($withdrawals < 1 && $deposits < 1) { $journal->tags()->save($tag); + $journal->save(); return true; } @@ -332,6 +336,7 @@ class TagRepository implements TagRepositoryInterface } if ($match) { $journal->tags()->save($tag); + $journal->save(); return true; }