From f589150ae6b6e9eb17d9e200bb82954b0f8567a5 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 26 Apr 2018 14:46:07 +0530 Subject: [PATCH] all reports(code merged) --- application/config/routes.php | 1 + application/controllers/report.php | 944 ++++++++---------- application/models/dahsboard_model.php | 273 +++-- .../views/Report_Material_Master_ItemWise.php | 59 +- .../Report_Material_Master_ReceiptValue.php | 183 ++-- .../Report_Material_Master_SupplierWise.php | 65 +- application/views/Report_POreleased.php | 289 ++---- application/views/Report_attach_inward.php | 8 +- application/views/Report_consolidate.php | 379 ++++--- .../views/Report_consolidate_inward.php | 326 +++--- application/views/Report_consolidate_m.php | 11 +- .../views/Report_consolidate_month.php | 60 +- .../views/Report_consolidate_month_inward.php | 11 +- application/views/Report_consolidate_raw.php | 198 ++-- application/views/Report_consolidate_y.php | 12 +- application/views/Report_consolidate_year.php | 59 +- .../views/Report_consolidate_year_inward.php | 10 +- application/views/Report_costcenter.php | 289 +++--- application/views/Report_cumulative.php | 111 +- application/views/Report_cumulative_day.php | 66 +- .../views/Report_cumulative_day_inward.php | 55 +- .../views/Report_cumulative_day_raw.php | 57 +- .../views/Report_cumulative_inward.php | 80 +- application/views/Report_cumulative_month.php | 75 +- .../views/Report_cumulative_month_inward.php | 61 +- .../views/Report_cumulative_month_raw.php | 80 +- application/views/Report_cumulative_raw.php | 49 +- application/views/Report_cumulative_year.php | 79 +- .../views/Report_cumulative_year_inward.php | 65 +- .../views/Report_cumulative_year_raw.php | 75 +- application/views/Report_month_wise.php | 54 +- .../views/Report_month_wise_inward.php | 41 +- application/views/Report_openorder.php | 288 ++---- application/views/Report_pending_purchase.php | 15 +- application/views/Report_purchase.php | 73 +- application/views/Report_purchase_inward.php | 209 ++-- application/views/Report_supplier.php | 136 +-- application/views/Report_supplier_inward.php | 96 +- application/views/Report_totalorders.php | 260 ++--- application/views/Report_year_wise.php | 112 +-- application/views/Report_year_wise_inward.php | 108 +- application/views/Report_year_wise_total.php | 75 +- .../views/Report_year_wise_total_inward.php | 62 +- application/views/report_emp.php | 16 +- application/views/report_pendingreqst.php | 230 +---- application/views/reportmasterlist_inward.php | 30 +- 46 files changed, 2754 insertions(+), 3081 deletions(-) mode change 100644 => 100755 application/views/Report_consolidate.php mode change 100644 => 100755 application/views/Report_consolidate_inward.php mode change 100644 => 100755 application/views/Report_consolidate_m.php mode change 100644 => 100755 application/views/Report_consolidate_month.php mode change 100644 => 100755 application/views/Report_consolidate_raw.php mode change 100644 => 100755 application/views/Report_consolidate_y.php mode change 100644 => 100755 application/views/Report_consolidate_year.php mode change 100644 => 100755 application/views/Report_cumulative.php mode change 100644 => 100755 application/views/Report_cumulative_day.php mode change 100644 => 100755 application/views/Report_cumulative_day_inward.php mode change 100644 => 100755 application/views/Report_cumulative_day_raw.php mode change 100644 => 100755 application/views/Report_cumulative_inward.php mode change 100644 => 100755 application/views/Report_cumulative_month.php mode change 100644 => 100755 application/views/Report_cumulative_month_inward.php mode change 100644 => 100755 application/views/Report_cumulative_month_raw.php mode change 100644 => 100755 application/views/Report_cumulative_raw.php mode change 100644 => 100755 application/views/Report_cumulative_year.php mode change 100644 => 100755 application/views/Report_cumulative_year_inward.php mode change 100644 => 100755 application/views/Report_cumulative_year_raw.php mode change 100644 => 100755 application/views/Report_month_wise.php mode change 100644 => 100755 application/views/Report_month_wise_inward.php mode change 100644 => 100755 application/views/Report_pending_purchase.php mode change 100644 => 100755 application/views/Report_purchase_inward.php mode change 100644 => 100755 application/views/Report_supplier.php mode change 100644 => 100755 application/views/Report_supplier_inward.php mode change 100644 => 100755 application/views/Report_year_wise.php mode change 100644 => 100755 application/views/Report_year_wise_inward.php mode change 100644 => 100755 application/views/Report_year_wise_total.php mode change 100644 => 100755 application/views/Report_year_wise_total_inward.php mode change 100644 => 100755 application/views/report_emp.php mode change 100644 => 100755 application/views/reportmasterlist_inward.php diff --git a/application/config/routes.php b/application/config/routes.php index ee64ad85..9a3047f7 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -245,6 +245,7 @@ $route['Report_consolidate_category'] = "report/rawi_consolidate"; $route['Report_pending_purchase'] = "report/pending_purchase"; $route['Report_purchase_attach'] = "report/iattach"; $route['Report_Material_inward_Register'] ="user/getMaterialInwardRegister"; +$route['DeliveryPerformance']="user/deliver_perform"; diff --git a/application/controllers/report.php b/application/controllers/report.php index 6bc45af6..bf150f3b 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -13,180 +13,144 @@ class report extends BaseController { /** * This is default constructor of the class - */ + */ public function __construct() - { + { parent::__construct(); - $this->load->model('dahsboard_Model'); - $this->isLoggedIn(); + $this->load->model('dahsboard_Model'); + $this->isLoggedIn(); $this->CompanyName = $this->global['CompanyName']; - } - + } + public function pending_report() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; - if ($this->input->post('btn_submit')) { - - $this->global['pageTitle'] = 'Total Pending Requests Reports -'; - - $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'); - - $agf = $this->input->post('aging_from'); - - $agt = $this->input->post('aging_to'); - - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - $data['pending_list']=$this->dahsboard_Model->req_list($fa,$aa,$m,$frm,$t,$agf,$agt); - - - } - - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - - $this->loadviews("report_pendingreqst",$this->global,$data, NULL); - - - } - - public function releasedPO() - { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; - - if ($this->input->post('btn_submit')) { - - $this->global['pageTitle'] = 'Order Value - Released Reports - '; - $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'); - - $agf = $this->input->post('total_order_value_From'); - - $agt = $this->input->post('total_order_value_To'); - - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - $data['rel_po']=$this->dahsboard_Model->report_relpo($fa,$aa,$m,$frm,$t,$agf,$agt); + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + if ($this->input->post('btn_submit')) { + + $this->global['pageTitle'] = 'Total Pending Requests Reports '; + $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'); + $agf = $this->input->post('aging_from'); + $agt = $this->input->post('aging_to'); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['pending_list']=$this->dahsboard_Model->req_list($fa,$aa,$m,$frm,$t,$agf,$agt); + } $data['finyear']=$this->dahsboard_Model->report_finyear(); - - - //$data['rel_po']=$this->dahsboard_Model->report_relpo(); + $this->loadviews("report_pendingreqst",$this->global,$data, NULL); + + } + public function releasedPO() + { + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + if ($this->input->post('btn_submit')) { + + $this->global['pageTitle'] = 'Order Value - Released Reports '; + + $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'); + $agf = $this->input->post('total_order_value_From'); + $agt = $this->input->post('total_order_value_To'); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['rel_po']=$this->dahsboard_Model->report_relpo($fa,$aa,$m,$frm,$t,$agf,$agt); + + + } + + $data['finyear']=$this->dahsboard_Model->report_finyear(); + + $this->loadviews("Report_POreleased",$this->global,$data, NULL); - + - } - + } public function openorderPO() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; - - if ($this->input->post('btn_submit')) { - - $this->global['pageTitle'] = 'Open Orders - Pending Reports - '; - - - $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'); - - $agf = $this->input->post('total_order_value_From'); - - $agt = $this->input->post('total_order_value_To'); - - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - $data['open_po']=$this->dahsboard_Model->report_openpending($fa,$aa,$m,$frm,$t,$agf,$agt); - } - - - - - - $data['finyear']=$this->dahsboard_Model->report_finyear(); - + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + if ($this->input->post('btn_submit')) { + + $this->global['pageTitle'] = 'Open Orders - Pending Reports '; - + $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'); + $agf = $this->input->post('total_order_value_From'); + $agt = $this->input->post('total_order_value_To'); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['open_po']=$this->dahsboard_Model->report_openpending($fa,$aa,$m,$frm,$t,$agf,$agt); + + + } - //$data['open_po']=$this->dahsboard_Model->report_openpending(); - + $data['finyear']=$this->dahsboard_Model->report_finyear(); + + + $this->loadviews("Report_openorder",$this->global,$data, NULL); - + - } - + } public function TotalOrd() { - $this->global['pageTitle'] = 'Total Orders Reports'; + $this->global['pageTitle'] = 'Total Orders Reports'; - if ($this->input->post('financialyear')) { - $ab = $this->input->post('financialyear'); - $fa=substr($ab,0,-5); - $aa=substr($ab,5,5); - $data['finyear']=$this->dahsboard_Model->report_finyear(); - $data['Total']=$this->dahsboard_Model->report_total($fa,$aa); - } - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - $this->loadviews("Report_totalorders",$this->global,$data, NULL); - - } - + if ($this->input->post('financialyear')) { + $ab = $this->input->post('financialyear'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['Total']=$this->dahsboard_Model->report_total($fa,$aa); + } + $data['finyear']=$this->dahsboard_Model->report_finyear(); + + + $this->loadviews("Report_totalorders",$this->global,$data, NULL); + + + } public function ccr() { - $this->global['pageTitle'] = 'Cost Center Reports -'; + $this->global['pageTitle'] = 'Cost Center Reports '; + - if ($this->input->post('financialyear')) { - $ab = $this->input->post('financialyear'); - $fa=substr($ab,0,-5); - $aa=substr($ab,5,5); - - $data['finyear']=$this->dahsboard_Model->report_finyear(); - $data['ccrpt']=$this->dahsboard_Model->report_ccr($fa,$aa); - - } - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - $this->loadviews("Report_costcenter",$this->global,$data, NULL); - - - } + if ($this->input->post('financialyear')) { + $ab = $this->input->post('financialyear'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['ccrpt']=$this->dahsboard_Model->report_ccr($fa,$aa); + + } + $data['finyear']=$this->dahsboard_Model->report_finyear(); + + + + $this->loadviews("Report_costcenter",$this->global,$data, NULL); + + + //print_r($data); + + } public function MM_Supplier() { @@ -196,63 +160,50 @@ class report extends BaseController $data['mms']=$this->dahsboard_Model->report_MMSupplier(); + - $this->loadviews("Report_Material_Master_SupplierWise",$this->global,$data, NULL); - + $this->loadviews("Report_Material_Master_SupplierWise",$this->global,$data, NULL); + + } public function MM_Item() { - $this->global['pageTitle'] = 'Material Master - Item Wise Reports-'; + $this->global['pageTitle'] = 'Material Master - Item Wise Reports-'; - - + $data['mmi']=$this->dahsboard_Model->report_MMItem(); - - - - $this->loadviews("Report_Material_Master_ItemWise",$this->global,$data, NULL); - + $this->loadviews("Report_Material_Master_ItemWise",$this->global,$data, NULL); + } public function MM_ReceiptValue() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; - + + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + if ($this->input->post('btn_submit')) { + $this->global['pageTitle'] = 'Material Master - Receipt Value Reports-'; - if ($this->input->post('btn_submit')) { - - $this->global['pageTitle'] = 'Material Master - Receipt Value Reports-'; - - $ab=$this->input->post('financialyear'); - - $fa=substr($ab,0,-5); - - $aa=substr($ab,5,5); - - $m=$this->input->post('month'); - - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - $data['mmr']=$this->dahsboard_Model->report_MMReceiptValue($fa,$aa,$m); - - } - - $data['finyear']=$this->dahsboard_Model->report_finyear(); + $ab=$this->input->post('financialyear'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $m=$this->input->post('month'); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['mmr']=$this->dahsboard_Model->report_MMReceiptValue($fa,$aa,$m); + } + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $this->loadviews("Report_Material_Master_ReceiptValue",$this->global,$data, NULL); - - $this->loadviews("Report_Material_Master_ReceiptValue",$this->global,$data, NULL); - + } - - public function purchase() + public function purchase() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports '; - if ($this->input->post('btn_submit')) { + $this->global['pageTitle'] = $this->CompanyName.' : Reports '; + if ($this->input->post('btn_submit')) { $cname = $this->input->post('client_name'); $prod = $this->input->post('item_name'); $ab=$this->input->post('financialyear'); @@ -261,28 +212,24 @@ class report extends BaseController $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); + } $data['material']=$this->dahsboard_Model->material_name(); - $data['cust']=$this->dahsboard_Model->customer_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); - } - - $data['material']=$this->dahsboard_Model->material_name(); - $data['cust']=$this->dahsboard_Model->customer_name(); - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - - $this->loadviews("Report_purchase",$this->global,$data, NULL); - - + $this->loadviews("Report_purchase",$this->global,$data, NULL); + } public function link_purchase() { if ($this->input->post('btn_submit')) { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$this->input->post('btn_submit'); $cname = $this->input->post('client_name'); $prod = $this->input->post('item_name'); @@ -300,7 +247,8 @@ class report extends BaseController } else{ - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$this->input->post('btn_submit'); $cname = $this->input->get('cname'); $prod = $this->input->get('prod'); @@ -320,36 +268,40 @@ class report extends BaseController $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); - + $this->loadviews("Report_purchase",$this->global,$data, NULL); + + + } + public function year_wise() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; if ($this->input->post('financialyear')) { - - $ab=$this->input->post('financialyear'); + $ab=$this->input->post('financialyear'); $a=substr($ab,0,-5); $b=substr($ab,5,5); - $data['year']=$this->dahsboard_Model->report_year_wise($a,$b); - $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['year']=$this->dahsboard_Model->report_year_wise($a,$b); + $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); + + $this->loadviews("Report_year_wise",$this->global,$data, NULL); } public function month_wise() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $month=$this->input->get('dat'); @@ -357,14 +309,17 @@ class report extends BaseController //print_r($month); $data['mont']=$mon; $data['month']=$this->dahsboard_Model->report_month_wise($month); - $this->loadviews("Report_month_wise",$this->global,$data, NULL); - + + + $this->loadviews("Report_month_wise",$this->global,$data, NULL); + + } public function year_wise_total() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $last = $this->uri->total_segments(); $month=$this->uri->segment($last); @@ -373,15 +328,17 @@ class report extends BaseController //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); - + + + $this->loadviews("Report_year_wise_total",$this->global,$data, NULL); + + } public function purchase_supplier() { - $this->global['pageTitle'] = $this->CompanyName.' : Supplier-wise Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; if ($this->input->post('btn_submit')) { $cname = $this->input->post('client_name'); $ab=$this->input->post('financialyear'); @@ -390,24 +347,26 @@ class report extends BaseController $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); } - $data['material']=$this->dahsboard_Model->material_name(); - $data['cust']=$this->dahsboard_Model->customer_name(); - $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + - - $this->loadviews("Report_supplier",$this->global,$data, NULL); - + + $this->loadviews("Report_supplier",$this->global,$data, NULL); + + } public function consolidate() { - $this->global['pageTitle'] = $this->CompanyName.' : Consolidated Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; if ($this->input->post('btn_submit')) { $cname = $this->input->post('client_name'); $ab=$this->input->post('financialyear'); @@ -417,77 +376,87 @@ class report extends BaseController $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); - } - - $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); + } + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); - - $this->loadviews("Report_consolidate",$this->global,$data, NULL); + $this->loadviews("Report_consolidate",$this->global,$data, NULL); + - } - + + } public function consolidate_month() - { - - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; - $sid=$this->input->get('sid'); - $mid = $this->input->get('mid'); - $cname = $this->input->get('cname'); - $prod = $this->input->get('prod'); - $m = $this->input->get('m'); - $ab=$this->input->get('ab'); - $fa=substr($ab,0,-5); - $aa=substr($ab,5,5); - - $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->consolidate_month($m,$sid,$mid,$fa,$aa); + { + + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + //$this->input->post('btn_submit'); + $sid=$this->input->get('sid'); + $mid = $this->input->get('mid'); + $cname = $this->input->get('cname'); + $prod = $this->input->get('prod'); + //$mat = $this->input->get('mid'); + $m = $this->input->get('m'); + $ab=$this->input->get('ab'); + $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->consolidate_month($m,$sid,$mid,$fa,$aa); + // print_r( $data['spurchse']); + + $this->loadviews("Report_consolidate_m",$this->global,$data, NULL); + - $this->loadviews("Report_consolidate_m",$this->global,$data, NULL); - } - - public function consolidate_year() - { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; - $sid=$this->input->get('sid'); - $mid = $this->input->get('mid'); - $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); - - $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->consolidate_year($sid,$mid,$fa,$aa); + } + public function consolidate_year() + { + + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + //$this->input->post('btn_submit'); + $sid=$this->input->get('sid'); + $mid = $this->input->get('mid'); + $cname = $this->input->get('cname'); + $prod = $this->input->get('prod'); + //$mat = $this->input->get('mid'); + $ab=$this->input->get('ab'); + $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->consolidate_year($sid,$mid,$fa,$aa); + // print_r( $data['spurchse']); + + $this->loadviews("Report_consolidate_y",$this->global,$data, NULL); + - $this->loadviews("Report_consolidate_y",$this->global,$data, NULL); - } - - + } public function cumulative() { - $this->global['pageTitle'] = $this->CompanyName.' : Cumulative Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //print_r($prod); $data['cum']=$this->dahsboard_Model->report_cumulative(); - - $this->loadviews("Report_cumulative",$this->global,$data, NULL); + + + $this->loadviews("Report_cumulative",$this->global,$data, NULL); + + } public function cum_month() { - $this->global['pageTitle'] = $this->CompanyName.' : Cumulative Month-wise Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $last = $this->uri->segment_array(); $sup = $last[3]; @@ -495,15 +464,13 @@ class report extends BaseController //print_r($prod); $data['cum_month']=$this->dahsboard_Model->report_cum_month($sup,$mat); - - $this->loadviews("Report_cumulative_month",$this->global,$data, NULL); - + $this->loadviews("Report_cumulative_month",$this->global,$data, NULL); } public function cum_year() { - $this->global['pageTitle'] = $this->CompanyName.' : Cumulative Year-wise Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $last = $this->uri->segment_array(); $sup = $last[3]; @@ -512,14 +479,13 @@ class report extends BaseController //print_r($sup); $data['cum_year']=$this->dahsboard_Model->report_cum_year($sup,$mat); - $this->loadviews("Report_cumulative_year",$this->global,$data, NULL); - + $this->loadviews("Report_cumulative_year",$this->global,$data, NULL); } public function cum_day() { - $this->global['pageTitle'] = $this->CompanyName.' : Cumulative Day-wise Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $last = $this->uri->segment_array(); $sup = $last[3]; @@ -527,14 +493,13 @@ class report extends BaseController //print_r($prod); $data['cum_day']=$this->dahsboard_Model->report_cum_day($sup,$mat); - - $this->loadviews("Report_cumulative_day",$this->global,$data, NULL); - - } + $this->loadviews("Report_cumulative_day",$this->global,$data, NULL); + + } public function ipurchase() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; if ($this->input->post('btn_submit')) { $cname = $this->input->post('client_name'); $prod = $this->input->post('item_name'); @@ -545,30 +510,24 @@ class report extends BaseController $m=$this->input->post('month'); $frm = $this->input->post('from_date'); $t = $this->input->post('to_date'); - $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->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d); - } - $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->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat); + } + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $this->loadviews("Report_purchase_inward",$this->global,$data, NULL); - - } public function ilink_purchase() { if ($this->input->post('btn_submit')) { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$this->input->post('btn_submit'); $cname = $this->input->post('client_name'); $prod = $this->input->post('item_name'); @@ -578,41 +537,42 @@ class report extends BaseController $m=$this->input->post('month'); $frm = $this->input->post('from_date'); $t = $this->input->post('to_date'); + $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->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t); + $data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d); } else{ - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$this->input->post('btn_submit'); - $cname = $this->input->get('cname'); $cat = $this->input->get('cat'); + $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'); + $m=$this->input->get('m'); $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); + $da = $this->input->get('da'); + $po = $this->input->get('po'); $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->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat); + $data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat,$da,$po); } - $this->loadviews("Report_purchase_inward",$this->global,$data, NULL); - - } - + $this->loadviews("Report_purchase_inward",$this->global,$data, NULL); + } public function iattach() { @@ -638,37 +598,38 @@ class report extends BaseController // { $this->loadviews("Report_attach_inward",$this->global,$data, NULL); // } - // else // { // $this->loadViews("access", $this->global, $data, NULL); // } - } - + + } public function iyear_wise() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; if ($this->input->post('financialyear')) { - $ab=$this->input->post('financialyear'); + $ab=$this->input->post('financialyear'); $a=substr($ab,0,-5); $b=substr($ab,5,5); - $data['year']=$this->dahsboard_Model->ireport_year_wise($a,$b); - $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['year']=$this->dahsboard_Model->ireport_year_wise($a,$b); + $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_inward",$this->global,$data, NULL); + } public function imonth_wise() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $month=$this->input->get('dat'); @@ -676,13 +637,13 @@ class report extends BaseController //print_r($month); $data['mont']=$mon; $data['month']=$this->dahsboard_Model->ireport_month_wise($month); - $this->loadviews("Report_month_wise_inward",$this->global,$data, NULL); + $this->loadviews("Report_month_wise_inward",$this->global,$data, NULL); } public function iyear_wise_total() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $last = $this->uri->total_segments(); $month=$this->uri->segment($last); @@ -691,14 +652,14 @@ class report extends BaseController //print_r($month); $data['year']=$month; $data['ytotal']=$this->dahsboard_Model->ireport_year_wise_total($a,$b); - $this->loadviews("Report_year_wise_total_inward",$this->global,$data, NULL); + $this->loadviews("Report_year_wise_total_inward",$this->global,$data, NULL); } public function ipurchase_supplier() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; if ($this->input->post('btn_submit')) { $cname = $this->input->post('client_name'); $ab=$this->input->post('financialyear'); @@ -711,25 +672,17 @@ class report extends BaseController $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->ireport_supplier($cname,$fa,$aa,$m,$frm,$t); - } - $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->ireport_supplier($cname,$fa,$aa,$m,$frm,$t); + } + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); $this->loadviews("Report_supplier_inward",$this->global,$data, NULL); - - - - } public function iconsolidate() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; if ($this->input->post('btn_submit')) { $cname = $this->input->post('client_name'); $ab=$this->input->post('financialyear'); @@ -739,27 +692,24 @@ class report extends BaseController $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->ireport_consolidate($cname,$fa,$aa); - } - $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->ireport_consolidate($cname,$fa,$aa); + } + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $this->loadviews("Report_consolidate_inward",$this->global,$data, NULL); - - } + + } public function i_consolidate_month() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$this->input->post('btn_submit'); $sid=$this->input->get('sid'); $mid = $this->input->get('mid'); $cname = $this->input->get('cname'); $prod = $this->input->get('prod'); - $cname = $this->input->get('cname'); - $prod = $this->input->get('prod'); //$mat = $this->input->get('mid'); $m = $this->input->get('m'); $ab=$this->input->get('ab'); @@ -769,16 +719,18 @@ class report extends BaseController $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->i_consolidate_month($m,$sid,$prod,$fa,$aa); + $data['spurchse']=$this->dahsboard_Model->i_consolidate_month($m,$sid,$mid,$fa,$aa); // print_r( $data['spurchse']); + $this->loadviews("Report_consolidate_month_inward",$this->global,$data, NULL); + } public function i_consolidate_year() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; - //$this->input->post('btn_submit'); + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $sid=$this->input->get('sid'); $mid = $this->input->get('mid'); $cname = $this->input->get('cname'); @@ -793,41 +745,46 @@ class report extends BaseController $data['finyear']=$this->dahsboard_Model->report_finyear(); $data['spurchse']=$this->dahsboard_Model->i_consolidate_year($sid,$mid,$fa,$aa); // print_r( $data['spurchse']); + $this->loadviews("Report_consolidate_year_inward",$this->global,$data, NULL); + // } + // else + // { + // $this->loadViews("access", $this->global, $data, NULL); + // } } - public function icumulative() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //print_r($prod); $data['cum']=$this->dahsboard_Model->ireport_cumulative(); + $this->loadviews("Report_cumulative_inward",$this->global,$data, NULL); - - + } public function icum_month() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $last = $this->uri->segment_array(); $sup = $last[3]; $mat = $last[4]; //print_r($prod); - $data['cum_month']=$this->dahsboard_Model->ireport_cum_month($sup,$mat); - + $data['cum_month']=$this->dahsboard_Model->ireport_cum_month($sup,$mat); $this->loadviews("Report_cumulative_month_inward",$this->global,$data, NULL); + } public function icum_year() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $last = $this->uri->segment_array(); $sup = $last[3]; @@ -836,13 +793,13 @@ class report extends BaseController //print_r($sup); $data['cum_year']=$this->dahsboard_Model->ireport_cum_year($sup,$mat); - $this->loadviews("Report_cumulative_year_inward",$this->global,$data, NULL); + $this->loadviews("Report_cumulative_year_inward",$this->global,$data, NULL); } public function icum_day() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; $last = $this->uri->segment_array(); $sup = $last[3]; @@ -850,25 +807,26 @@ class report extends BaseController //print_r($prod); $data['cum_day']=$this->dahsboard_Model->ireport_cum_day($sup,$mat); - $this->loadviews("Report_cumulative_day_inward",$this->global,$data, NULL); + $this->loadviews("Report_cumulative_day_inward",$this->global,$data, NULL); - } - - public function rawi_cumulative() + } + public function rawi_cumulative() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //print_r($prod); $data['cum']=$this->dahsboard_Model->rawi_report_cumulative(); + $this->loadviews("Report_cumulative_raw",$this->global,$data, NULL); + } public function rawi_cum_year() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$mat=$this->input->get('mid'); $cat=$this->input->get('cat'); //print_r($sup); @@ -880,7 +838,7 @@ class report extends BaseController public function rawi_cum_month() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$mat=$this->input->get('mid'); $cat=$this->input->get('cat'); @@ -893,7 +851,7 @@ class report extends BaseController public function rawi_cum_day() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$mat=$this->input->get('mid'); $cat=$this->input->get('cat'); //print_r($prod); @@ -905,32 +863,30 @@ class report extends BaseController public function rawi_consolidate() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; if ($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); - - $data['material']=$this->dahsboard_Model->category(); - $data['cust']=$this->dahsboard_Model->customer_name(); - $data['finyear']=$this->dahsboard_Model->report_finyear(); - $data['spurchse']=$this->dahsboard_Model->rawi_report_consolidate($cname,$fa,$aa); - } + $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->category(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['spurchse']=$this->dahsboard_Model->rawi_report_consolidate($cname,$fa,$aa); + } $data['material']=$this->dahsboard_Model->category(); - $data['cust']=$this->dahsboard_Model->customer_name(); - $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); - $this->loadviews("Report_consolidate_raw",$this->global,$data, NULL); - + } public function rawi_consolidate_month() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$this->input->post('btn_submit'); $cat = $this->input->get('cat'); $sup = $this->input->get('sup'); @@ -945,14 +901,15 @@ class report extends BaseController $data['finyear']=$this->dahsboard_Model->report_finyear(); $data['spurchse']=$this->dahsboard_Model->rawi_consolidate_month($m,$cat,$sup,$fa,$aa); // print_r( $data['spurchse']); - + $this->loadviews("Report_consolidate_month",$this->global,$data, NULL); + } public function rawi_consolidate_year() { - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; //$this->input->post('btn_submit'); $cat = $this->input->get('cat'); $sup = $this->input->get('sup'); @@ -966,134 +923,120 @@ class report extends BaseController $data['finyear']=$this->dahsboard_Model->report_finyear(); $data['spurchse']=$this->dahsboard_Model->rawi_consolidate_year($cat,$sup,$fa,$aa); // print_r( $data['spurchse']); - + $this->loadviews("Report_consolidate_year",$this->global,$data, NULL); - } + } public function pending_purchase() - { - - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; - - if ($this->input->post('btn_submit')) { - - $cname = $this->input->post('client_name'); - - $prod = $this->input->post('item_name'); - - $ab=$this->input->post('financialyear'); - - $cat = $this->input->get('cat'); - - $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'); - - $data['material']=$this->dahsboard_Model->material_name(); - - $data['cust']=$this->dahsboard_Model->customer_name(); - - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - $data['ppurchse']=$this->dahsboard_Model->pending_purchase($cname,$prod,$fa,$aa,$m,$frm,$t); - - } - - $data['material']=$this->dahsboard_Model->material_name(); - - $data['cust']=$this->dahsboard_Model->customer_name(); - - $data['finyear']=$this->dahsboard_Model->report_finyear(); - - - $this->loadviews("Report_pending_purchase",$this->global,$data, NULL); - - } - - public function per() - { - - $this->global['pageTitle'] = $this->CompanyName.' : Reports'; - + { + + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + if ($this->input->post('btn_submit')) { + $cname = $this->input->post('client_name'); + $prod = $this->input->post('item_name'); $ab=$this->input->post('financialyear'); - + $cat = $this->input->get('cat'); $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['ppurchse']=$this->dahsboard_Model->pending_purchase($cname,$prod,$fa,$aa,$m,$frm,$t); + } + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + + // print_r( $data['spurchse']); + + $this->loadviews("Report_pending_purchase",$this->global,$data, NULL); + + } + public function per() + { + + $this->global['pageTitle'] = $this->CompanyName.' : Reports'; + + + $ab=$this->input->post('financialyear'); + + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $m=$this->input->post('month'); + + //print_r($prod); $data['fy']=$this->dahsboard_Model->fy(); $data['per']=$this->dahsboard_Model->per($fa,$aa,$m); - - + + // print_r( $data['spurchse']); + $this->loadviews("report_emp",$this->global,$data, NULL); - - } - - public function cashbook() - { - - $this->global['pageTitle'] = $this->CompanyName.' : Cashbook Reports'; - - $income="RECEIPT"; - $expense="PAYMENT"; + - $data['cashbook']=$this->dahsboard_Model->cashbook(); - $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); - $data['tdy']=$this->dahsboard_Model->today(); + } + public function cashbook() + { + + + $this->global['pageTitle'] = $this->CompanyName.' : Cashbook Reports'; + + $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); + $data['getTotalServicePoCount'] = $this->dahsboard_Model->getTotalServicePoCount(); + $data['getTotalimportPoCount'] = $this->dahsboard_Model->getTotalimportPoCount(); + $data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount(); + $data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount(); + $data['cashbook']=$this->dahsboard_Model->cashbook(); + + $income="RECEIPT"; + $expense="PAYMENT"; + $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income); + $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense); + $data['todayincome']=$this->dahsboard_Model->today_data($income); + $data['todayexpense']=$this->dahsboard_Model->today_data($expense); + $data['yearincome']=$this->dahsboard_Model->yearwise_data($income); + $data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense); + $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); + $data['tdy']=$this->dahsboard_Model->today(); + //echo ($data['tdy']); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + //print_r($data['gettoptotal1']); + // $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data_income(); + // $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data_expense(); + // $data['todayincome']=$this->dahsboard_Model->today_data_income(); + // $data['todayexpense']=$this->dahsboard_Model->today_data_expense(); - //This Array used to get and display today data (for today tile option) - $data['todayincome']=$this->dahsboard_Model->today_data($income); - $data['todayexpense']=$this->dahsboard_Model->today_data($expense); - //This Array used to get and display current month data (for monthly tile option) - $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income); - $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense); - //This Array used to get and display current fin year data (for yearly tile option) - $data['yearincome']=$this->dahsboard_Model->yearwise_data($income); - $data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense); - - $now = new DateTime(); - $currentdate = $now->format('Y-m-d'); // MySQL datetime format - $yesterday = date('Y-m-d', strtotime("-1 day")); - - $data['yesterdaytotal'] = $this->dahsboard_Model->daybeforetotal($yesterday); - + + $this->loadviews("reportcashbook",$this->global,$data, NULL); + + } - $this->loadviews("reportcashbook",$this->global,$data, NULL); - - } - - - //This Function used to get and display today data (link = form today tile option)// + //This Function used to get and display today data (link = form today tile option)// // public function Viewtoday() - public function daily_incexp() - { - - $this->global['pageTitle'] = $this->CompanyName.' : Cashbook Daily Reports'; - $data['tdy']=$this->dahsboard_Model->today(); - //$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - - $now = new DateTime(); - $currentdate = $now->format('Y-m-d'); // MySQL datetime format - $yesterday = date('Y-m-d', strtotime("-1 day")); - - $data['yesterdaytotal'] = $this->dahsboard_Model->daybeforetotal($yesterday); - - $this->loadviews("cashbooktoday",$this->global,$data, NULL); - } - - //This Function used to get and display current monthly data (link = form monthly tile option)// - //public function monthexpenses() - public function load_monthly_incexp() + public function daily_incexp() + { + + $this->global['pageTitle'] = $this->CompanyName.' : Cashbook Daily Reports'; + $data['tdy']=$this->dahsboard_Model->today(); + //$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + + $now = new DateTime(); + $currentdate = $now->format('Y-m-d'); // MySQL datetime format + $yesterday = date('Y-m-d', strtotime("-1 day")); + + $data['yesterdaytotal'] = $this->dahsboard_Model->daybeforetotal($yesterday); + + $this->loadviews("cashbooktoday",$this->global,$data, NULL); + } + + //This Function used to get and display current monthly data (link = form monthly tile option)// + public function load_monthly_incexp() { $data['monthyearvalue'] = ''; $this->global['pageTitle'] = $this->CompanyName.' : Cashbook Monthly Reports'; $this->loadviews("cashbookmthlyreport",$this->global,$data, NULL); @@ -1208,6 +1151,5 @@ class report extends BaseController $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); } - } -?> +?> \ No newline at end of file diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index 87a583e9..c6f92e1b 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -11,8 +11,8 @@ class dahsboard_Model extends CI_Model } - - /* HR DASHBOART Model START*/ + + /* HR DASHBOART Model START*/ function totemp() { @@ -903,6 +903,7 @@ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IG ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0) as discount, ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) as freight, ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) as Package, +ifnull(rt.Insurance,0) as insurance, round(( if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)), if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)), @@ -912,6 +913,7 @@ ifnull(sum(pl.Quantity * pl.Rate),0))) + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) ++ ifnull(rt.Insurance,0) - ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total FROM T_PurchaseOrder_Master pm join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO @@ -977,6 +979,7 @@ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IG ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0) as discount, ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) as freight, ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) as Package, +ifnull(rt.Insurance,0) as insurance, round(( if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)), if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)), @@ -986,6 +989,7 @@ ifnull(sum(pl.Quantity * pl.Rate),0))) + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) ++ ifnull(rt.Insurance,0) - ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO @@ -1134,9 +1138,7 @@ group by supplier_name,material_name"; case pm.POType when 'IMPORT' -then ifnull((sum(distinct(pl.Quantity * pl.Rate) * pm.ExchangeRate) - -),0) +then ifnull((sum(distinct(pl.Quantity * pl.Rate) * pm.ExchangeRate)),0) + ifnull(rt.Insurance,0) when 'CAPITAL' then sum(distinct if(pm.CapitalRange=0,(( pl.Quantity * pl.Rate) * pm.ExchangeRate),( pl.Quantity * pl.Rate) - st.Afterdiscountval)) @@ -1144,6 +1146,7 @@ then sum(distinct if(pm.CapitalRange=0,(( pl.Quantity * pl.Rate) * pm.ExchangeR + ifnull(sum(distinct st.After_CGST),0) + ifnull(sum(distinct st.After_IGST),0) + ifnull(sum(distinct st.AfterFreightValue),0) ++ ifnull(rt.Insurance,0) when 'SERVICE' @@ -1152,6 +1155,7 @@ then ifnull(sum(distinct pl.Quantity * pl.Rate),0) + ifnull(sum(distinct st.After_CGST),0) + ifnull(sum(distinct st.After_IGST),0) + ifnull(sum(distinct st.AfterFreightValue),0) ++ ifnull(rt.Insurance,0) - ifnull(sum(distinct st.Afterdiscountval),0) when 'REVENUE' @@ -1162,6 +1166,7 @@ then ifnull(sum(distinct pl.Quantity * pl.Rate),0) + ifnull(sum(distinct rt.AfterIGST),0) + ifnull(sum(distinct rt.AfterFreightValue),0) + ifnull(sum(distinct rt.AfterPackagingValue),0) ++ ifnull(rt.Insurance,0) end as total @@ -1400,32 +1405,56 @@ group by supplier_name,material_name"; function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat){ - $sql="select im.IGRNO as igrn,im.PONO as pono,pm.POType as potype,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(distinct id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(distinct id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) as sgst, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) as cgst, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) as igst, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0) as discount, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) as freight, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) as Package, + $sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,round(sum(id.QuantityAsPerInvoice) * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) as cgst, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) as igst, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2) as discount, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) as freight, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) as Package, + round(( - if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)), -if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)), -ifnull(sum(distinct id.QuantityAsPerInvoice * pl.Rate),0))) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) -- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total,pb.FilePath as file + if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)), +if(POType = 'CAPITAL' && CapitalRange = 0,sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)), +ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0))) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) +- round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total, +pb.FilePath as file from T_IGR_Master im -join T_IGR_Details id on id.IGRNO = im.IGRNO join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO +join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo -left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO +left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO where pm.Status != 'ST030' "; if ($cname!= ''){ @@ -1473,35 +1502,59 @@ $sql.="group by pono,material_name,category,supplier_name"; $query = $this->db->query($sql); return $query->result(); } - function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat){ + function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat,$da,$po){ - $sql="select im.IGRNO as igrn,im.PONO as pono,pm.POType as potype,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(distinct id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(distinct id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) as sgst, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) as cgst, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) as igst, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0) as discount, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) as freight, -ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) as Package, + $sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,round(sum(id.QuantityAsPerInvoice) * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) as cgst, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) as igst, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2) as discount, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity), +sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) as freight, +round(ifnull(if(POType = 'REVENUE', +sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) as Package, + round(( - if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)), -if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)), -ifnull(sum(distinct id.QuantityAsPerInvoice * pl.Rate),0))) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) -+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) -- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total,pb.FilePath as file + if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)), +if(POType = 'CAPITAL' && CapitalRange = 0,sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)), +ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0))) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) ++ round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) +- round(ifnull(if(POType = 'REVENUE', + sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), + sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total, +pb.FilePath as file from T_IGR_Master im -join T_IGR_Details id on id.IGRNO = im.IGRNO join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO +join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo -left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO +left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO where pm.Status != 'ST030' "; if ($cname!= ''){ @@ -1555,6 +1608,16 @@ if ($cname!= ''){ $sql.=" and mm.Category = '".$cat."' "; + } + if ($da!= ''){ + $ddd= date("Y-m-d",strtotime($da)); + $sql.=" and date(im.CreatedDate) = '".$ddd."' "; + + } + if ($po!= ''){ + + $sql.=" and im.PONO = '".$po."' "; + } @@ -1566,53 +1629,51 @@ $sql.="group by pono,material_name,category,supplier_name"; $query = $this->db->query($sql); return $query->result(); } - - - function ireport_attachment($cname,$fa,$aa,$m,$frm,$t){ + function ireport_attachment($cname,$fa,$aa,$m,$frm,$t){ - $sql="select pono,potype,date_format(created_date,'%d-%m-%Y') as created_date,supplier_name, + $sql="select pono,potype,date_format(created_date,'%d-%m-%Y') as created_date,supplier_name, sum(total) as total,file from igr where status != 'ST030' "; if ($cname!= ''){ - - $sql.="and supplier_name = '".$cname."'"; - } + $sql.="and supplier_name = '".$cname."'"; + + } + + + + if ($fa and $aa != ''){ + $sql.=" and (created_date >= '".$fa."-04-01' and created_date <= '".$aa."-03-31')"; + + } + if ($m!= ''){ + $sql.="and monthname(created_date) = '".$m."'"; + + } + + if ($frm and $t != ''){ + $fromd= date("Y-m-d",strtotime($frm)); + $tod=date("Y-m-d",strtotime($t)); - if ($fa and $aa != ''){ - - $sql.=" and (created_date >= '".$fa."-04-01' and created_date <= '".$aa."-03-31')"; + $sql.="and date(created_date) >= '".$fromd."' + and date(created_date) <= '".$tod."'"; + + } - } - if ($m!= ''){ - - $sql.="and monthname(created_date) = '".$m."'"; - - } - - if ($frm and $t != ''){ - $fromd= date("Y-m-d",strtotime($frm)); - $tod=date("Y-m-d",strtotime($t)); - - $sql.="and date(created_date) >= '".$fromd."' - and date(created_date) <= '".$tod."'"; - - } - - $sql.="group by pono"; + $sql.="group by pono"; // echo $m; // echo $sid; //echo $sql; - $query = $this->db->query($sql); - return $query->result(); - } - + $query = $this->db->query($sql); + return $query->result(); + } + function ireport_year_wise($a,$b){ @@ -1653,51 +1714,55 @@ group by material_name,supplier_name"; function ireport_supplier($cname,$fa,$aa,$m,$frm,$t){ - $sql="SELECT sd.SupplierID as sid,sd.SupplierName as supplier_name,count(im.PONO) as counts,ifnull(sum(id.QuantityAsPerInvoice),0) as quantity,round(ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0),2) as value, + $sql="SELECT sd.SupplierID as sid,sd.SupplierName as supplier_name,count(im.PONO) as counts,ifnull(sum(id.QuantityAsPerInvoice),0) as quantity,round(ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0),2) as value, case pm.POType when 'IMPORT' -then ifnull((sum(distinct(id.QuantityAsPerInvoice * pl.Rate) * pm.ExchangeRate) +then ifnull((sum((id.QuantityAsPerInvoice * pl.Rate) * pm.ExchangeRate) ++ ifnull(rt.Insurance,0) ),0) when 'CAPITAL' -then sum(distinct if(pm.CapitalRange=0,(( id.QuantityAsPerInvoice * pl.Rate) * pm.ExchangeRate),( id.QuantityAsPerInvoice * pl.Rate) +then sum( if(pm.CapitalRange=0,(( id.QuantityAsPerInvoice * pl.Rate) * pm.ExchangeRate),( id.QuantityAsPerInvoice * pl.Rate) - st.Afterdiscountval)) -+ ifnull(sum(distinct st.After_SGST),0) -+ ifnull(sum(distinct st.After_CGST),0) -+ ifnull(sum(distinct st.After_IGST),0) -+ ifnull(sum(distinct st.AfterFreightValue),0) ++ ifnull(sum(st.After_SGST),0) ++ ifnull(sum(st.After_CGST),0) ++ ifnull(sum(st.After_IGST),0) ++ ifnull(sum(st.AfterFreightValue),0) ++ ifnull(rt.Insurance,0) when 'SERVICE' -then ifnull(sum(distinct id.QuantityAsPerInvoice * pl.Rate),0) -+ ifnull(sum(distinct st.After_SGST),0) -+ ifnull(sum(distinct st.After_CGST),0) -+ ifnull(sum(distinct st.After_IGST),0) -+ ifnull(sum(distinct st.AfterFreightValue),0) -- ifnull(sum(distinct st.Afterdiscountval),0) +then ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0) ++ ifnull(sum(st.After_SGST),0) ++ ifnull(sum(st.After_CGST),0) ++ ifnull(sum(st.After_IGST),0) ++ ifnull(sum(st.AfterFreightValue),0) ++ ifnull(rt.Insurance,0) +- ifnull(sum(st.Afterdiscountval),0) when 'REVENUE' -then ifnull(sum(distinct id.QuantityAsPerInvoice * pl.Rate),0) -- ifnull(sum(distinct rt.AfterDiscount),0) -+ ifnull(sum(distinct rt.AfterSGST),0) -+ ifnull(sum(distinct rt.AfterCGST),0) -+ ifnull(sum(distinct rt.AfterIGST),0) -+ ifnull(sum(distinct rt.AfterFreightValue),0) -+ ifnull(sum(distinct rt.AfterPackagingValue),0) +then ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0) +- ifnull(sum(rt.AfterDiscount),0) ++ ifnull(sum(rt.AfterSGST),0) ++ ifnull(sum(rt.AfterCGST),0) ++ ifnull(sum(rt.AfterIGST),0) ++ ifnull(sum(rt.AfterFreightValue),0) ++ ifnull(sum(rt.AfterPackagingValue),0) ++ ifnull(rt.Insurance,0) end as total -from T_IGR_Master im -join T_IGR_Details id on id.IGRNO = im.IGRNO +from T_IGR_Master im join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO -join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO -left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode -left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo -left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo -left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO -where pm.Status != 'ST030' "; + join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode + join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO + left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode + left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID + left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo + left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo + left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO + where pm.Status != 'ST030'"; if ($cname!= ''){ @@ -2102,7 +2167,9 @@ if ($cname!= ''){ //echo $sql; return $query->result(); } - function cashbook() + +//Cashbook query are., + function cashbook() { $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date, ifnull(case diff --git a/application/views/Report_Material_Master_ItemWise.php b/application/views/Report_Material_Master_ItemWise.php index 4e196199..254d9478 100755 --- a/application/views/Report_Material_Master_ItemWise.php +++ b/application/views/Report_Material_Master_ItemWise.php @@ -6,11 +6,10 @@ if(!empty($mmi)) } ?> - + -
- - +

