From 05fa1b40d18ea156ae701fec2b0f6d9cfe8223c1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 21 Mar 2015 08:53:43 +0100 Subject: [PATCH] Support > 100% --- app/Repositories/Account/AccountRepository.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 25c20e0f65..dad416f93c 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -150,6 +150,7 @@ class AccountRepository implements AccountRepositoryInterface } else { $pct = ($diff / $account->startBalance) * 100; } + $pct = $pct > 100 ? 100 : $pct; $account->difference = $diff; $account->percentage = round($pct); }