Fix rounding and conversion issues on statistics

This commit is contained in:
ellite
2023-11-12 11:07:17 +01:00
parent cce3b0f85c
commit 74d851ea7a
4 changed files with 15 additions and 6 deletions
+2 -2
View File
@@ -38,7 +38,7 @@
return $price;
} else {
$fromRate = $exchangeRate['rate'];
return number_format($price * $fromRate, 2, ".", "");
return $price / $fromRate;
}
}
@@ -173,7 +173,7 @@ if ($result) {
<div class="title">Most Expensive Subscription Cost</div>
</div>
<div class="statistic">
<span><?= $amountDueThisMonth ?><?= $symbol ?></span>
<span><?= number_format($amountDueThisMonth, 2, ".", "") ?><?= $symbol ?></span>
<div class="title">Amount due this month</div>
</div>
<?php