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

class CustomerReport extends CI_Controller {
	
	public function __construct(){
		parent::__construct();
		$this->load->model('Useraccess');
		$query = $this->Useraccess->useraccess_id_module2('3', 'transaction');
		if(!$query){
			echo '<script>alert("Not authorised..");
				window.location.replace("'.base_url().'Error");
				</script>';
		}
		$this->load->library('layouts');
		$this->load->model('menu');
	} 
        
        //trying rpt
        public function rptBank (){
           
            
            /**
             * header parameter :
              1) company (must)
               $this->load->model('company/company_info_model');
               $data['company'] = $this->company_info_model->companyById(element('compID', $this->session->userdata('logged_in'))); 
               2) rightContent 
                 array 
               3) rightContentHeader
                 string
               4) rightContent
                array
               5) leftContent
                 array 
               6 rptTitle
                 string
              7) id (must)
               integer (id of master table)
             * 
             * 
             *single array of string Example : $dataBody[bodyFooter] = array ("Total : 1,290.00","Total Tax: 0.00"),
             
             * body parameters
               1) rptDataDetail
                query result 
               2) selectFields
                    -array  (Field name in select)
               3)tableHeader
                   -array( label of the table )
               4) tableFooter
                    array 
             *
             */
        
          	$this->load->model('company/company_info_model');
            $this->load->model('bank/bank_model');
            $this->lang->load("bank",$this->session->userdata('language'));
          
             $headerData['id'] = $id;
             $headerData['rightContentHeader'] = "Name Supplier/ ot";
             $headerData['rptTitle'] = "Bank Master List";
             $headerData['rightContent'] = array("As at: ".date("d-m-Y"));
             $headerData['leftContent'] = array("Bank Listing : All");
             
            $headerData['company'] = $this->company_info_model->companyById(element('compID', $this->session->userdata('logged_in')));
              
             $bodyData['rptDataDetail'] = $this->bank_model->bank_all();
             $bodyData['tableHeader'] = array("Bank Name", "Branch", "Bank Account No", "Address", "Phone Number", "Fax","Email"); 
             $bodyData['selectFields'] = array("bankName", "branch", "bankAccountNo", "phoneNumber1","state","fax");
          
            
            $this->load->view('layouts/report/header', $headerData);
            $this->load->view('layouts/report/body', $bodyData);
            $this->load->view('layouts/report/footer','');
        }
        
        
        
	
	
}

	
/* End of file gltransaction.php */
/* Location: ./application/controller/gltransaction.php */
