From 87110c500df04a50c0bbd05fa2b1de8e7afddbee Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 9 Dec 2017 17:44:31 +0530 Subject: [PATCH] category wise reports added --- application/config/routes.php | 2 + application/controllers/report.php | 144 +++- application/models/dahsboard_model.php | 261 ++++++- .../views/Report_consolidate_inward.php | 2 +- .../views/Report_consolidate_month.php | 200 +++++ application/views/Report_consolidate_raw.php | 729 ++++++++++++++++++ application/views/Report_consolidate_year.php | 200 +++++ .../views/Report_cumulative_day_inward.php | 4 +- .../views/Report_cumulative_day_raw.php | 193 +++++ .../views/Report_cumulative_inward.php | 16 +- .../views/Report_cumulative_month_inward.php | 4 +- .../views/Report_cumulative_month_raw.php | 200 +++++ application/views/Report_cumulative_raw.php | 276 +++++++ .../views/Report_cumulative_year_inward.php | 4 +- .../views/Report_cumulative_year_raw.php | 206 +++++ .../views/Report_month_wise_inward.php | 2 +- application/views/Report_purchase_inward.php | 3 + application/views/Report_supplier_inward.php | 2 +- application/views/Report_year_wise_inward.php | 4 +- .../views/Report_year_wise_total_inward.php | 2 +- application/views/reportslink.php | 2 + 21 files changed, 2400 insertions(+), 56 deletions(-) create mode 100644 application/views/Report_consolidate_month.php create mode 100644 application/views/Report_consolidate_raw.php create mode 100644 application/views/Report_consolidate_year.php create mode 100644 application/views/Report_cumulative_day_raw.php create mode 100644 application/views/Report_cumulative_month_raw.php create mode 100644 application/views/Report_cumulative_raw.php create mode 100644 application/views/Report_cumulative_year_raw.php diff --git a/application/config/routes.php b/application/config/routes.php index 4d0c1a1c..c0e5d593 100755 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -229,6 +229,8 @@ $route['Report_year_wise_inward'] = "report/iyear_wise"; $route['Report_supplier_inward'] = "report/ipurchase_supplier"; $route['Report_consolidate_inward'] = "report/iconsolidate"; $route['Report_cumulative_inward'] = "report/icumulative"; +$route['Report_cumulative_raw'] = "report/rawi_cumulative"; +$route['Report_consolidate_category'] = "report/rawi_consolidate"; $route['cashbookreport']="report/cashbook"; $route['cashbookmonthlyexpenses']="report/monthexpenses"; $route['cashbookyearlyexpenses']="report/yearexpenses"; diff --git a/application/controllers/report.php b/application/controllers/report.php index 383b52f3..38a24c9c 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -503,6 +503,7 @@ class report extends BaseController $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'); @@ -512,7 +513,7 @@ 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['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,$cat); if($this->DEPCode == MANAGEMENT) { @@ -552,6 +553,7 @@ class report extends BaseController $this->global['pageTitle'] = 'Siddharth : Reports'; //$this->input->post('btn_submit'); $cname = $this->input->get('cname'); + $cat = $this->input->get('cat'); $prod = $this->input->get('prod'); $ab=$this->input->get('ab'); $fa=substr($ab,0,-5); @@ -567,7 +569,7 @@ 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['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d); + $data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat); } $this->loadviews("Report_purchase_inward",$this->global,$data, NULL); @@ -751,6 +753,144 @@ class report extends BaseController $data['cum_day']=$this->dahsboard_Model->ireport_cum_day($sup,$mat); $this->loadviews("Report_cumulative_day_inward",$this->global,$data, NULL); + } + public function rawi_cumulative() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + + //print_r($prod); + + $data['cum']=$this->dahsboard_Model->rawi_report_cumulative(); + + if($this->DEPCode == MANAGEMENT) + { + $this->loadviews("Report_cumulative_raw",$this->global,$data, NULL); + } + + else + { + $this->loadViews("access", $this->global, $data, NULL); + } + + + } + public function rawi_cum_year() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + $mat=$this->input->get('mid'); + $cat=$this->input->get('cat'); + //print_r($sup); + + $data['cum_year']=$this->dahsboard_Model->rawi_report_cum_year($mat,$cat); + $this->loadviews("Report_cumulative_year_raw",$this->global,$data, NULL); + + } + public function rawi_cum_month() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + $mat=$this->input->get('mid'); + $cat=$this->input->get('cat'); + + //print_r($prod); + + $data['cum_month']=$this->dahsboard_Model->rawi_report_cum_month($mat,$cat); + $this->loadviews("Report_cumulative_month_raw",$this->global,$data, NULL); + + } + public function rawi_cum_day() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + $mat=$this->input->get('mid'); + $cat=$this->input->get('cat'); + //print_r($prod); + + $data['cum_day']=$this->dahsboard_Model->rawi_report_cum_day($mat,$cat); + $this->loadviews("Report_cumulative_day_raw",$this->global,$data, NULL); + + } + public function rawi_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->rawi_report_consolidate($cname,$fa,$aa); + + if($this->DEPCode == MANAGEMENT) + { + $this->loadviews("Report_consolidate_raw",$this->global,$data, NULL); + } + else + { + $this->loadViews("access", $this->global, $data, NULL); + } + + } + public function rawi_consolidate_month() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + //$this->input->post('btn_submit'); + $cat = $this->input->get('cat'); + $sup = $this->input->get('sup'); + $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->rawi_consolidate_month($m,$cat,$sup,$mat,$fa,$aa); + // print_r( $data['spurchse']); + if($this->DEPCode == MANAGEMENT) + { + $this->loadviews("Report_consolidate_month",$this->global,$data, NULL); + } + else + { + $this->loadViews("access", $this->global, $data, NULL); + } + + } + public function rawi_consolidate_year() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + //$this->input->post('btn_submit'); + $cat = $this->input->get('cat'); + $sup = $this->input->get('sup'); + $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->rawi_consolidate_year($cat,$sup,$mat,$fa,$aa); + // print_r( $data['spurchse']); + if($this->DEPCode == MANAGEMENT) + { + $this->loadviews("Report_consolidate_year",$this->global,$data, NULL); + } + else + { + $this->loadViews("access", $this->global, $data, NULL); + } + } public function cashbook() { diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index 21e5aae1..12744c2e 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -639,7 +639,7 @@ 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 where -pm.Status != 'ST030' "; +pm.Status != 'ST030' and pm.Status != 'ST056' "; if ($cname!= ''){ @@ -713,7 +713,7 @@ 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 where -pm.Status != 'ST030' "; +pm.Status != 'ST030' and pm.Status != 'ST056' "; if ($cname!= ''){ @@ -794,7 +794,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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 -where pm.Status != 'ST030' +where pm.Status != 'ST030' and pm.Status != 'ST056' group by month(created_date)"; $query = $this->db->query($sql); return $query->result(); @@ -822,7 +822,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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 -where pm.Status != 'ST030' and sd.SupplierName is not null and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ? +where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ? group by supplier_name,material_name"; $query = $this->db->query($sql,array($month,$year)); return $query->result(); @@ -835,7 +835,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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 -where pm.Status != 'ST030' and sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31' +where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31' group by supplier_name,material_name"; $query = $this->db->query($sql,array()); return $query->result(); @@ -885,7 +885,7 @@ 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 where -pm.Status != 'ST030' "; +pm.Status != 'ST030' and pm.Status != 'ST056' "; if ($cname!= ''){ @@ -954,7 +954,7 @@ FROM T_PurchaseOrder_Master pm join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' "; +where pm.Status != 'ST030' and pm.Status != 'ST056' "; if ($cname!= ''){ @@ -984,7 +984,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and case when (month(pm.CreatedDate) >=4) then (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 ) @@ -998,7 +998,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) group by supplier_name,material_name ) as month on month.supplier_name=year.supplier_name and month.material_name=year.material_name @@ -1008,7 +1008,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and date(pm.CreatedDate) = current_date() group by supplier_name,material_name ) as today on today.supplier_name=month.supplier_name and today.material_name=month.material_name @@ -1024,7 +1024,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' +where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' group by supplier_name,material_name"; $query = $this->db->query($sql); return $query->result(); @@ -1036,7 +1036,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and case when (month(pm.CreatedDate) >=4) then (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 ) @@ -1055,18 +1055,18 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and date(pm.CreatedDate) = current_date() and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' group by supplier_name,material_name"; $query = $this->db->query($sql); return $query->result(); } - function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t){ + function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat){ $sql="SELECT pm.PONO as pono,date_format(pm.CreatedDate,'%d-%m-%Y') as created_date, TIME_FORMAT(pm.CreatedDate,'%l:%i %p') as created_time, -mm.MaterialName as material_name,sd.SupplierName as supplier_name, +mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name, ifnull(sum(pl.Quantity),0) as quantity,mm.UOM as UOM,ifnull(sum(pl.Rate),0) as rate, round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value, if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate, @@ -1092,8 +1092,7 @@ 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 -where -pm.Status != 'ST030' and pm.Status = 'ST056' "; +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) "; if ($cname!= ''){ @@ -1127,20 +1126,25 @@ if ($cname!= ''){ $sql.=" and mm.MaterialName = '".$prod."' "; } + if ($cat!= ''){ + + $sql.=" and mm.Category = '".$cat."' "; + + } -$sql.="group by pono,material_name,supplier_name"; +$sql.="group by pono,material_name,category,supplier_name"; //echo $sql; $query = $this->db->query($sql); return $query->result(); } - function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d){ + function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat){ $sql="SELECT pm.PONO as pono,date_format(pm.CreatedDate,'%d-%m-%Y') as created_date, TIME_FORMAT(pm.CreatedDate,'%l:%i %p') as created_time, -mm.MaterialName as material_name,sd.SupplierName as supplier_name, +mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name, ifnull(sum(pl.Quantity),0) as quantity,mm.UOM as UOM,ifnull(sum(pl.Rate),0) as rate, round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value, if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate, @@ -1167,7 +1171,7 @@ 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 where -pm.Status != 'ST030' and pm.Status = 'ST056' "; +pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) "; if ($cname!= ''){ @@ -1216,11 +1220,16 @@ if ($cname!= ''){ $sql.=" and date(pm.CreatedDate) = '".$d."' "; } + if ($cat!= ''){ + + $sql.=" and mm.Category = '".$cat."' "; + + } -$sql.="group by pono,material_name,supplier_name"; -//echo $sql; +$sql.="group by pono,material_name,category,supplier_name"; +//ho $sql; $query = $this->db->query($sql); return $query->result(); } @@ -1234,7 +1243,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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 -where pm.Status != 'ST030' and pm.Status = 'ST056' +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) group by month(created_date)"; $query = $this->db->query($sql); return $query->result(); @@ -1253,7 +1262,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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 -where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ? +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and sd.SupplierName is not null and pm.PONO in (select PONO from T_IGR_Master) and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ? group by supplier_name,material_name"; $query = $this->db->query($sql,array($month,$year)); return $query->result(); @@ -1266,7 +1275,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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 -where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31' +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31' group by supplier_name,material_name"; $query = $this->db->query($sql,array()); return $query->result(); @@ -1316,7 +1325,7 @@ 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 where -pm.Status != 'ST030' and pm.Status = 'ST056' "; +pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) "; if ($cname!= ''){ @@ -1385,7 +1394,7 @@ FROM T_PurchaseOrder_Master pm join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and pm.Status = 'ST056' "; +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) "; if ($cname!= ''){ @@ -1415,7 +1424,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and case when (month(pm.CreatedDate) >=4) then (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 ) @@ -1429,7 +1438,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and month(pm.CreatedDate) = month(current_date()) group by supplier_name,material_name ) as month on month.supplier_name=year.supplier_name and month.material_name=year.material_name @@ -1439,7 +1448,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and date(pm.CreatedDate) = current_date() group by supplier_name,material_name ) as today on today.supplier_name=month.supplier_name and today.material_name=month.material_name @@ -1455,7 +1464,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' group by supplier_name,material_name"; $query = $this->db->query($sql); return $query->result(); @@ -1467,7 +1476,7 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and case when (month(pm.CreatedDate) >=4) then (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 ) @@ -1486,11 +1495,195 @@ FROM T_PurchaseOrder_Master pm left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID -where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and date(pm.CreatedDate) = current_date() and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' group by supplier_name,material_name"; $query = $this->db->query($sql); return $query->result(); + } + function rawi_report_cumulative(){ + + $sql="SELECT year.mid as mid,year.category as category,year.material_name as material_name,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal +FROM (SELECT mm.Category as category,mm.MaterialCode as mid,ifnull(mm.MaterialName,'-') as material_name,ifnull(sum(pl.Quantity),0) as quantity,round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as total +FROM T_PurchaseOrder_Master pm +left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode +left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and +case + when (month(pm.CreatedDate) >=4) then + (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 ) + else + (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)-1 and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) <= 3 ) + end +group by category,material_name +) as year left join +(SELECT mm.Category as category,mm.MaterialCode as mid,ifnull(mm.MaterialName,'-') as material_name,ifnull(sum(pl.Quantity),0) as mquantity,round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as mtotal +FROM T_PurchaseOrder_Master pm +left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode +left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and +month(pm.CreatedDate) = month(current_date()) +group by category,material_name +) as month on month.material_name=year.material_name and month.category=year.category +left join +(SELECT mm.Category as category,mm.MaterialCode as mid,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal +FROM T_PurchaseOrder_Master pm +left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode +left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and +date(pm.CreatedDate) = current_date() +group by category,material_name +) as today on today.material_name=month.material_name and today.category=month.category +group by category,material_name "; + $query = $this->db->query($sql); + return $query->result(); + } + function rawi_report_cum_year($mat=null,$cat=null){ + + $sql="SELECT mm.Category as category,sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal +FROM T_PurchaseOrder_Master pm +left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode +left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and +case + when (month(pm.CreatedDate) >=4) then + (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 ) + else + (YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)-1 and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) <= 3 ) + end + and mm.MaterialCode = '".$mat."' and mm.Category = '".$cat."' +group by supplier_name,material_name"; + $query = $this->db->query($sql); + //echo $sql; + return $query->result(); + } + function rawi_report_cum_month($mat=null,$cat=null){ + + $sql="SELECT mm.Category as category,sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal +FROM T_PurchaseOrder_Master pm +left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode +left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and +month(pm.CreatedDate) = month(current_date()) and mm.MaterialCode = '".$mat."' and mm.Category = '".$cat."' +group by supplier_name,material_name"; + $query = $this->db->query($sql); + return $query->result(); + } + function rawi_report_cum_day($mat=null,$cat=null){ + + $sql="SELECT mm.Category as category,sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal +FROM T_PurchaseOrder_Master pm +left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode +left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and +date(pm.CreatedDate) = current_date() and mm.MaterialCode = '".$mat."'and mm.Category = '".$cat."' +group by supplier_name,material_name"; + $query = $this->db->query($sql); + return $query->result(); + } + function rawi_report_consolidate($cname,$fa,$aa){ + + + $sql="select mm.Category as category,mm.MaterialCode as mid,mm.MaterialName as material_name, +SUM(IF(month(pm.CreatedDate) = 4, pl.Quantity, 0)) AS April, +SUM(IF(month(pm.CreatedDate) = 5, pl.Quantity, 0)) AS May, +SUM(IF(month(pm.CreatedDate) = 6, pl.Quantity, 0)) AS June, +SUM(IF(month(pm.CreatedDate) = 7, pl.Quantity, 0)) AS July, +SUM(IF(month(pm.CreatedDate) = 8, pl.Quantity, 0)) AS August, +SUM(IF(month(pm.CreatedDate) = 9, pl.Quantity, 0)) AS September, +SUM(IF(month(pm.CreatedDate) = 10, pl.Quantity, 0)) AS October, +SUM(IF(month(pm.CreatedDate) = 11, pl.Quantity, 0)) AS November, +SUM(IF(month(pm.CreatedDate) = 12, pl.Quantity, 0)) AS December, +SUM(IF(month(pm.CreatedDate) = 1, pl.Quantity, 0)) AS January, +SUM(IF(month(pm.CreatedDate) = 2, pl.Quantity, 0)) AS February, +SUM(IF(month(pm.CreatedDate) = 3, pl.Quantity, 0)) AS March, +sum(pl.Quantity) as qtotal, +SUM(IF(month(pm.CreatedDate) = 4, pl.Quantity * pl.Rate, 0)) AS vApril, +SUM(IF(month(pm.CreatedDate) = 5, pl.Quantity * pl.Rate, 0)) AS vMay, +SUM(IF(month(pm.CreatedDate) = 6, pl.Quantity * pl.Rate, 0)) AS vJune, +SUM(IF(month(pm.CreatedDate) = 7, pl.Quantity * pl.Rate, 0)) AS vJuly, +SUM(IF(month(pm.CreatedDate) = 8, pl.Quantity * pl.Rate, 0)) AS vAugust, +SUM(IF(month(pm.CreatedDate) = 9, pl.Quantity * pl.Rate, 0)) AS vSeptember, +SUM(IF(month(pm.CreatedDate) = 10, pl.Quantity * pl.Rate, 0)) AS vOctober, +SUM(IF(month(pm.CreatedDate) = 11, pl.Quantity * pl.Rate, 0)) AS vNovember, +SUM(IF(month(pm.CreatedDate) = 12, pl.Quantity * pl.Rate, 0)) AS vDecember, +SUM(IF(month(pm.CreatedDate) = 1, pl.Quantity * pl.Rate, 0)) AS vJanuary, +SUM(IF(month(pm.CreatedDate) = 2, pl.Quantity * pl.Rate, 0)) AS vFebruary, +SUM(IF(month(pm.CreatedDate) = 3, pl.Quantity * pl.Rate, 0)) AS vMarch, +sum(pl.Quantity * pl.Rate) as vtotal +FROM T_PurchaseOrder_Master pm +join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode +join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) "; + +if ($cname!= ''){ + + $sql.="and mm.MaterialName = '".$cname."'"; + + } + + + + if ($fa and $aa != ''){ + + $sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')"; + + } + + $sql.= "group by category,material_name"; + //echo $sql; + $query = $this->db->query($sql); + return $query->result(); + + } + function rawi_consolidate_month($m=null,$cat=null,$sup=null,$mat=null,$fa=null,$aa=null){ + + $sql="select mm.Category as category,sd.SupplierID as sid,sd.SupplierName as supplier_name,mm.MaterialCode as mid,mm.MaterialName as material_name, +sum(pl.Quantity) as quantity, +sum(pl.Quantity * pl.Rate) as total +FROM T_PurchaseOrder_Master pm +join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode +join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and +monthname(pm.CreatedDate) = '".$m."' and mm.Category = '".$cat."' and mm.MaterialCode = '".$mat."' "; +if ($fa and $aa != ''){ + + $sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')"; + + } + $sql.= "group by category,supplier_name,material_name"; + $query = $this->db->query($sql); + //echo $sql; + return $query->result(); + } + function rawi_consolidate_year($cat=null,$sup=null,$mat=null,$fa=null,$aa=null){ + + $sql="select mm.Category as category,sd.SupplierID as sid,sd.SupplierName as supplier_name,mm.MaterialCode as mid,mm.MaterialName as material_name, +sum(pl.Quantity) as quantity, +sum(pl.Quantity * pl.Rate) as total +FROM T_PurchaseOrder_Master pm +join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode +join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID +where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and +mm.Category = '".$cat."' and mm.MaterialCode = '".$mat."' "; +if ($fa and $aa != ''){ + + $sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')"; + + } + $sql.= "group by category,supplier_name,material_name"; + $query = $this->db->query($sql); + //echo $sql; + return $query->result(); } function cashbook() { diff --git a/application/views/Report_consolidate_inward.php b/application/views/Report_consolidate_inward.php index 8e48d02a..7fe457af 100644 --- a/application/views/Report_consolidate_inward.php +++ b/application/views/Report_consolidate_inward.php @@ -157,7 +157,7 @@ foreach ($spurchse as $result) { ?> - supplier_name;?> + supplier_name;?> material_name)) { echo $result->material_name ; } else {echo "-";} diff --git a/application/views/Report_consolidate_month.php b/application/views/Report_consolidate_month.php new file mode 100644 index 00000000..d50c4107 --- /dev/null +++ b/application/views/Report_consolidate_month.php @@ -0,0 +1,200 @@ + + + + + +
+ +
+ +
+
+

Report - Consolidate Month(input->get('m'); + echo $m; + ?>)

+
+ + +
+
+ + + + + + + + + + + + + + + + + input->get('ab'); + $month=date('F'); + $m = $this->input->get('m'); + //echo $month; + foreach($spurchse as $rel) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategorySupplier NameMaterial Name
QuantityValue  ()
+ category;?> + supplier_name;?> + material_name;?>quantity); + echo round($rel->quantity);?>total,2,'.',''); + echo number_format($rel->total,2,'.','');?>
Total + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_consolidate_raw.php b/application/views/Report_consolidate_raw.php new file mode 100644 index 00000000..3228f192 --- /dev/null +++ b/application/views/Report_consolidate_raw.php @@ -0,0 +1,729 @@ + + + + + +
+ +
+ +
+
+

