Restore old behavior

This commit is contained in:
James Cole
2024-03-17 12:00:28 +01:00
parent ab2772abe0
commit 3913fa5086
18 changed files with 51 additions and 51 deletions

View File

@@ -281,7 +281,7 @@ class BasicController extends Controller
$spentInCurrency = $row['sum'];
$leftToSpend = bcadd($amount, $spentInCurrency);
$days = $today->diffInDays($end) + 1;
$days = (int)$today->diffInDays($end, true) + 1;
$perDay = '0';
if (0 !== $days && bccomp($leftToSpend, '0') > -1) {
$perDay = bcdiv($leftToSpend, (string)$days);