mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Final fixes for billing
This commit is contained in:
@@ -79,9 +79,9 @@ function getValue($host, $port, $id, $inout) {
|
||||
|
||||
}//end getValue()
|
||||
|
||||
function getLastPortCounter($port_id) {
|
||||
function getLastPortCounter($port_id, $bill_id) {
|
||||
$return = array();
|
||||
$row = dbFetchRow("SELECT timestamp, in_counter, in_delta, out_counter, out_delta FROM bill_port_counters WHERE `port_id` = ?", array($port_id));
|
||||
$row = dbFetchRow("SELECT timestamp, in_counter, in_delta, out_counter, out_delta FROM bill_port_counters WHERE `port_id` = ? AND `bill_id` = ?", array($port_id, $bill_id));
|
||||
if (!is_null($row)) {
|
||||
$return[timestamp] = $row['timestamp'];
|
||||
$return[in_counter] = $row['in_counter'];
|
||||
|
||||
Reference in New Issue
Block a user