This commit is contained in:
James Cole
2023-12-22 06:14:14 +01:00
parent 669aedeea3
commit f69072d293
15 changed files with 161 additions and 56 deletions

View File

@@ -225,6 +225,7 @@ class BudgetController extends Controller
$return[$currencyId]['native_spent'] = bcadd($return[$currencyId]['native_spent'], $convertedAmount);
}
}
$converter->summarize();
return $return;
}
@@ -288,6 +289,7 @@ class BudgetController extends Controller
$result[$limitCurrencyId]['native_overspent'] = app('steam')->positive(bcadd($convertedLimitAmount, $result[$limitCurrencyId]['native_spent']));
}
}
$converter->summarize();
return $result;
}

View File

@@ -137,6 +137,7 @@ class CategoryController extends Controller
usort($return, static function (array $a, array $b) {
return (float)$a['native_amount'] < (float)$b['native_amount'] ? 1 : -1;
});
$converter->summarize();
return response()->json($this->clean($return));
}

View File

@@ -278,7 +278,6 @@ class BasicController extends Controller
*/
foreach ($spent as $currencyId => $row) {
app('log')->debug(sprintf('Processing spent array in currency #%d', $currencyId));
$currencyId = $currencyId;
$spent = '0';
$spentNative = '0';
@@ -351,6 +350,7 @@ class BasicController extends Controller
}
$return[] = $nativeLeft;
$return[] = $nativePerDay;
$converter->summarize();
return $return;
}