diff --git a/app/controllers/RepeatedExpenseController.php b/app/controllers/RepeatedExpenseController.php index a72da7bba0..9284cc43a7 100644 --- a/app/controllers/RepeatedExpenseController.php +++ b/app/controllers/RepeatedExpenseController.php @@ -39,7 +39,6 @@ class RepeatedExpenseController extends BaseController $expenses->each( function (Piggybank $piggyBank) use ($repository) { $piggyBank->currentRelevantRep(); - $piggyBank->currentRep = $repository->calculateParts($piggyBank->currentRep); } ); diff --git a/app/lib/FireflyIII/Shared/Toolkit/Steam.php b/app/lib/FireflyIII/Shared/Toolkit/Steam.php index 50b06fce46..3b52592a6b 100644 --- a/app/lib/FireflyIII/Shared/Toolkit/Steam.php +++ b/app/lib/FireflyIII/Shared/Toolkit/Steam.php @@ -1,6 +1,7 @@ currentamount / $piggyBank->targetamount * 100; + if ($pct > 100) { + return 100; + } else { + return floor($pct); + } + } + } \ No newline at end of file diff --git a/app/views/repeatedexpense/index.blade.php b/app/views/repeatedexpense/index.blade.php index 00b8115387..5df04f1f7f 100644 --- a/app/views/repeatedexpense/index.blade.php +++ b/app/views/repeatedexpense/index.blade.php @@ -13,68 +13,34 @@ -@foreach($expenses as $entry) -currentRep->bars->count()) == 0 ? 1 : floor(12 / $entry->currentRep->bars->count()); -?>
- Target amount: {{mf($entry->targetamount)}}. Currently saved: {{mf($entry->currentRep->currentamount)}}. Left to save: {{mf($entry->targetamount-$entry->currentRep->currentamount)}}
- Runs from {{$entry->currentRep->startdate->format('j F Y')}} to {{$entry->currentRep->targetdate->format('j F Y')}}
-
+ {{$bar->getStartDate()->format('j F Y')}} — {{$bar->getTargetDate()->format('j F Y')}} +