@@ -49,7 +46,7 @@ if(!empty($mmi))
- +
@@ -57,6 +54,7 @@ if(!empty($mmi)) + @@ -72,7 +70,7 @@ if(!empty($mmi)) - + @@ -92,16 +90,17 @@ if(!empty($mmi)) - - + + + + + + + + + + - - - - - - - - - - - - -
- - +

-
-

Report - Material Master - Receipt Value

+

Report - Material Master - Receipt Value +

input->post('financialyear')){ - $ab=$this->input->post('financialyear'); - echo '('.$ab.')'; - echo ' '; - - } - if($this->input->post('month')){ - $m=$this->input->post('month'); - echo '('.$m.')'; - echo ' '; - } - ?>

+ + ?> +

-
- - +
- + + +
- -
- -
-
-
- -
- -
-
+ + + + + +

- - -
-
- -
- + + +
-
Material Name UOM CategoryHSNCODE
MaterialName?> UOM?> Category?>HSNCODE?>
+
- + - @@ -225,9 +162,11 @@ if(!empty($mmr)) - + + + - + - - - - -
Month Material Code Material Name UOMAverage RateAverage Rate ( )
MaterialCode?> MaterialName?> UOM?>Average_Rate,2,'.',''); - echo number_format($rel->Average_Rate,2,'.','')?>Average_Rate,2,'.',''); + echo number_format($rel->Average_Rate,2,'.','')?>
@@ -261,14 +193,16 @@ if(!empty($mmr))
-
. -
+ +
- - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_attach_inward.php b/application/views/Report_attach_inward.php index b47cc73c..9eefcd41 100755 --- a/application/views/Report_attach_inward.php +++ b/application/views/Report_attach_inward.php @@ -36,15 +36,15 @@ if(!empty($mms)) float: right; } - .btn-success { + .btn-success { background-color: #5d0411; border-color: #5d0411; - } + }
-

+

@@ -278,7 +278,7 @@ if(!empty($mms))
-
+ diff --git a/application/views/Report_consolidate.php b/application/views/Report_consolidate.php old mode 100644 new mode 100755 index c4c7c35d..223fe0fe --- a/application/views/Report_consolidate.php +++ b/application/views/Report_consolidate.php @@ -1,14 +1,24 @@ - - + + + + @@ -46,7 +70,9 @@ $ab=$this->input->post('financialyear'); echo '('.$ab.')'; } - ?>

+ + ?> +

@@ -55,7 +81,7 @@
-
+
@@ -100,20 +126,21 @@
-

+
+
-

+

- + @@ -121,30 +148,30 @@
- +
- - - + + + - - - - - - - - - - + + + + + + + + + + - material_name)) { echo $result->material_name ; } else {echo "-";} ?> - - - - + - - - - - - - - - - + @@ -345,38 +402,42 @@ - +
SupplierProductAprilSupplier NameMaterial NameApr MayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuaryFebruaryMarchJunJulAugSepOctNovDecJanFebMar Total
April); ?> + April); + ?> April);?> May);?> - May);?> June);?> - June);?> + May); + ?> + May);?> July);?> + June); + ?> + June);?> + July); + ?> July);?> August); ?> + August); + ?> August);?> September); ?> + September); + ?> September);?> October); ?> + October); + ?> October);?> November); ?> + November); + ?> November);?> December); ?> + December); + ?> December);?> January); ?> + January); + ?> January);?> February); ?> + February); + ?> February);?> March); ?> + March); + ?> March);?> qtotal); ?> - qtotal);?> + qtotal); + ?> + qtotal);?>
@@ -589,20 +681,17 @@
- - - - - - - - - - - - - - + + + + + + + + + + + - + -
- -

