mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
billing rewrite (disabling svn after)
git-svn-id: http://www.observium.org/svn/observer/trunk@2758 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -14,6 +14,16 @@ echo("Starting Polling Session ... \n\n");
|
||||
foreach (dbFetchRows("SELECT * FROM `bills`") as $bill_data)
|
||||
{
|
||||
echo("Bill : ".$bill_data['bill_name']."\n");
|
||||
|
||||
# replace old bill_gb with bill_quota (we're now storing bytes, not gigabytes)
|
||||
|
||||
if($bill_data['bill_type'] == "quota" && !is_numeric($bill_data['bill_quota']))
|
||||
{
|
||||
$bill_data['bill_quota'] = $bill_data['bill_gb'] * $config['billing']['base'] * $config['billing']['base'];
|
||||
dbUpdate(array('bill_quota' => $bill_data['bill_quota']), 'bills', '`bill_id` = ?', array($bill_data['bill_id']));
|
||||
echo("Quota -> ".$bill_data['bill_quota']);
|
||||
}
|
||||
|
||||
CollectData($bill_data['bill_id']);
|
||||
$iter++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user