mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	billing cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@2766 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
		@@ -30,8 +30,8 @@ if ($_POST['action'] == "delete_bill_port")
 | 
			
		||||
if ($_POST['action'] == "update_bill")
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  if (dbUpdate(array('bill_name' => $_POST['bill_name'], 'bill_day' => $_POST['bill_day'], 'bill_gb' => $_POST['bill_gb'],
 | 
			
		||||
                 'bill_cdr' => $_POST['bill_cdr'], 'bill_type' => $_POST['bill_type']), 'bills', '`bill_id` = ?', array($bill_id)))
 | 
			
		||||
  if (dbUpdate(array('bill_name' => $_POST['bill_name'], 'bill_day' => $_POST['bill_day'], 'bill_quota' => ($_POST['bill_quota'] * $config['billing']['base'] * $config['billing']['base'] * $config['billing']['base']),
 | 
			
		||||
                 'bill_cdr' => ($_POST['bill_cdr']*1000), 'bill_type' => $_POST['bill_type']), 'bills', '`bill_id` = ?', array($bill_id)))
 | 
			
		||||
  {
 | 
			
		||||
    print_message("Bill Properties Updated");
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -22,12 +22,12 @@ echo("
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <td width='300'><div align='right'>Monthly Quota</div></td>
 | 
			
		||||
      <td colspan='3'><input name='bill_gb' size='20' value='" . $bill_data['bill_gb'] . "'></input>GB
 | 
			
		||||
      <td colspan='3'><input name='bill_quota' size='20' value='" . $bill_data['bill_quota']/$config['billing']['base']/$config['billing']['base']/$config['billing']['base'] . "'></input>GB
 | 
			
		||||
      </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <td width='300'><div align='right'>CDR with 95th</div></td>
 | 
			
		||||
      <td colspan='3'><input name='bill_cdr' size='20' value='" . $bill_data['bill_cdr'] . "'></input>Kbps
 | 
			
		||||
      <td colspan='3'><input name='bill_cdr' size='20' value='" . $bill_data['bill_cdr']/1000 . "'></input>Kbps
 | 
			
		||||
      </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,7 @@
 | 
			
		||||
  $out['per']         = round(($bill_data['total_data_out'] / $bill_data['total_data'] * 100), 2);
 | 
			
		||||
  $out['bg']          = get_percentage_colours($out['per']);
 | 
			
		||||
 | 
			
		||||
  $ousage['over']     = $bill_data['total_data'] - ($bill_data['bill_gb'] * $config['billing']['base']);
 | 
			
		||||
  $ousage['over']     = $bill_data['total_data'] - ($bill_data['bill_quota']);
 | 
			
		||||
  $ousage['over']     = (($ousage['over'] < 0) ? "0" : $ousage['over']);
 | 
			
		||||
  $ousage['data']     = format_number($ousage['over'] , $config['billing']['base']);
 | 
			
		||||
  $ousage['allow']    = $total['allow'];
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user