344 lines
9.5 KiB
PHP
Executable File
344 lines
9.5 KiB
PHP
Executable File
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
require APPPATH . '/libraries/BaseController.php';
|
|
|
|
/**
|
|
* Class : Inward Gate Register Controller (security)
|
|
* User Class to control all user related operations.
|
|
* @author : Saravana kumar
|
|
* @version : 1.1
|
|
* @since : 10 Jun 2017
|
|
*/
|
|
class report extends BaseController
|
|
{
|
|
/**
|
|
* This is default constructor of the class
|
|
*/
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->load->model('dahsboard_Model');
|
|
|
|
$this->isLoggedIn();
|
|
}
|
|
public function pending_report()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
|
|
$data['pending_list']=$this->dahsboard_Model->req_list();
|
|
//print_r($data);
|
|
|
|
$this->loadviews("report_pendingreqst",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function releasedPO()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
|
|
$data['rel_po']=$this->dahsboard_Model->report_relpo();
|
|
|
|
|
|
$this->loadviews("Report_POreleased",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function openorderPO()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
|
|
$data['open_po']=$this->dahsboard_Model->report_openpending();
|
|
|
|
|
|
$this->loadviews("Report_openorder",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function TotalOrd()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
|
|
$data['Total']=$this->dahsboard_Model->report_total();
|
|
|
|
|
|
$this->loadviews("Report_totalorders",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function ccr()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
|
|
$data['ccrpt']=$this->dahsboard_Model->report_ccr();
|
|
|
|
|
|
$this->loadviews("Report_costcenter",$this->global,$data, NULL);
|
|
//print_r($data);
|
|
|
|
}
|
|
public function MM_Supplier()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
|
|
$data['mms']=$this->dahsboard_Model->report_MMSupplier();
|
|
|
|
|
|
$this->loadviews("Report_Material_Master_SupplierWise",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function MM_Item()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
|
|
$data['mmi']=$this->dahsboard_Model->report_MMItem();
|
|
|
|
|
|
$this->loadviews("Report_Material_Master_ItemWise",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function MM_ReceiptValue()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
|
|
$data['mmr']=$this->dahsboard_Model->report_MMReceiptValue();
|
|
|
|
|
|
$this->loadviews("Report_Material_Master_ReceiptValue",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function purchase()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
//$this->input->post('btn_submit');
|
|
$cname = $this->input->post('client_name');
|
|
$prod = $this->input->post('item_name');
|
|
$ab=$this->input->post('financialyear');
|
|
$fa=substr($ab,0,-5);
|
|
$aa=substr($ab,5,5);
|
|
$m=$this->input->post('month');
|
|
$frm = $this->input->post('from_date');
|
|
$t = $this->input->post('to_date');
|
|
//print_r($prod);
|
|
$data['material']=$this->dahsboard_Model->material_name();
|
|
$data['cust']=$this->dahsboard_Model->customer_name();
|
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
|
$data['purchase']=$this->dahsboard_Model->report_purchase($cname,$prod,$fa,$aa,$m,$frm,$t);
|
|
|
|
|
|
$this->loadviews("Report_purchase",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function link_purchase()
|
|
{
|
|
if ($this->input->post('btn_submit')) {
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
//$this->input->post('btn_submit');
|
|
$cname = $this->input->post('client_name');
|
|
$prod = $this->input->post('item_name');
|
|
$ab=$this->input->post('financialyear');
|
|
$fa=substr($ab,0,-5);
|
|
$aa=substr($ab,5,5);
|
|
$m=$this->input->post('month');
|
|
$frm = $this->input->post('from_date');
|
|
$t = $this->input->post('to_date');
|
|
//print_r($prod);
|
|
$data['material']=$this->dahsboard_Model->material_name();
|
|
$data['cust']=$this->dahsboard_Model->customer_name();
|
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
|
$data['purchase']=$this->dahsboard_Model->report_purchase($cname,$prod,$fa,$aa,$m,$frm,$t);
|
|
|
|
|
|
} else{
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
//$this->input->post('btn_submit');
|
|
$cname = $this->input->get('cname');
|
|
$prod = $this->input->get('prod');
|
|
$ab=$this->input->get('ab');
|
|
$fa=substr($ab,0,-5);
|
|
$aa=substr($ab,5,5);
|
|
$m=$this->input->get('month');
|
|
$frm = $this->input->get('frm');
|
|
$t = $this->input->get('t');
|
|
$sid=$this->input->get('sid');
|
|
$mid = $this->input->get('mid');
|
|
$d = $this->input->get('d');
|
|
|
|
//print_r($prod);
|
|
$data['material']=$this->dahsboard_Model->material_name();
|
|
$data['cust']=$this->dahsboard_Model->customer_name();
|
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
|
$data['purchase']=$this->dahsboard_Model->report_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d);
|
|
}
|
|
|
|
$this->loadviews("Report_purchase",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function year_wise()
|
|
{
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
if ($this->input->post('financialyear')) {
|
|
|
|
$data['year']=$this->dahsboard_Model->report_year_wise();
|
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
|
|
|
//$this->loadviews("Report_year_wise",$this->global,$data, NULL);
|
|
}
|
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
|
|
|
$this->loadviews("Report_year_wise",$this->global,$data, NULL);
|
|
}
|
|
|
|
public function month_wise()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
|
|
$month=$this->input->get('dat');
|
|
$mon= date("F",strtotime($month));
|
|
//print_r($month);
|
|
$data['mont']=$mon;
|
|
$data['month']=$this->dahsboard_Model->report_month_wise($month);
|
|
$this->loadviews("Report_month_wise",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function year_wise_total()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
$last = $this->uri->total_segments();
|
|
$month=$this->uri->segment($last);
|
|
$a=substr($month,0,-5);
|
|
$b=substr($month,5,5);
|
|
//print_r($month);
|
|
$data['year']=$month;
|
|
$data['ytotal']=$this->dahsboard_Model->report_year_wise_total($a,$b);
|
|
$this->loadviews("Report_year_wise_total",$this->global,$data, NULL);
|
|
|
|
}
|
|
|
|
public function purchase_supplier()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
//$this->input->post('btn_submit');
|
|
$cname = $this->input->post('client_name');
|
|
$ab=$this->input->post('financialyear');
|
|
$fa=substr($ab,0,-5);
|
|
$aa=substr($ab,5,5);
|
|
$m=$this->input->post('month');
|
|
$frm = $this->input->post('from_date');
|
|
$t = $this->input->post('to_date');
|
|
//print_r($prod);
|
|
$data['material']=$this->dahsboard_Model->material_name();
|
|
$data['cust']=$this->dahsboard_Model->customer_name();
|
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
|
$data['spurchse']=$this->dahsboard_Model->report_supplier($cname,$fa,$aa,$m,$frm,$t);
|
|
|
|
|
|
$this->loadviews("Report_supplier",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function consolidate()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
//$this->input->post('btn_submit');
|
|
$cname = $this->input->post('client_name');
|
|
$ab=$this->input->post('financialyear');
|
|
$fa=substr($ab,0,-5);
|
|
$aa=substr($ab,5,5);
|
|
//print_r($prod);
|
|
$data['material']=$this->dahsboard_Model->material_name();
|
|
$data['cust']=$this->dahsboard_Model->customer_name();
|
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
|
$data['spurchse']=$this->dahsboard_Model->report_consolidate($cname,$fa,$aa);
|
|
|
|
|
|
$this->loadviews("Report_consolidate",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function cumulative()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
|
|
//print_r($prod);
|
|
|
|
$data['cum']=$this->dahsboard_Model->report_cumulative();
|
|
$this->loadviews("Report_cumulative",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function cum_month()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
$last = $this->uri->segment_array();
|
|
|
|
$sup = $last[3];
|
|
$mat = $last[4];
|
|
//print_r($prod);
|
|
|
|
$data['cum_month']=$this->dahsboard_Model->report_cum_month($sup,$mat);
|
|
$this->loadviews("Report_cumulative_month",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function cum_year()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
$last = $this->uri->segment_array();
|
|
|
|
$sup = $last[3];
|
|
$mat = $last[4];
|
|
|
|
//print_r($sup);
|
|
|
|
$data['cum_year']=$this->dahsboard_Model->report_cum_year($sup,$mat);
|
|
$this->loadviews("Report_cumulative_year",$this->global,$data, NULL);
|
|
|
|
}
|
|
public function cum_day()
|
|
{
|
|
|
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
|
$last = $this->uri->segment_array();
|
|
|
|
$sup = $last[3];
|
|
$mat = $last[4];
|
|
//print_r($prod);
|
|
|
|
$data['cum_day']=$this->dahsboard_Model->report_cum_day($sup,$mat);
|
|
$this->loadviews("Report_cumulative_day",$this->global,$data, NULL);
|
|
|
|
}
|
|
|
|
|
|
}
|
|
?>
|