Display only relevant data in the budget graph
This commit is contained in:
@@ -111,15 +111,19 @@ class Budget extends Base
|
|||||||
$date = $today->format('Y-m-d');
|
$date = $today->format('Y-m-d');
|
||||||
$today_in = isset($in[$date]) ? (int) $in[$date] : 0;
|
$today_in = isset($in[$date]) ? (int) $in[$date] : 0;
|
||||||
$today_out = isset($out[$date]) ? (int) $out[$date] : 0;
|
$today_out = isset($out[$date]) ? (int) $out[$date] : 0;
|
||||||
$left += $today_in;
|
|
||||||
$left -= $today_out;
|
|
||||||
|
|
||||||
$serie[] = array(
|
if ($today_in > 0 || $today_out > 0) {
|
||||||
'date' => $date,
|
|
||||||
'in' => $today_in,
|
$left += $today_in;
|
||||||
'out' => -$today_out,
|
$left -= $today_out;
|
||||||
'left' => $left,
|
|
||||||
);
|
$serie[] = array(
|
||||||
|
'date' => $date,
|
||||||
|
'in' => $today_in,
|
||||||
|
'out' => -$today_out,
|
||||||
|
'left' => $left,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $serie;
|
return $serie;
|
||||||
|
|||||||
Reference in New Issue
Block a user