diff --git a/app/models/Piggybank.php b/app/models/Piggybank.php index 172c91c689..623d82f74d 100644 --- a/app/models/Piggybank.php +++ b/app/models/Piggybank.php @@ -74,6 +74,10 @@ class Piggybank extends Ardent /** @var \FireflyIII\Shared\Toolkit\Date $dateKit */ $dateKit = App::make('FireflyIII\Shared\Toolkit\Date'); + if(is_null($this->reminder)) { + return 0; + } + $start = new Carbon; $end = !is_null($this->targetdate) ? clone $this->targetdate : new Carbon; $reminders = 0; diff --git a/app/views/piggybanks/show.blade.php b/app/views/piggybanks/show.blade.php index 27a307933d..1d23179eda 100644 --- a/app/views/piggybanks/show.blade.php +++ b/app/views/piggybanks/show.blade.php @@ -70,6 +70,7 @@ @endif + @if(!is_null($piggybank->reminder)) Reminder @@ -84,14 +85,17 @@ @endif - - Reminders left - {{$remindersCount}} - - - Expected amount per reminder - {{mf($amountPerReminder)}} - + @endif + @if($remindersCount > 0) + + Reminders left + {{$remindersCount}} + + + Expected amount per reminder + {{mf($amountPerReminder)}} + + @endif