<?php
class Invoice extends CI_Controller {

	function __construct(){
		parent::__construct();
	}

	function index(){	
		$this->invoice_list();
	}
	function invoice_list(){
		$this->_page_data['page_title']="List of Invoices";
		$this->_page_data['bredcrum']=array(
										'Invoice List'=>'#',
										'List of Invoices'=>'#',
										);
		$this->load->view('gc/invoice_list.php',$this->_page_data);
	}
	function add_invoice($purpose=null){
		
		$this->_page_data['purpose']=$purpose;
		$this->_page_data['page_title']=ucfirst($purpose)." Invoice";
		$this->_page_data['bredcrum']=array(
										'Invoice'=>'#',
										ucfirst($purpose).' Invoice'=>'#',
										);
		$this->_page_data['dealer_id']='';
		$this->_page_data['agent_id']='';
		$this->_page_data['client_id']='';
		$this->_page_data['vessel_id']='';
		$this->_page_data['client_address']='';
		$this->_page_data['invoice_no']='';
		$this->_page_data['invoice_date']='';
		$this->_page_data['dispatched_from_location']='';
		$this->_page_data['dispatched_to_location']='';
		$this->_page_data['unloaded_at_location']='';
		$this->_page_data['truck_no']='';
		$this->_page_data['credit_days']='';
		$this->_page_data['part_payment_percentage']='';
		$this->_page_data['part_payment_received_no_of_days']='';
		$this->_page_data['payment_reminder_start_days']='';
		$this->_page_data['payment_reminder_frequency']='';
		$this->_page_data['payment_reminder_frequency']='';
		$this->load->view('gc/manage_invoice.php',$this->_page_data);
	}
	function view_invoice($purpose=null){
		if($purpose == '')
			$purpose='view';
		
		$this->_page_data['purpose']=$purpose;
		$this->_page_data['page_title']=ucfirst($purpose)." Invoice";
		$this->_page_data['bredcrum']=array(
										'Invoice'=>'#',
										ucfirst($purpose).' Invoice'=>'#',
										);
		$this->load->view('gc/view_invoice.php',$this->_page_data);
	}
}
?>