mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-30 10:47:06 -06:00
Fix #2626
This commit is contained in:
parent
845ae94252
commit
17c943fcf1
@ -206,6 +206,7 @@ class BudgetLimitController extends Controller
|
|||||||
$array['left_per_day'] = bcdiv(bcadd($array['spent'], $array['amount']), $array['days_left']);
|
$array['left_per_day'] = bcdiv(bcadd($array['spent'], $array['amount']), $array['days_left']);
|
||||||
|
|
||||||
// left per day formatted.
|
// left per day formatted.
|
||||||
|
$array['amount'] = round($limit['amount'], $limit->transactionCurrency->decimal_places);
|
||||||
$array['left_per_day_formatted'] = app('amount')->formatAnything($limit->transactionCurrency, $array['left_per_day']);
|
$array['left_per_day_formatted'] = app('amount')->formatAnything($limit->transactionCurrency, $array['left_per_day']);
|
||||||
|
|
||||||
return response()->json($array);
|
return response()->json($array);
|
||||||
|
@ -404,7 +404,8 @@ class BudgetController extends Controller
|
|||||||
'currency_symbol' => $noBudgetEntry['currency_symbol'],
|
'currency_symbol' => $noBudgetEntry['currency_symbol'],
|
||||||
'currency_decimal_places' => $noBudgetEntry['currency_decimal_places'],
|
'currency_decimal_places' => $noBudgetEntry['currency_decimal_places'],
|
||||||
];
|
];
|
||||||
$report['sums'][$noBudgetEntry['currency_id']]['spent'] = bcadd($report['sums'][$noBudgetEntry['currency_id']]['spent'], $noBudgetEntry['sum']);
|
$report['sums'][$noBudgetEntry['currency_id']]['spent']
|
||||||
|
= bcadd($report['sums'][$noBudgetEntry['currency_id']]['spent'] ?? '0', $noBudgetEntry['sum']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// make percentages based on total amount.
|
// make percentages based on total amount.
|
||||||
|
Loading…
Reference in New Issue
Block a user