mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixes #593
This commit is contained in:
parent
fc36f9cd8c
commit
063ca3121a
@ -386,9 +386,14 @@ class BudgetController extends Controller
|
||||
]
|
||||
);
|
||||
}
|
||||
/*
|
||||
* amount: amount of budget limit
|
||||
* left: amount of budget limit min spent, or 0 when < 0.
|
||||
* spent: spent, or amount of budget limit when > amount
|
||||
*/
|
||||
$amount = $budgetLimit->amount;
|
||||
$left = bccomp(bcadd($amount, $expenses), '0') < 1 ? '0' : bcadd($amount, $expenses);
|
||||
$spent = $expenses;
|
||||
$spent = bccomp($expenses, $amount) === 1 ? $expenses : bcmul($amount, '-1');
|
||||
$overspent = bccomp(bcadd($amount, $expenses), '0') < 1 ? bcadd($amount, $expenses) : '0';
|
||||
$return[$name] = [
|
||||
'left' => $left,
|
||||
|
@ -207,6 +207,7 @@ function stackedColumnChart(URI, container) {
|
||||
var options = defaultChartOptions;
|
||||
options.stacked = true;
|
||||
options.scales.xAxes[0].stacked = true;
|
||||
options.scales.yAxes[0].stacked = true;
|
||||
|
||||
var chartType = 'bar';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user