Display bug for piggy banks with no reminders.

This commit is contained in:
James Cole 2014-11-16 10:36:23 +01:00
parent 2d9c89375a
commit 8c254554eb
2 changed files with 16 additions and 8 deletions

View File

@ -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;

View File

@ -70,6 +70,7 @@
@endif
</td>
</tr>
@if(!is_null($piggybank->reminder))
<tr>
<td>Reminder</td>
<td>
@ -84,14 +85,17 @@
@endif
</td>
</tr>
<tr>
<td>Reminders left</td>
<td>{{$remindersCount}}</td>
</tr>
<tr>
<td>Expected amount per reminder</td>
<td>{{mf($amountPerReminder)}}</td>
</tr>
@endif
@if($remindersCount > 0)
<tr>
<td>Reminders left</td>
<td>{{$remindersCount}}</td>
</tr>
<tr>
<td>Expected amount per reminder</td>
<td>{{mf($amountPerReminder)}}</td>
</tr>
@endif
</table>
</div>
</div>