@@ -48,19 +59,15 @@

Report - Consolidate-Inward

input->post('client_name')){ - $cl=$this->input->post('client_name'); - echo $cl; - } - if($this->input->post('financialyear')){ $ab=$this->input->post('financialyear'); echo '('.$ab.')'; } + ?>

@@ -79,7 +86,6 @@ @@ -142,7 +148,7 @@ Supplier Name - Material Name + Material Name Apr May Jun @@ -161,8 +167,8 @@ - material_name)) { echo $result->material_name ; } else {echo "-";} ?> - April); ?> + April); + ?> April);?> - May); ?> + May); + ?> May);?> - June); ?> + June); + ?> June);?> - July); ?> + July); + ?> July);?> - August); ?> - August);?> - - September); ?> + August); + ?> + August);?> + + September); + ?> September);?> - October); ?> + October); + ?> October);?> - November); ?> + November); + ?> November);?> - December); ?> + December); + ?> December);?> - January); ?> + January); + ?> January);?> - February); ?> + February); + ?> February);?> - March); ?> - April);?> + March); + ?> + March);?> - qtotal); ?> - qtotal);?> + qtotal); + ?> + qtotal);?> @@ -366,7 +398,12 @@ - +
@@ -396,8 +433,8 @@ - - supplier_name;?> + supplier_name;?> - - material_name)) { echo $result->material_name ; } else {echo "-";} - ?> + material_name)) { echo $result->material_name ; } else {echo "-";} + ?> + vApril,2,'.',''); + ?> + vApril,2,'.','');?> - - vApril,2,'.',''); ?> - vApril,2,'.','');?> - - - vMay,2,'.',''); ?> + vMay,2,'.',''); + ?> vMay,2,'.','');?> - - vJune,2,'.',''); ?> - vJune,2,'.','');?> + vJune,2,'.',''); + ?> + vJune,2,'.','');?> + + vJuly,2,'.',''); + ?> + vJuly,2,'.','');?> - - vJuly,2,'.',''); ?> - vJuly,2,'.','');?> + vAugust,2,'.',''); + ?> + vAugust,2,'.','');?> - - vAugust,2,'.',''); ?> - vAugust,2,'.','');?> - - - vSeptember,2,'.',''); ?> - vSeptember,2,'.','');?> - - - vOctober,2,'.',''); ?> - vOctober,2,'.','');?> - - - vNovember,2,'.',''); ?> - vNovember,2,'.','');?> - - - vDecember,2,'.',''); ?> - vDecember,2,'.','');?> - - - vJanuary,2,'.',''); ?> - vJanuary,2,'.','');?> - - - vFebruary,2,'.',''); ?> - vFebruary,2,'.','');?> - - - vMarch,2,'.',''); ?> - vMarch,2,'.','');?> - - - vtotal,2,'.',''); ?> - vtotal,2,'.','');?> + vSeptember,2,'.',''); + ?> + vSeptember,2,'.','');?> + vOctober,2,'.',''); + ?> + vOctober,2,'.','');?> + + vNovember,2,'.',''); + ?> + vNovember,2,'.','');?> + + vDecember,2,'.',''); + ?> + vDecember,2,'.','');?> + + vJanuary,2,'.',''); + ?> + vJanuary,2,'.','');?> + + vFebruary,2,'.',''); + ?> + vFebruary,2,'.','');?> + + vMarch,2,'.',''); + ?> + vMarch,2,'.','');?> + + vtotal,2,'.',''); + ?> + vtotal,2,'.','');?> + - +
@@ -625,45 +678,44 @@ - - + + - - - - - - - + + + + + + + @@ -176,7 +176,6 @@ $(document).ready(function() { extend: 'excelHtml5', footer: 'true', //messageTop: $('h3').text(), - //title: 'REPORT-Consolidate', title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_consolidate_month.php b/application/views/Report_consolidate_month.php old mode 100644 new mode 100755 index 7fe408c2..761783b8 --- a/application/views/Report_consolidate_month.php +++ b/application/views/Report_consolidate_month.php @@ -6,11 +6,10 @@ if(!empty($mms)) } ?> - + - -
-

+
+

-

Report - Consolidate Month(

Report - Consolidate Category-Wise(input->get('m'); echo $m; ?>)

@@ -162,15 +161,15 @@ if(!empty($mms))
-
+
- - - - - - - + + + + + + + @@ -173,7 +177,6 @@ $(document).ready(function() { extend: 'excelHtml5', footer: 'true', //messageTop: $('h3').text(), - //title: 'REPORT - Consolidate Inward', title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_consolidate_raw.php b/application/views/Report_consolidate_raw.php old mode 100644 new mode 100755 index 9eab7116..8ba09802 --- a/application/views/Report_consolidate_raw.php +++ b/application/views/Report_consolidate_raw.php @@ -9,11 +9,10 @@ }); - + - -
- -

+
+

@@ -46,23 +58,16 @@

Report - Consolidate (Category-Wise)

- input->post('client_name')){ - $cl=$this->input->post('client_name'); - echo $cl; - } - if($this->input->post('financialyear')){ - $ab=$this->input->post('financialyear'); - echo '('.$ab.')'; - - } - + } + ?>

@@ -161,7 +166,7 @@ - April); + $apr= $apr + round($result->April); ?> April);?> May); + $may= $may + round($result->May); ?> May);?> @@ -396,7 +401,12 @@ - +
@@ -425,7 +435,7 @@ - vApril ,2,'.',''); + $apr= $apr + number_format($result->vApril,2,'.',''); ?> - vApril ,2,'.','');?> + vApril,2,'.','');?> vMay ,2,'.',''); + $may= $may + number_format($result->vMay,2,'.',''); ?> - vMay ,2,'.','');?> + vMay,2,'.','');?> vJune ,2,'.',''); + $jun= $jun + number_format($result->vJune,2,'.',''); ?> - vJune ,2,'.','');?> + vJune,2,'.','');?> vJuly ,2,'.',''); + $jul= $jul + number_format($result->vJuly,2,'.',''); ?> - vJuly ,2,'.','');?> + vJuly,2,'.','');?> vAugust ,2,'.',''); + $aug= $aug + number_format($result->vAugust,2,'.',''); ?> - vAugust ,2,'.','');?> + vAugust,2,'.','');?> vSeptember ,2,'.',''); + $sep= $sep + number_format($result->vSeptember,2,'.',''); ?> - vSeptember ,2,'.','');?> + vSeptember,2,'.','');?> vOctober ,2,'.',''); + $oct= $oct + number_format($result->vOctober,2,'.',''); ?> - vOctober ,2,'.','');?> + vOctober,2,'.','');?> vNovember ,2,'.',''); + $nov= $nov + number_format($result->vNovember,2,'.',''); ?> - vNovember ,2,'.','');?> + vNovember,2,'.','');?> vDecember ,2,'.',''); + $dec= $dec + number_format($result->vDecember,2,'.',''); ?> - vDecember ,2,'.','');?> + vDecember,2,'.','');?> vJanuary ,2,'.',''); + $jan= $jan + number_format($result->vJanuary,2,'.',''); ?> - vJanuary ,2,'.','');?> + vJanuary,2,'.','');?> vFebruary ,2,'.',''); + $feb= $feb + number_format($result->vFebruary,2,'.',''); ?> - vFebruary ,2,'.','');?> + vFebruary,2,'.','');?> vMarch ,2,'.',''); + $mar= $mar + number_format($result->vMarch,2,'.',''); ?> - vMarch ,2,'.','');?> + vMarch,2,'.','');?> vtotal ,2,'.',''); + $tot= $tot + number_format($result->vtotal,2,'.',''); ?> - vtotal ,2,'.','');?> + vtotal,2,'.','');?> @@ -658,7 +668,12 @@ - +
@@ -667,17 +682,17 @@
-
-
-
+ + + - - - - - - - + + + + + + + @@ -178,7 +177,6 @@ $(document).ready(function() { extend: 'excelHtml5', footer: 'true', //messageTop: $('h3').text(), - //title: 'REPORT-Consolidate', title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_consolidate_year.php b/application/views/Report_consolidate_year.php old mode 100644 new mode 100755 index aa7a2ead..798bbb53 --- a/application/views/Report_consolidate_year.php +++ b/application/views/Report_consolidate_year.php @@ -6,11 +6,10 @@ if(!empty($mms)) } ?> - - +
-

+

@@ -162,16 +161,16 @@ if(!empty($mms))
-
-
+ + - - - - - - - + + + + + + + @@ -174,7 +179,6 @@ $(document).ready(function() { extend: 'excelHtml5', footer: 'true', //messageTop: $('h3').text(), - //title: 'REPORT - Consolidate Inward', title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_costcenter.php b/application/views/Report_costcenter.php index 64a0d6ad..8d2035be 100755 --- a/application/views/Report_costcenter.php +++ b/application/views/Report_costcenter.php @@ -1,3 +1,5 @@ + + - - + -
+

@@ -49,146 +53,149 @@ if(!empty($ccrpt))

Report - Cost Center

input->post('financialyear')){ - $ab=$this->input->post('financialyear'); - echo '('.$ab.')'; - } - ?>

-
-
-
- -
-
- - -
-
- - -
-
-
-
- - -
-
- -
-
- - - - - - - - - - + + ?>

+
+ + +
+
+ +
+
+ + +
+
+ + +
+ +
+
-
- - - - - - - - - - - - - - -
Cost Center CodeCost Center Name DepartmentBudget TypeBudget YearUtilized Amount  ( )Balance Amount  ( )
Cost_Center_Code?>Cost_Center_Name?>Dept_Name?>BudgetType?>BudgetYear?>Util_Amount,2,'.','')?>Avlbl_Amt,2,'.','')?>
- -
-
-
- -
- - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Cost Center CodeCost Center Name DepartmentBudget TypeBudget YearUtilized Amount  ( )Balance Amount  ( )
Cost_Center_Code?>Cost_Center_Name?>Dept_Name?>BudgetType?>BudgetYear?>Util_Amount,2,'.','')?>Avlbl_Amt,2,'.','')?>
+ +
+
+ + - - - - - - - - - - + + + + + + + + + \ No newline at end of file + footer: 'true', + //messageTop: $('h3').text(), + title: $('h3').text(), + exportOptions: { + columns: ':visible' + + } + }, + + 'colvis' + ] + } ); +} ); + + + $('#mySelect').on('change',function(){ + + table + .column(4) + .search(this.value) + .draw(); + }); + function Reset() +{ + $('#mySelect').val(''); + +} + + + + \ No newline at end of file diff --git a/application/views/Report_cumulative.php b/application/views/Report_cumulative.php old mode 100644 new mode 100755 index addd756e..fb41a3b0 --- a/application/views/Report_cumulative.php +++ b/application/views/Report_cumulative.php @@ -6,11 +6,10 @@ if(!empty($mms)) } ?> - - + +
+

