mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix quota bills showing 0/0 for in/out (#4462)
This commit is contained in:
committed by
Tony Murray
parent
b43c7f2c72
commit
bad5ff2eeb
@ -117,8 +117,13 @@ foreach (dbFetchRows($sql, $param) as $bill) {
|
||||
} elseif (strtolower($bill['bill_type']) == 'quota') {
|
||||
$type = 'Quota';
|
||||
$allowed = format_bytes_billing($bill['bill_allowed']);
|
||||
$in = format_bytes_billing($bill['traf_in']);
|
||||
$out = format_bytes_billing($bill['traf_out']);
|
||||
if (!empty($prev)) {
|
||||
$in = format_bytes_billing($bill['traf_in']);
|
||||
$out = format_bytes_billing($bill['traf_out']);
|
||||
} else {
|
||||
$in = format_bytes_billing($bill['total_data_in']);
|
||||
$out = format_bytes_billing($bill['total_data_out']);
|
||||
}
|
||||
if (!$prev) {
|
||||
$percent = round((($bill['total_data'] / ($bill['bill_allowed'])) * 100), 2);
|
||||
$overuse = ($bill['total_data'] - $bill['bill_allowed']);
|
||||
|
Reference in New Issue
Block a user