Skip to content

Firefly III: a personal finances manager

Fix #11396

James Cole280e531a76e4
diff --git a/app/Http/Controllers/Json/ReconcileController.php b/app/Http/Controllers/Json/ReconcileController.php
index 561cbd48a2..4068545e7f 100644
--- a/app/Http/Controllers/Json/ReconcileController.php
+++ b/app/Http/Controllers/Json/ReconcileController.php
@@ -212,6 +212,13 @@ class ReconcileController extends Controller
$startBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $startDate)[$account->id];
$endBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $end)[$account->id];
+ // round balances.
+ foreach($startBalance as $key => $value) {
+ $startBalance[$key] = Steam::bcround($value, $currency->decimal_places);
+ }
+ foreach($endBalance as $key => $value) {
+ $endBalance[$key] = Steam::bcround($value, $currency->decimal_places);
+ }
// get the transactions