Пример #1
0
 <td align="center" height="30"><?php echo $row->total_charges; ?></td>
 
 <?php
     if($row->customer_prepaid == '1')
     {
         $bill_type = "Prepaid";
     }
     else
     {
         $bill_type = "Postapid";
     }
 ?>
 <td align="center" height="30"><?php echo $bill_type; ?></td>
 
 <?php
     $latest_status = invoices_any_cell($row->id, 'status');
     if($latest_status == 'paid')
     {
         $inv_status = '<span class="button green" style="width:52px">PAID</span>';
     }
     else if($latest_status == 'pending')
     {
         $inv_status = '<span class="button original_orange" style="width:52px">PENDING</span>';
     }
     else if($latest_status == 'over_due')
     {
         $inv_status = '<span class="button red">OVER DUE</span>';
     }
 ?>
 <td align="center" height="30"><?php echo $inv_status; ?></td>
 
Пример #2
0
	function mark_as_paid($id = '')
	{
		if($id == '')
		{
			redirect ('reseller/billing/invoices/');
		}

		if(!is_numeric($id)) //invalid value redirect 
		{
			redirect ('reseller/billing/invoices/');
		}
        
        if(invoices_any_cell($id, 'parent_id') != $this->session->userdata('customer_id'))
        {
            redirect ('reseller/billing/invoices/');
        }

		$this->billing_model->mark_as_paid($id);
		$this->session->set_flashdata('success','Invoice Paid Successfully.');
		redirect ('reseller/billing/invoices/');
	}