Report - Consolidate (Category-Wise)

+
+ + +
+ +
+ +
+
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+
+ + + +
+ + +

+ + +
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + input->post('financialyear'); + foreach ($spurchse as $result) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryMaterial NameAprMayJunJulAugSepOctNovDecJanFebMarTotal
+ category;?> + material_name)) { echo $result->material_name ; } else {echo "-";} + ?> + April); + ?> + April);?> + + May); + ?> + May);?> + + June); + ?> + June);?> + + July); + ?> + July);?> + + August); + ?> + August);?> + + September; + ?> + September);?> + + October); + ?> + October);?> + + November); + ?> + November);?> + + December); + ?> + December);?> + + January); + ?> + January);?> + + February); + ?> + February);?> + + March); + ?> + March);?> + + qtotal); + ?> + qtotal);?> +
Total + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_consolidate_year.php b/application/views/Report_consolidate_year.php new file mode 100644 index 00000000..67c74f87 --- /dev/null +++ b/application/views/Report_consolidate_year.php @@ -0,0 +1,200 @@ + + + + + +
+ +
+ +
+
+

Report - Consolidate Month(input->get('ab'); + echo $m; + ?>)

+
+ + +
+
+ + + + + + + + + + + + + + + + + input->get('ab'); + + $month=date('F'); + //echo $month; + foreach($spurchse as $rel) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategorySupplier NameMaterial Name
QuantityValue  ()
+ category;?> + supplier_name;?> + material_name;?>quantity); + echo round($rel->quantity);?>total,2,'.',''); + echo number_format($rel->total,2,'.','');?>
Total + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_cumulative_day_inward.php b/application/views/Report_cumulative_day_inward.php index e622be32..e141ca71 100644 --- a/application/views/Report_cumulative_day_inward.php +++ b/application/views/Report_cumulative_day_inward.php @@ -37,7 +37,7 @@ if(!empty($mms))
-

