mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	fix billing-calculate strings
git-svn-id: http://www.observium.org/svn/observer/trunk@2773 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
		@@ -48,6 +48,8 @@ foreach (dbFetchRows("SELECT * FROM `bills` ORDER BY `bill_name`") as $bill)
 | 
			
		||||
         $type = "CDR";
 | 
			
		||||
         $allowed = $bill['bill_cdr'];
 | 
			
		||||
         $used    = $rate_data['rate_95th'];
 | 
			
		||||
         $allowed_text = format_si($allowed)."bps";
 | 
			
		||||
         $used_text    = format_si($used)."bps";
 | 
			
		||||
         $overuse = $used - $allowed;
 | 
			
		||||
         $overuse = (($overuse <= 0) ? "0" : $overuse);
 | 
			
		||||
         $percent = round(($rate_data['rate_95th'] / $bill['bill_cdr']) * 100,2);
 | 
			
		||||
@@ -56,11 +58,13 @@ foreach (dbFetchRows("SELECT * FROM `bills` ORDER BY `bill_name`") as $bill)
 | 
			
		||||
         $type = "Quota";
 | 
			
		||||
         $allowed = $bill['bill_quota'];
 | 
			
		||||
         $used    = $rate_data['total_data'];
 | 
			
		||||
         $allowed_text = format_bytes_billing($allowed);
 | 
			
		||||
	 $used_text    = format_bytes_billing($used);
 | 
			
		||||
         $overuse = $used - $allowed;
 | 
			
		||||
         $overuse = (($overuse <= 0) ? "0" : $overuse);
 | 
			
		||||
         $percent = round(($rate_data['total_data'] / $bill['bill_quota']) * 100,2);
 | 
			
		||||
      }
 | 
			
		||||
      echo(strftime("%x @ %X", strtotime($datefrom))." to ".strftime("%x @ %X", strtotime($dateto))." ".str_pad($type,8)." ".str_pad($allowed,10)." ".str_pad($used,10)." ".$percent."%");
 | 
			
		||||
      echo(strftime("%x @ %X", strtotime($datefrom))." to ".strftime("%x @ %X", strtotime($dateto))." ".str_pad($type,8)." ".str_pad($allowed_text,10)." ".str_pad($used_text,10)." ".$percent."%");
 | 
			
		||||
 | 
			
		||||
      if($i == '0')
 | 
			
		||||
      {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user