summaryrefslogtreecommitdiff
path: root/pages/api/money/accounts.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api/money/accounts.php')
-rw-r--r--pages/api/money/accounts.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/api/money/accounts.php b/pages/api/money/accounts.php
index 22d8c77..9f85323 100644
--- a/pages/api/money/accounts.php
+++ b/pages/api/money/accounts.php
@@ -58,7 +58,7 @@ foreach ($accounts as $index => $account) {
$acc["total"] = round(calculateFullAmount($account, true), 2);
$acc["interests"] = $account["interests"];
$acc["max"] = $account["max"];
- $acc["used_percentage"] = isset($account["max"]) ? (calculateFullAmount($account, true) / $account["max"]) * 100 : null;
+ $acc["used_percentage"] = isset($account["max"]) ? round((calculateFullAmount($account, true) / $account["max"]) * 100, 2) : null;
$obj["users"]["cloudburst"]["accounts"][] = $acc;
}
@@ -84,7 +84,7 @@ foreach ($accounts as $index => $account) {
$acc["total"] = round(calculateFullAmount($account, true), 2);
$acc["interests"] = $account["interests"];
$acc["max"] = $account["max"];
- $acc["used_percentage"] = isset($account["max"]) ? (calculateFullAmount($account, true) / $account["max"]) * 100 : null;
+ $acc["used_percentage"] = isset($account["max"]) ? round((calculateFullAmount($account, true) / $account["max"]) * 100, 2) : null;
$acc["transactions"] = null;
$obj["users"]["raindrops"]["accounts"][] = $acc;