fix an issue with bills with no data (#10009)

Still gets a an error message when graphing, but it better relates to what the issue is.
This commit is contained in:
Tony Murray
2019-03-22 19:36:50 -05:00
committed by GitHub
parent 8ec2476036
commit 7c86234815

View File

@@ -293,7 +293,7 @@ function getBillingBitsGraphData($bill_id, $from, $to, $reducefactor)
}
}//end foreach
if (isset($iter_in)) { // Write last element
if (!empty($iter_in)) { // Write last element
$out_data[$i] = round(($iter_out / $iter_period), 2);
$in_data[$i] = round(($iter_in / $iter_period), 2);
$tot_data[$i] = ($out_data[$i] + $in_data[$i]);