Display only relevant data in the budget graph

This commit is contained in:
Frederic Guillot
2015-03-28 15:44:24 -04:00
parent 346309cfcf
commit eb6853c163

View File

@@ -111,6 +111,9 @@ 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;
if ($today_in > 0 || $today_out > 0) {
$left += $today_in; $left += $today_in;
$left -= $today_out; $left -= $today_out;
@@ -121,6 +124,7 @@ class Budget extends Base
'left' => $left, 'left' => $left,
); );
} }
}
return $serie; return $serie;
} }