<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Userreceivepayment extends CI_Controller {
    
    public function __construct() {
        parent::__construct();
         if (! $this->session->userdata ( 'user_logged_in' ) || !company_url($this->session->userdata ('company_slag'))) {
            redirect ( 'login', 'refresh' );
        }
        $this->load->vars ( array (
                'global' => 'Available to all views',
                'header' => 'common/header',
                'left' => 'common/left',
                'footer' => 'common/footer' 
        ) );

        $this->load->model('User_model');
        $this->load->model('Invoice_model');
    }

    public function index(){
        $data['invoice_list'] = array();
        $this->load->view('user_receive_payment_list',$data);
    }

    public function newpayment(){
        $data['invoice_id'] = !empty($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
        $where = array('contact_type' => 2,'status' => 1);
        $data['customer_list'] = $this->User_model->user_list_where($where); 
        $this->load->view('user_receive_payment',$data);
    }
}
?>