-

Report - Cumulative ()

+

Report - Cumulative ()

- +
- - + + - + @@ -78,6 +81,7 @@ if(!empty($mms)) + + + + + + + + + + + - - - - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - + + + + + - - - - - - - - + + + + + - - - - - - - - + + + + + - - - - - - - - + + + + + - - - - - - - - + + + + + - - - - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + + + + + + - + @@ -163,7 +176,7 @@ if(!empty($mms))
SupplierProductSupplier NameMaterial Name
QuantityValueValue  ()
ttotal,2,'.',''); echo number_format($rel->ttotal,2,'.','');?>
+
+
- + - - + + @@ -255,6 +268,7 @@ if(!empty($mms)) $tot_dis = 0; $tot_frg = 0; $tot_pac = 0; + $tot_inc = 0; $tot_tot = 0; foreach($purchase as $rel) @@ -265,8 +279,7 @@ if(!empty($mms)) pono;?> - - + + @@ -318,7 +334,7 @@ if(!empty($mms)) - + + - +
PO NOPO No DateTime Material Name Supplier Name Quantity UOM Rate  () Value  ()Exchange RateExchange Rate SGST  () CGST  () IGST  () Discount  () Freight  () Package  ()Insurance  () Total  ()
created_date;?>created_time;?>material_name;?>material_name;?> supplier_name;?> quantity); @@ -301,6 +314,9 @@ if(!empty($mms)) $tot_pac= $tot_pac + $rel->Package; echo $rel->Package;?> insurance; + echo $rel->insurance;?>total,2); echo number_format($rel->total,2,'.','');?>      - - - @@ -433,6 +442,16 @@ if(!empty($mms)) } + ?> + + + @@ -464,10 +483,9 @@ if(!empty($mms)) - - + + - @@ -484,14 +502,13 @@ $(document).ready(function() { table = $('#cc').DataTable( { "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + -"<'table-responsive'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", +"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", buttons: [ { extend: 'excelHtml5', footer: 'true', - messageTop:'Report Purchase', - //title: 'Report - Purchase', + messageTop: 'Report Purchase', title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_purchase_inward.php b/application/views/Report_purchase_inward.php old mode 100644 new mode 100755 index 66824293..e7f1e144 --- a/application/views/Report_purchase_inward.php +++ b/application/views/Report_purchase_inward.php @@ -1,3 +1,5 @@ + + - + + -
- -

@@ -49,59 +64,37 @@ if(!empty($mms))
-

Report - Purchase-Inward

+

Inward Details

input->post('client_name')){ - $cl=$this->input->post('client_name'); - echo $cl; - echo ' '.' '; - } - if($this->input->post('item_name')){ - $it=$this->input->post('item_name'); - echo $it; - echo ' '.' '; - } - + if($this->input->post('financialyear')){ - $ab=$this->input->post('financialyear'); - echo '('.$ab.')'; - echo ' '; - - + } - if($this->input->post('month')){ - $m=$this->input->post('month'); echo '('.$m.')'; - echo ' '; - } - if($this->input->post('from_date') && $this->input->post('to_date')){ - $frm = $this->input->post('from_date'); - $t = $this->input->post('to_date'); - - echo $frm.'-to-'.$t; - + echo $frm.'-to-'.$t; } - ?>

+ + ?>

@@ -234,30 +227,33 @@ if(!empty($mms))
+ *Insurance field not included + +
-
- +
+
- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -273,13 +269,14 @@ if(!empty($mms)) $tot_dis = 0; $tot_frg = 0; $tot_pac = 0; + //$tot_inc = 0; $tot_tot = 0; foreach($purchase as $rel) { ?> - @@ -319,17 +316,20 @@ if(!empty($mms)) + @@ -456,6 +456,7 @@ if(!empty($mms)) ?> +
PO NoDateTimeMaterial NameCategorySupplier NameQuantityUOMRate  ()Value  ()Exchange RateSGST  ()CGST  ()IGST  ()Discount  ()Freight  ()Package  ()Total  ()PO NoDateTimeMaterial NameCategorySupplier NameQtyUOMRate  ()Value  ()Exchange RateSGST  ()CGST  ()IGST  ()Discount  ()Freight  ()Package  ()Total  ()
+ pono;?> created_date;?>Package; echo $rel->Package;?>total,2); - - if(!empty($rel->file)){ ?> - total,2,'.','');?> - total,2,'.',''); - } ?> + file)){ ?> + total,2,'.','');?> + total,2,'.',''); + } + ?> + - - + + + + + + + + + + - - - - - - - diff --git a/application/views/Report_supplier.php b/application/views/Report_supplier.php old mode 100644 new mode 100755 index b8b4b9c7..a3e8c96a --- a/application/views/Report_supplier.php +++ b/application/views/Report_supplier.php @@ -6,10 +6,19 @@ if(!empty($mms)) } ?> - + +
- -