Report - Cumulative Today

+

Report - Cumulative Today - Inward

@@ -69,7 +69,7 @@ if(!empty($mms)) ?> - supplier_name;?> + supplier_name;?> material_name;?> + + +
+ +
+ +
+
+

Report - Cumulative Today (Category-Wise)

+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategorySupplier NameMaterial Name
QuantityValue  ()
category;?> + supplier_name;?> + material_name;?>tquantity); + echo round($rel->tquantity);?>ttotal,2,'.',''); + echo number_format($rel->ttotal,2,'.','');?>
Total + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_cumulative_inward.php b/application/views/Report_cumulative_inward.php index 2bb1274e..40b63a59 100644 --- a/application/views/Report_cumulative_inward.php +++ b/application/views/Report_cumulative_inward.php @@ -37,7 +37,7 @@ if(!empty($mms))
-

Report - Cumulative

+

Report - Cumulative - Inward

@@ -91,27 +91,27 @@ if(!empty($mms)) ?> - supplier_name;?> + supplier_name;?> material_name;?> tquantity); - echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?> + echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?> ttotal,2,'.',''); - echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?> + echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?> mquantity); - echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?> + echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?> mtotal,2,'.',''); - echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?> + echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?> quantity); - echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?> + echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?> total,2,'.',''); - echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?> + echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?> diff --git a/application/views/Report_cumulative_month_inward.php b/application/views/Report_cumulative_month_inward.php index ba730659..99289edf 100644 --- a/application/views/Report_cumulative_month_inward.php +++ b/application/views/Report_cumulative_month_inward.php @@ -37,7 +37,7 @@ if(!empty($mms))
-

