<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Reports extends Admin_Controller
{

    public function __construct()
    {
        parent::__construct();
		 if(user_type()!="admin"){
		     redirect('Dashboard', 'refresh');
		  }
        $this->load->library('form_validation');
		$this->load->model('Report_model');

    }
	
	public function transfer_report(){
	  $data=array();
	  $data['report_data']=$this->Report_model->transfer_report();
	  $this->load->view('theme/reports/transfer_report',$data);
	}
	
	public function payment_report(){
	  $data=array();
	  $data['report_data']=$this->Report_model->payment_report();
	  $this->load->view('theme/reports/payment_report',$data);
	}
	
	public function agent_wise_transfer_report(){
	  $id="";
	  if($this->input->post('agent')){
	  $id=$this->input->post('agent');
	  }
      $data=array();
	  $data['report_data']=$this->Report_model->agent_wise_transfer($id);
	  $this->load->view('theme/reports/agent_wise_transfer_report',$data);

	}
	
	public function agent_wise_payment_report(){
	  $id="";
	  if($this->input->post('agent')){
	  $id=$this->input->post('agent');
	  }
      $data=array();
	  $data['report_data']=$this->Report_model->agent_wise_payment($id);
	  $this->load->view('theme/reports/agent_wise_payment_report',$data);

	}
	
}