@@ -51,55 +50,30 @@ if(!empty($mms))

Report - Supplier-Inward

- input->post('client_name')){ - $cl=$this->input->post('client_name'); - echo $cl; - echo ' '.' '; - } - - if($this->input->post('financialyear')){ - $ab=$this->input->post('financialyear'); - echo '('.$ab.')'; - echo ' '; - - } - if($this->input->post('month')){ - $m=$this->input->post('month'); - echo '('.$m.')'; - echo ' '; - } - if($this->input->post('from_date') && $this->input->post('to_date')){ - $frm = $this->input->post('from_date'); - $t = $this->input->post('to_date'); - echo $frm.'to'.$t; - } - - ?>

@@ -111,7 +85,7 @@ if(!empty($mms))
@@ -85,12 +75,11 @@ if(!empty($mms)) - -
-
- -
- +
+
+ +
+
@@ -102,12 +91,12 @@ if(!empty($mms)) ?>
- +
- + @@ -115,7 +104,7 @@ if(!empty($mms)) @@ -136,8 +125,8 @@ if(!empty($mms)) $tr3= $tr3 + $rel->quantity; echo round($rel->quantity);?> + $tr4= $tr4 + number_format($rel->total,2,'.',''); + echo number_format($rel->total,2,'.','');?> @@ -170,8 +159,8 @@ if(!empty($mms)) @@ -194,18 +183,31 @@ if(!empty($mms)) - - + + - - - - - - - - + + + + + + + - - - - - - + + + + + + + - - - - - - + + + + + + + - - - - - - + + + + + + + diff --git a/application/views/report_pendingreqst.php b/application/views/report_pendingreqst.php index 62509288..d123a708 100755 --- a/application/views/report_pendingreqst.php +++ b/application/views/report_pendingreqst.php @@ -6,10 +6,10 @@ if(!empty($pending_list)) } ?> - +
- -