Report - Cumulative Month

+

Report - Cumulative Month - Inward

@@ -75,7 +75,7 @@ if(!empty($mms)) ?> - supplier_name;?> + supplier_name;?> material_name;?> + + +
+ +
+ +
+
+

Report - Cumulative Month (Category-Wise)

+
+ + +
+
+ + + + + + + + + + + + + + + + + = 4) { + $yearl = date('Y').'-'.(date('Y')+1); + } else { + $yearl = (date('Y')-1).'-'.date('Y'); + } + $ab=$yearl; + $month=date('F'); + //echo $month; + foreach($cum_month as $rel) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategorySupplier NameMaterial Name
QuantityValue  ()
category;?> + supplier_name;?> + material_name;?>tquantity); + echo round($rel->tquantity);?>ttotal,2,'.',''); + echo number_format($rel->ttotal,2,'.','');?>
Total + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_cumulative_raw.php b/application/views/Report_cumulative_raw.php new file mode 100644 index 00000000..74370352 --- /dev/null +++ b/application/views/Report_cumulative_raw.php @@ -0,0 +1,276 @@ + + + + + +
+ +
+ +
+
+

Report - Cumulative (Category-Wise)

+
+ + +
+
+ + + + = 4) { + $yearl = date('Y').'-'.(date('Y')+1); + } else { + $yearl = (date('Y')-1).'-'.date('Y'); + } + $ab=$yearl; + ?> + + + + + + + + + + + + + + + + + + = 4) { + $yearl = date('Y').'-'.(date('Y')+1); + } else { + $yearl = (date('Y')-1).'-'.date('Y'); + } + $ab=$yearl; + + + foreach($cum as $rel) + { + $cat = $rel->category; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryMaterial Name
QuantityValue  ()QuantityValue  ()QuantityValue  ()
+ category;?> + material_name;?> + tquantity); + ?> + tquantity);?> + ttotal,2,'.',''); + ?> + ttotal,2,'.','');?> + mquantity); + ?> + mquantity);?> + mtotal,2,'.',''); + ?> + mtotal,2,'.','');?> + quantity); + ?> + quantity);?> + total,2,'.',''); + ?> + total,2,'.','');?> +
Total + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_cumulative_year_inward.php b/application/views/Report_cumulative_year_inward.php index 23115271..ec0ea5c5 100644 --- a/application/views/Report_cumulative_year_inward.php +++ b/application/views/Report_cumulative_year_inward.php @@ -37,7 +37,7 @@ if(!empty($mms))
-