@@ -43,262 +39,149 @@ if(!empty($pending_list))
-

Total Pending Requests

- +

Total Pending Requests +

input->post('financialyear')){ - $ab=$this->input->post('financialyear'); - echo '('.$ab.')'; - echo ' '; - - } - if($this->input->post('month')){ - $m=$this->input->post('month'); - echo '('.$m.')'; - echo ' '; - } - if($this->input->post('from_date') && $this->input->post('to_date')){ - $frm = $this->input->post('from_date'); - $t = $this->input->post('to_date'); - echo $frm.'-to-'.$t; - } - if($this->input->post('aging_from') && $this->input->post('aging_to')){ - $tfrm = $this->input->post('aging_from'); - $tt = $this->input->post('aging_to'); - echo 'Aging between'.' '.$tfrm.'-to-'.$tt.' '.'days'; - } - - ?>

+ ?> +

- - -
+
- - + + +
- -
- -
-
-
- -
- -
-
-
- -
- - -
-
+
- -
- - -
- -
-
- -
- - - - -
-
- +
- -
- - - - -
- -
-

- - -
-
- -
+ + +
+ +
-
Month-Year QuantityTotal ValueTotal Value  ()
total,2,'.',''); - echo number_format($rel->total,2,'.','');?>
+
@@ -339,16 +222,19 @@ if(!empty($pending_list)) - - - - - - - - - - + + + + + + + +
Requistion Date