Report - Cumulative Year

+

Report - Cumulative Year - Inward

@@ -81,7 +81,7 @@ if(!empty($mms)) ?> - supplier_name;?> + supplier_name;?> material_name;?> + + +
+ +
+ +
+
+

Report - Cumulative Year (Category-Wise)

+
+ + +
+
+ + + + = 4) { + $yearl = date('Y').'-'.(date('Y')+1); + } else { + $yearl = (date('Y')-1).'-'.date('Y'); + } + $ab=$yearl; + ?> + + + + + + + + + + + + + + = 4) { + $yearl = date('Y').'-'.(date('Y')+1); + } else { + $yearl = (date('Y')-1).'-'.date('Y'); + } + $ab=$yearl; + foreach($cum_year as $rel) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategorySupplier NameMaterial Name
QuantityValue  ( )
category;?> + supplier_name;?> + material_name;?>tquantity); + echo round($rel->tquantity);?>ttotal,2,'.',''); + echo number_format($rel->ttotal,2,'.','');?>
Total + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_month_wise_inward.php b/application/views/Report_month_wise_inward.php index 77896b39..3d21bc1c 100644 --- a/application/views/Report_month_wise_inward.php +++ b/application/views/Report_month_wise_inward.php @@ -65,7 +65,7 @@ if(!empty($mms)) ?> - supplier_name;?> + supplier_name;?> material_name;?> Date Time Material Name + Category Supplier Name Quantity UOM @@ -227,6 +228,7 @@ if(!empty($mms)) created_date;?> created_time;?> material_name;?> + category;?> supplier_name;?> quantity); @@ -278,6 +280,7 @@ if(!empty($mms))       +     diff --git a/application/views/Report_supplier_inward.php b/application/views/Report_supplier_inward.php index 3c53a11c..16f0c4cd 100644 --- a/application/views/Report_supplier_inward.php +++ b/application/views/Report_supplier_inward.php @@ -186,7 +186,7 @@ if(!empty($mms)) ?> - supplier_name;?> + supplier_name;?> counts); diff --git a/application/views/Report_year_wise_inward.php b/application/views/Report_year_wise_inward.php index dd23dacc..9838bca1 100644 --- a/application/views/Report_year_wise_inward.php +++ b/application/views/Report_year_wise_inward.php @@ -104,7 +104,7 @@ if(!empty($mms)) //echo $new; ?> - + quantity; @@ -125,7 +125,7 @@ if(!empty($mms)) input->post('financialyear'); $Total="Total"; - echo anchor('report/year_wise_total/' . $ab,$Total); ?> + echo anchor('report/iyear_wise_total/' . $ab,$Total); ?> diff --git a/application/views/Report_year_wise_total_inward.php b/application/views/Report_year_wise_total_inward.php index a9c1926a..a0485911 100644 --- a/application/views/Report_year_wise_total_inward.php +++ b/application/views/Report_year_wise_total_inward.php @@ -64,7 +64,7 @@ if(!empty($mms)) ?> - supplier_name;?> + supplier_name;?> material_name;?> Report_supplier_inward" target="_blank">Purchase Supplier - Wise

Consolidate Report

Cumulative Report

+
Cumulative Report - Category Wise

+
Consolidate Report - Category Wise