From 3dedcb9229374c0eddb90b0412869ca16f7b5ae7 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 6 Dec 2017 17:13:51 +0530 Subject: [PATCH] inward report added --- application/config/routes.php | 5 + application/controllers/report.php | 211 ++++++ application/models/dahsboard_model.php | 431 +++++++++++ .../Report_Material_Master_ReceiptValue.php | 2 +- application/views/Report_POreleased.php | 2 +- application/views/Report_consolidate.php | 54 +- .../views/Report_consolidate_inward.php | 679 ++++++++++++++++++ application/views/Report_costcenter.php | 10 +- application/views/Report_cumulative.php | 30 +- application/views/Report_cumulative_day.php | 8 +- .../views/Report_cumulative_day_inward.php | 183 +++++ .../views/Report_cumulative_inward.php | 257 +++++++ application/views/Report_cumulative_month.php | 6 +- .../views/Report_cumulative_month_inward.php | 189 +++++ application/views/Report_cumulative_year.php | 6 +- .../views/Report_cumulative_year_inward.php | 195 +++++ application/views/Report_month_wise.php | 6 +- .../views/Report_month_wise_inward.php | 211 ++++++ application/views/Report_openorder.php | 2 +- application/views/Report_purchase.php | 22 +- application/views/Report_purchase_inward.php | 502 +++++++++++++ application/views/Report_supplier.php | 14 +- application/views/Report_supplier_inward.php | 346 +++++++++ application/views/Report_totalorders.php | 9 +- application/views/Report_year_wise.php | 16 +- application/views/Report_year_wise_inward.php | 215 ++++++ application/views/Report_year_wise_total.php | 6 +- .../views/Report_year_wise_total_inward.php | 212 ++++++ application/views/reportcashbook.php | 8 +- application/views/reportslink.php | 28 +- 30 files changed, 3754 insertions(+), 111 deletions(-) create mode 100644 application/views/Report_consolidate_inward.php create mode 100644 application/views/Report_cumulative_day_inward.php create mode 100644 application/views/Report_cumulative_inward.php create mode 100644 application/views/Report_cumulative_month_inward.php create mode 100644 application/views/Report_cumulative_year_inward.php create mode 100644 application/views/Report_month_wise_inward.php create mode 100644 application/views/Report_purchase_inward.php create mode 100644 application/views/Report_supplier_inward.php create mode 100644 application/views/Report_year_wise_inward.php create mode 100644 application/views/Report_year_wise_total_inward.php diff --git a/application/config/routes.php b/application/config/routes.php index 25136cb7..4d0c1a1c 100755 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -224,6 +224,11 @@ $route['Report_year_wise'] = "report/year_wise"; $route['Report_supplier'] = "report/purchase_supplier"; $route['Report_consolidate'] = "report/consolidate"; $route['Report_cumulative'] = "report/cumulative"; +$route['Report_purchase_inward'] = "report/ipurchase"; +$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['cashbookreport']="report/cashbook"; $route['cashbookmonthlyexpenses']="report/monthexpenses"; $route['cashbookyearlyexpenses']="report/yearexpenses"; diff --git a/application/controllers/report.php b/application/controllers/report.php index b9bc2ba1..dce7a80d 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -348,6 +348,217 @@ class report extends BaseController $data['cum_day']=$this->dahsboard_Model->report_cum_day($sup,$mat); $this->loadviews("Report_cumulative_day",$this->global,$data, NULL); + } + public function ipurchase() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + //$this->input->post('btn_submit'); + $cname = $this->input->post('client_name'); + $prod = $this->input->post('item_name'); + $ab=$this->input->post('financialyear'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $m=$this->input->post('month'); + $frm = $this->input->post('from_date'); + $t = $this->input->post('to_date'); + //print_r($prod); + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t); + + + $this->loadviews("Report_purchase_inward",$this->global,$data, NULL); + + } + public function ilink_purchase() + { + if ($this->input->post('btn_submit')) { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + //$this->input->post('btn_submit'); + $cname = $this->input->post('client_name'); + $prod = $this->input->post('item_name'); + $ab=$this->input->post('financialyear'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $m=$this->input->post('month'); + $frm = $this->input->post('from_date'); + $t = $this->input->post('to_date'); + //print_r($prod); + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t); + + + } else{ + $this->global['pageTitle'] = 'Siddharth : Reports'; + //$this->input->post('btn_submit'); + $cname = $this->input->get('cname'); + $prod = $this->input->get('prod'); + $ab=$this->input->get('ab'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $m=$this->input->get('month'); + $frm = $this->input->get('frm'); + $t = $this->input->get('t'); + $sid=$this->input->get('sid'); + $mid = $this->input->get('mid'); + $d = $this->input->get('d'); + + //print_r($prod); + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d); + } + + $this->loadviews("Report_purchase_inward",$this->global,$data, NULL); + + } + public function iyear_wise() + { + $this->global['pageTitle'] = 'Siddharth : Reports'; + + + if ($this->input->post('financialyear')) { + + $data['year']=$this->dahsboard_Model->ireport_year_wise(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + + //$this->loadviews("Report_year_wise",$this->global,$data, NULL); + } + $data['finyear']=$this->dahsboard_Model->report_finyear(); + + $this->loadviews("Report_year_wise_inward",$this->global,$data, NULL); + } + + public function imonth_wise() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + + + $month=$this->input->get('dat'); + $mon= date("F",strtotime($month)); + //print_r($month); + $data['mont']=$mon; + $data['month']=$this->dahsboard_Model->ireport_month_wise($month); + $this->loadviews("Report_month_wise_inward",$this->global,$data, NULL); + + } + public function iyear_wise_total() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + + $last = $this->uri->total_segments(); + $month=$this->uri->segment($last); + $a=substr($month,0,-5); + $b=substr($month,5,5); + //print_r($month); + $data['year']=$month; + $data['ytotal']=$this->dahsboard_Model->ireport_year_wise_total($a,$b); + $this->loadviews("Report_year_wise_total_inward",$this->global,$data, NULL); + + } + + public function ipurchase_supplier() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + //$this->input->post('btn_submit'); + $cname = $this->input->post('client_name'); + $ab=$this->input->post('financialyear'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $m=$this->input->post('month'); + $frm = $this->input->post('from_date'); + $t = $this->input->post('to_date'); + //print_r($prod); + $data['material']=$this->dahsboard_Model->material_name(); + $data['cust']=$this->dahsboard_Model->customer_name(); + $data['finyear']=$this->dahsboard_Model->report_finyear(); + $data['spurchse']=$this->dahsboard_Model->ireport_supplier($cname,$fa,$aa,$m,$frm,$t); + + + $this->loadviews("Report_supplier_inward",$this->global,$data, NULL); + + } + public function iconsolidate() + { + + $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->ireport_consolidate($cname,$fa,$aa); + + + $this->loadviews("Report_consolidate_inward",$this->global,$data, NULL); + + } + public function icumulative() + { + + $this->global['pageTitle'] = 'Siddharth : 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'] = 'Siddharth : 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); + $this->loadviews("Report_cumulative_month_inward",$this->global,$data, NULL); + + } + public function icum_year() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + $last = $this->uri->segment_array(); + + $sup = $last[3]; + $mat = $last[4]; + + //print_r($sup); + + $data['cum_year']=$this->dahsboard_Model->ireport_cum_year($sup,$mat); + $this->loadviews("Report_cumulative_year_inward",$this->global,$data, NULL); + + } + public function icum_day() + { + + $this->global['pageTitle'] = 'Siddharth : Reports'; + $last = $this->uri->segment_array(); + + $sup = $last[3]; + $mat = $last[4]; + //print_r($prod); + + $data['cum_day']=$this->dahsboard_Model->ireport_cum_day($sup,$mat); + $this->loadviews("Report_cumulative_day_inward",$this->global,$data, NULL); + } public function cashbook() { diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index 32be8e25..025823ed 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -945,6 +945,437 @@ 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 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){ + + + $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, +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, +ifnull(if(POType = 'REVENUE',sum(rt.AfterSGST),sum(st.After_SGST)),0) as sgst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterCGST),sum(st.After_CGST)),0) as cgst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterIGST),sum(st.After_IGST)),0) as igst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterDiscount),sum(st.Afterdiscountval)),0) as discount, +ifnull(if(POType = 'REVENUE',sum(rt.AfterFreightValue),sum(st.AfterFreightValue)),0) as freight, +ifnull(if(POType = 'REVENUE',sum(rt.AfterPackagingValue),0),0) as Package, +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)), +ifnull(sum(pl.Quantity * 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 + 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 +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' "; + +if ($cname!= ''){ + + $sql.="and sd.SupplierName = '".$cname."'"; + + } + + + + if ($fa and $aa != ''){ + + $sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')"; + + } + if ($m!= ''){ + + $sql.="and monthname(pm.CreatedDate) = '".$m."'"; + + } + + if ($frm and $t != ''){ + $fromd= date("Y-m-d",strtotime($frm)); + $tod=date("Y-m-d",strtotime($t)); + + $sql.="and date(pm.CreatedDate) >= '".$fromd."' + and date(pm.CreatedDate) <= '".$tod."'"; + + } + if ($prod!= ''){ + + $sql.=" and mm.MaterialName = '".$prod."' "; + + } + + + +$sql.="group by pono,material_name,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){ + + + $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, +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, +ifnull(if(POType = 'REVENUE',sum(rt.AfterSGST),sum(st.After_SGST)),0) as sgst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterCGST),sum(st.After_CGST)),0) as cgst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterIGST),sum(st.After_IGST)),0) as igst, +ifnull(if(POType = 'REVENUE',sum(rt.AfterDiscount),sum(st.Afterdiscountval)),0) as discount, +ifnull(if(POType = 'REVENUE',sum(rt.AfterFreightValue),sum(st.AfterFreightValue)),0) as freight, +ifnull(if(POType = 'REVENUE',sum(rt.AfterPackagingValue),0),0) as Package, +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)), +ifnull(sum(pl.Quantity * 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 + 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 +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' "; + +if ($cname!= ''){ + + $sql.="and sd.SupplierName = '".$cname."'"; + + } + + + + if ($fa and $aa != ''){ + + $sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')"; + + } + if ($m!= ''){ + + $sql.="and monthname(pm.CreatedDate) = '".$m."'"; + + } + + if ($frm and $t != ''){ + $fromd= date("Y-m-d",strtotime($frm)); + $tod=date("Y-m-d",strtotime($t)); + + $sql.="and date(pm.CreatedDate) >= '".$fromd."' + and date(pm.CreatedDate) <= '".$tod."'"; + + } + if ($prod!= ''){ + + $sql.=" and mm.MaterialName = '".$prod."' "; + + } + if ($sid!= ''){ + + $sql.=" and sd.SupplierID = '".$sid."' "; + + } + if ($mid!= ''){ + + $sql.=" and mm.MaterialCode = '".$mid."' "; + + } + if ($d!= ''){ + + $sql.=" and date(pm.CreatedDate) = '".$d."' "; + + } + + + +$sql.="group by pono,material_name,supplier_name"; +//echo $sql; + $query = $this->db->query($sql); + return $query->result(); + } + + function ireport_year_wise(){ + + + $sql="SELECT sd.SupplierID as sid,mm.MaterialCode as mid,pm.CreatedDate as created_date,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 +left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo +where pm.Status != 'ST030' and pm.Status = 'ST056' +group by month(created_date)"; + $query = $this->db->query($sql); + return $query->result(); + + + + } + + function ireport_month_wise($mont){ + $month= date("m",strtotime($mont)); + $year = date("Y",strtotime($mont)); + + $sql="SELECT sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,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 +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) = ? +group by supplier_name,material_name"; + $query = $this->db->query($sql,array($month,$year)); + return $query->result(); + } + function ireport_year_wise_total($a,$b){ + + $sql="SELECT sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,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 +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' +group by supplier_name,material_name"; + $query = $this->db->query($sql,array()); + return $query->result(); + } + + function ireport_supplier($cname,$fa,$aa,$m,$frm,$t){ + + + $sql="SELECT sd.SupplierID as sid,sd.SupplierName as supplier_name,count(pm.PONO) as counts,ifnull(sum(pl.Quantity),0) as quantity,round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value, + +case pm.POType +when 'IMPORT' +then ifnull((sum(distinct(pl.Quantity * pl.Rate) * pm.ExchangeRate) + +),0) +when 'CAPITAL' +then sum(distinct if(pm.CapitalRange=0,(( pl.Quantity * pl.Rate) * pm.ExchangeRate),( pl.Quantity * 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) + + +when 'SERVICE' +then ifnull(sum(distinct pl.Quantity * 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) + +when 'REVENUE' +then ifnull(sum(distinct pl.Quantity * 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) + +end + as total +FROM T_PurchaseOrder_Master pm +left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO +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' "; + +if ($cname!= ''){ + + $sql.="and sd.SupplierName = '".$cname."'"; + + } + + + + if ($fa and $aa != ''){ + + $sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')"; + + } + if ($m!= ''){ + + $sql.="and monthname(pm.CreatedDate) = '".$m."'"; + + } + + if ($frm and $t != ''){ + $fromd= date("Y-m-d",strtotime($frm)); + $tod=date("Y-m-d",strtotime($t)); + + $sql.="and date(pm.CreatedDate) >= '".$fromd."' + and date(pm.CreatedDate) <= '".$tod."'"; + + } + $sql.= "group by supplier_name"; + //echo $sql; + $query = $this->db->query($sql); + return $query->result(); + + } + function ireport_consolidate($cname,$fa,$aa){ + + + $sql="select sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,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' "; + +if ($cname!= ''){ + + $sql.="and sd.SupplierName = '".$cname."'"; + + } + + + + if ($fa and $aa != ''){ + + $sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')"; + + } + + $sql.= "group by supplier_name,material_name"; + //echo $sql; + $query = $this->db->query($sql); + return $query->result(); + + } + function ireport_cumulative(){ + + $sql="SELECT year.sid as sid,year.mid as mid,year.supplier_name as supplier_name,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 sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,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 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 ) + 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 supplier_name,material_name +) as year left join +(SELECT sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,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 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 +left join +(SELECT 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 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 +group by supplier_name,material_name +"; + $query = $this->db->query($sql); + return $query->result(); + } + function ireport_cum_month($sup=null,$mat=null){ + + $sql="SELECT 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 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(); + } + function ireport_cum_year($sup=null,$mat=null){ + + $sql="SELECT 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 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 ) + 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 sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."' +group by supplier_name,material_name"; + $query = $this->db->query($sql); + return $query->result(); + } + function ireport_cum_day($sup=null,$mat=null){ + + $sql="SELECT 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 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(); diff --git a/application/views/Report_Material_Master_ReceiptValue.php b/application/views/Report_Material_Master_ReceiptValue.php index df409aa4..2a9e2dba 100755 --- a/application/views/Report_Material_Master_ReceiptValue.php +++ b/application/views/Report_Material_Master_ReceiptValue.php @@ -67,7 +67,7 @@ if(!empty($mmr)) MaterialCode?> MaterialName?> UOM?> - Average_Rate?> + Average_Rate,2,'.','')?> diff --git a/application/views/Report_POreleased.php b/application/views/Report_POreleased.php index 510556b0..9afc7f75 100755 --- a/application/views/Report_POreleased.php +++ b/application/views/Report_POreleased.php @@ -84,7 +84,7 @@ if(!empty($rel_po)) CreatedDate);echo $date->format('d-m-Y'); ?> ReleasedDate);echo $date->format('d-m-Y'); ?> Dept_Name?> - TotalOrderValue?> + TotalOrderValue,2,'.','')?> diff --git a/application/views/Report_consolidate.php b/application/views/Report_consolidate.php index 06c42b0e..315bc7f7 100755 --- a/application/views/Report_consolidate.php +++ b/application/views/Report_consolidate.php @@ -157,7 +157,7 @@ foreach ($spurchse as $result) { ?> - supplier_name;?> + supplier_name;?> material_name)) { echo $result->material_name ; } else {echo "-";} @@ -410,56 +410,56 @@ ?> vApril); - if(!empty($result->vApril)) { echo round($result->vApril); } else {echo "-";} + if(!empty($result->vApril)) { echo number_format($result->vApril,2,'.',''); } else {echo "-";} ?> vMay); - if(!empty($result->vMay)) { echo round($result->vMay); } else {echo "-";} + if(!empty($result->vMay)) { echo number_format($result->vMay,2,'.',''); } else {echo "-";} ?> vJune); - if(!empty($result->vJune)) { echo round($result->vJune); } else {echo "-";} + if(!empty($result->vJune)) { echo number_format($result->vJune,2,'.',''); } else {echo "-";} ?> vJuly); - if(!empty($result->vJuly)) { echo round($result->vJuly); } else {echo "-";} + if(!empty($result->vJuly)) { echo number_format($result->vJuly,2,'.',''); } else {echo "-";} ?> vAugust); - if(!empty($result->vAugust)) { echo round($result->vAugust); } else {echo "-";} + if(!empty($result->vAugust)) { echo number_format($result->vAugust,2,'.',''); } else {echo "-";} ?> vSeptember; - if(!empty($result->vSeptember)) { echo round($result->vSeptember); } else {echo "-";} + if(!empty($result->vSeptember)) { echo number_format($result->vSeptember,2,'.',''); } else {echo "-";} ?> vOctober); - if(!empty($result->vOctober)) { echo round($result->vOctober); } else {echo "-";} + if(!empty($result->vOctober)) { echo number_format($result->vOctober,2,'.',''); } else {echo "-";} ?> vNovember); - if(!empty($result->vNovember)) { echo round($result->vNovember); } else {echo "-";} + if(!empty($result->vNovember)) { echo number_format($result->vNovember,2,'.',''); } else {echo "-";} ?> vDecember); - if(!empty($result->vDecember)) { echo round($result->vDecember); } else {echo "-";} + if(!empty($result->vDecember)) { echo number_format($result->vDecember,2,'.',''); } else {echo "-";} ?> vJanuary); - if(!empty($result->vJanuary)) { echo round($result->vJanuary); } else {echo "-";} + if(!empty($result->vJanuary)) { echo number_format($result->vJanuary,2,'.',''); } else {echo "-";} ?> vFebruary); - if(!empty($result->vFebruary)) { echo round($result->vFebruary); } else {echo "-";} + if(!empty($result->vFebruary)) { echo number_format($result->vFebruary,2,'.',''); } else {echo "-";} ?> vMarch); - if(!empty($result->vMarch)) { echo round($result->vMarch); } else {echo "-";} + if(!empty($result->vMarch)) { echo number_format($result->vMarch,2,'.',''); } else {echo "-";} ?> vtotal); - if(!empty($result->vtotal)) { echo round($result->vtotal); } else {echo "-";} + if(!empty($result->vtotal)) { echo number_format($result->vtotal,2,'.',''); } else {echo "-";} ?> @@ -482,7 +482,7 @@ @@ -490,7 +490,7 @@ @@ -498,7 +498,7 @@ @@ -506,7 +506,7 @@ @@ -514,7 +514,7 @@ @@ -522,7 +522,7 @@ @@ -531,7 +531,7 @@ @@ -541,7 +541,7 @@ @@ -551,7 +551,7 @@ @@ -561,7 +561,7 @@ @@ -571,7 +571,7 @@ @@ -581,7 +581,7 @@ + $(document).ready(function () { + + $("#client_name").select2(); + + + + }); + + + +
+ +
+ +
+
+

Report - Consolidate-Inward

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

+ + +
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + input->post('financialyear'); + foreach ($spurchse as $result) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Supplier NameMaterial NameAprMayJunJulAugSepOctNovDecJanFebMarTotal
+ supplier_name;?> + material_name)) { echo $result->material_name ; } else {echo "-";} + ?>April); + if(!empty($result->April)) { echo round($result->April); } else {echo "-";} + ?>May); + if(!empty($result->May)) { echo round($result->May); } else {echo "-";} + ?>June); + if(!empty($result->June)) { echo round($result->June); } else {echo "-";} + ?>July); + if(!empty($result->July)) { echo round($result->July); } else {echo "-";} + ?>August); + if(!empty($result->August)) { echo round($result->August); } else {echo "-";} + + ?>September; + if(!empty($result->September)) { echo round($result->September); } else {echo "-";} + ?>October); + if(!empty($result->October)) { echo round($result->October); } else {echo "-";} + ?>November); + if(!empty($result->November)) { echo round($result->November); } else {echo "-";} + ?>December); + if(!empty($result->December)) { echo round($result->December); } else {echo "-";} + ?>January); + if(!empty($result->January)) { echo round($result->January); } else {echo "-";} + ?>February); + if(!empty($result->February)) { echo round($result->February); } else {echo "-";} + ?>March); + if(!empty($result->March)) { echo round($result->March); } else {echo "-";} + ?>qtotal); + if(!empty($result->qtotal)) { echo round($result->qtotal); } else {echo "-";} + ?>
Total + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_costcenter.php b/application/views/Report_costcenter.php index 492763b5..b5ed45e4 100755 --- a/application/views/Report_costcenter.php +++ b/application/views/Report_costcenter.php @@ -53,7 +53,9 @@ if(!empty($ccrpt))
+
+
+
@@ -106,8 +110,8 @@ if(!empty($ccrpt)) Dept_Name?> BudgetType?> BudgetYear?> - Util_Amount?> - Avlbl_Amt?> + Util_Amount,2,'.','')?> + Avlbl_Amt,2,'.','')?> = 4) { $yearl = date('Y').'-'.(date('Y')+1); @@ -98,20 +98,20 @@ if(!empty($mms)) $tqt= $tqt + round($rel->tquantity); echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?> ttotal); - echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,round($rel->ttotal));?> + $tvt= $tvt + number_format($rel->ttotal,2,'.',''); + echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?> mquantity); echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?> mtotal); - echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mtotal));?> + $mvt= $mvt + number_format($rel->mtotal,2,'.',''); + echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?> quantity); echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?> total); - echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,round($rel->total));?> + $yvt= $yvt + number_format($rel->total,2,'.',''); + echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?> @@ -149,7 +149,7 @@ if(!empty($mms)) @@ -169,7 +169,7 @@ if(!empty($mms)) @@ -189,7 +189,7 @@ if(!empty($mms)) diff --git a/application/views/Report_cumulative_day.php b/application/views/Report_cumulative_day.php index 4a850ba8..e622be32 100755 --- a/application/views/Report_cumulative_day.php +++ b/application/views/Report_cumulative_day.php @@ -61,7 +61,7 @@ if(!empty($mms)) tquantity); echo round($rel->tquantity);?> ttotal); - echo round($rel->ttotal);?> + $tvt= $tvt + number_format($rel->ttotal,2,'.',''); + echo number_format($rel->ttotal,2,'.','');?> @@ -114,7 +114,7 @@ if(!empty($mms)) diff --git a/application/views/Report_cumulative_day_inward.php b/application/views/Report_cumulative_day_inward.php new file mode 100644 index 00000000..e622be32 --- /dev/null +++ b/application/views/Report_cumulative_day_inward.php @@ -0,0 +1,183 @@ + + + + + +
+ +
+ +
+
+

Report - Cumulative Today

+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Supplier NameMaterial Name
QuantityValue  ()
+ 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 new file mode 100644 index 00000000..2bb1274e --- /dev/null +++ b/application/views/Report_cumulative_inward.php @@ -0,0 +1,257 @@ + + + + + +
+ +
+ +
+
+

Report - Cumulative

+
+ + +
+
+ + + + = 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) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Supplier NameMaterial Name
QuantityValue  ()QuantityValue  ()QuantityValue  ()
+ supplier_name;?> + material_name;?>tquantity); + echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?>ttotal,2,'.',''); + echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?>mquantity); + echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?>mtotal,2,'.',''); + echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?>quantity); + echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?>total,2,'.',''); + echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?>
Total + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_cumulative_month.php b/application/views/Report_cumulative_month.php index f3bae19b..ba730659 100755 --- a/application/views/Report_cumulative_month.php +++ b/application/views/Report_cumulative_month.php @@ -82,8 +82,8 @@ if(!empty($mms)) $tqt= $tqt + round($rel->tquantity); echo round($rel->tquantity);?> ttotal); - echo round($rel->ttotal);?> + $tvt= $tvt + number_format($rel->ttotal,2,'.',''); + echo number_format($rel->ttotal,2,'.','');?> @@ -120,7 +120,7 @@ if(!empty($mms)) diff --git a/application/views/Report_cumulative_month_inward.php b/application/views/Report_cumulative_month_inward.php new file mode 100644 index 00000000..ba730659 --- /dev/null +++ b/application/views/Report_cumulative_month_inward.php @@ -0,0 +1,189 @@ + + + + + +
+ +
+ +
+
+

Report - Cumulative Month

+
+ + +
+
+ + + + + + + + + + + + + + + + + = 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) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
Supplier NameMaterial Name
QuantityValue  ()
+ 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_year.php b/application/views/Report_cumulative_year.php index 5a2208cc..23115271 100755 --- a/application/views/Report_cumulative_year.php +++ b/application/views/Report_cumulative_year.php @@ -88,8 +88,8 @@ if(!empty($mms)) $tqt= $tqt + round($rel->tquantity); echo round($rel->tquantity);?> ttotal); - echo round($rel->ttotal);?> + $tvt= $tvt + number_format($rel->ttotal,2,'.',''); + echo number_format($rel->ttotal,2,'.','');?> @@ -126,7 +126,7 @@ if(!empty($mms)) diff --git a/application/views/Report_cumulative_year_inward.php b/application/views/Report_cumulative_year_inward.php new file mode 100644 index 00000000..23115271 --- /dev/null +++ b/application/views/Report_cumulative_year_inward.php @@ -0,0 +1,195 @@ + + + + + +
+ +
+ +
+
+

Report - Cumulative Year

+
+ + +
+
+ + + + = 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) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
Supplier NameMaterial Name
QuantityValue  ( )
+ 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.php b/application/views/Report_month_wise.php index 53db35d5..f7d98dd7 100755 --- a/application/views/Report_month_wise.php +++ b/application/views/Report_month_wise.php @@ -72,8 +72,8 @@ if(!empty($mms)) $tr3= $tr3 + round($rel->quantity); echo round($rel->quantity);?> total; - echo $rel->total;?> + $tr4= $tr4 + number_format($rel->total,2,'.',''); + echo number_format($rel->total,2,'.','');?> diff --git a/application/views/Report_month_wise_inward.php b/application/views/Report_month_wise_inward.php new file mode 100644 index 00000000..77896b39 --- /dev/null +++ b/application/views/Report_month_wise_inward.php @@ -0,0 +1,211 @@ + + + + + +
+ +
+ +
+
+

Report - Month-wise-Inward()

+
+ +
+
+ + + + + + + + + + + + + input->get('ab'); + $last = $this->input->get('dat'); + $new = date("F",strtotime($last))."\n"; + foreach($month as $rel) + { + ?> + + + + + + + + + + + + + + + + + + + + + +
Supplier NameMaterial NameQuantityTotal Value  ( )
+ supplier_name;?> + material_name;?>quantity); + echo round($rel->quantity);?>total,2,'.',''); + echo number_format($rel->total,2,'.','');?>
+ + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_openorder.php b/application/views/Report_openorder.php index 76b5b12f..97b9cb17 100755 --- a/application/views/Report_openorder.php +++ b/application/views/Report_openorder.php @@ -83,7 +83,7 @@ if(!empty($open_po)) CreatedDate?> ApprovedDate?> Dept_Name?> - TotalOrderValue?> + TotalOrderValue,2,'.','')?> diff --git a/application/views/Report_purchase.php b/application/views/Report_purchase.php index 307e88cc..32d71821 100755 --- a/application/views/Report_purchase.php +++ b/application/views/Report_purchase.php @@ -97,7 +97,7 @@ if(!empty($mms)) -



+
-
+

@@ -263,7 +263,7 @@ if(!empty($mms)) echo $rel->Package;?> total,2); - echo round($rel->total,2);?> + echo number_format($rel->total,2,'.','');?> @@ -312,7 +312,7 @@ if(!empty($mms)) @@ -332,7 +332,7 @@ if(!empty($mms)) @@ -342,7 +342,7 @@ if(!empty($mms)) @@ -352,7 +352,7 @@ if(!empty($mms)) @@ -362,7 +362,7 @@ if(!empty($mms)) + + + +
+ +
+ +
+
+

Report - Purchase-Inward

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

+ + +
+
+
+ + + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PO NODateTimeMaterial NameSupplier NameQuantityUOMRate  ()Value  ()Exchange RateSGST  ()CGST  ()IGST  ()Discount  ()Freight  ()Package  ()Total  ()
pono;?>created_date;?>created_time;?>material_name;?>supplier_name;?>quantity); + echo round($rel->quantity);?>UOM;?>rate; + echo $rel->rate;?>value; + echo $rel->value;?>exchange_rate; + echo $rel->exchange_rate;?>sgst; + echo $rel->sgst;?>cgst; + echo $rel->cgst;?>igst; + echo $rel->igst;?>discount; + echo $rel->discount;?>freight; + echo $rel->freight;?>Package; + echo $rel->Package;?>total,2); + echo number_format($rel->total,2,'.','');?>
Total     + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_supplier.php b/application/views/Report_supplier.php index 360bcb0d..bc495c83 100755 --- a/application/views/Report_supplier.php +++ b/application/views/Report_supplier.php @@ -55,7 +55,7 @@ if(!empty($mms))
-
+
@@ -76,7 +76,7 @@ if(!empty($mms))
-



+
-
+
@@ -134,7 +134,7 @@ if(!empty($mms))
-
+
@@ -146,7 +146,7 @@ if(!empty($mms))
-
+

@@ -198,7 +198,7 @@ if(!empty($mms)) echo round($rel->quantity);?> value; - echo $rel->value;?> + echo number_format($rel->value,2,'.','');?> @@ -237,7 +237,7 @@ if(!empty($mms)) diff --git a/application/views/Report_supplier_inward.php b/application/views/Report_supplier_inward.php new file mode 100644 index 00000000..3c53a11c --- /dev/null +++ b/application/views/Report_supplier_inward.php @@ -0,0 +1,346 @@ + + + + + + +
+ +
+ +
+
+

Report - Supplier-Inward

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

+ + +
+
+ + + + +
+ + + +
+
+ + + + + + + + + + + + + input->post('financialyear'); + $month=$this->input->post('month'); + $frm = $this->input->post('from_date'); + $t = $this->input->post('to_date'); + foreach($spurchse as $rel) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Supplier NamePO CountQuantityValue  ()
+ supplier_name;?> + counts); + echo round($rel->counts);?>quantity); + echo round($rel->quantity);?>value; + echo number_format($rel->value,2,'.','');?>
Total + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_totalorders.php b/application/views/Report_totalorders.php index e5724314..614e4638 100755 --- a/application/views/Report_totalorders.php +++ b/application/views/Report_totalorders.php @@ -43,6 +43,7 @@ if(!empty($Total))
+
- -

 

- +
+
+ value="View Report">
diff --git a/application/views/Report_year_wise.php b/application/views/Report_year_wise.php index 99590e62..6bee5839 100755 --- a/application/views/Report_year_wise.php +++ b/application/views/Report_year_wise.php @@ -46,6 +46,7 @@ if(!empty($mms))
+
- -

 

- - +
+
+ +
@@ -110,8 +110,8 @@ if(!empty($mms)) $tr3= $tr3 + $rel->quantity; echo round($rel->quantity);?> total; - echo $rel->total;?> + $tr4= $tr4 + number_format($rel->total,2,'.',''); + echo number_format($rel->total,2,'.','');?> @@ -144,7 +144,7 @@ if(!empty($mms)) diff --git a/application/views/Report_year_wise_inward.php b/application/views/Report_year_wise_inward.php new file mode 100644 index 00000000..dd23dacc --- /dev/null +++ b/application/views/Report_year_wise_inward.php @@ -0,0 +1,215 @@ + + + + + +
+ +
+ +
+
+

Report - Year-Wise-Inward

+
+ + +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Month-YearQuantityTotal Value  ()
+ created_date); + $new = date('M-y', $date); + $pass = date('Y-m-d',$date); + $ab=$this->input->post('financialyear'); + //echo $new; + ?> + + + quantity; + echo round($rel->quantity);?>total,2,'.',''); + echo number_format($rel->total,2,'.','');?>
input->post('financialyear'); + $Total="Total"; + echo anchor('report/year_wise_total/' . $ab,$Total); ?> + + + + + + + + + +
+ +
+
+ +
+ + +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/Report_year_wise_total.php b/application/views/Report_year_wise_total.php index 864ce670..a9c1926a 100755 --- a/application/views/Report_year_wise_total.php +++ b/application/views/Report_year_wise_total.php @@ -71,8 +71,8 @@ if(!empty($mms)) $tr3= $tr3 + round($rel->quantity); echo round($rel->quantity);?> total; - echo $rel->total;?> + $tr4= $tr4 + number_format($rel->total,2,'.',''); + echo number_format($rel->total,2,'.','');?> diff --git a/application/views/Report_year_wise_total_inward.php b/application/views/Report_year_wise_total_inward.php new file mode 100644 index 00000000..a9c1926a --- /dev/null +++ b/application/views/Report_year_wise_total_inward.php @@ -0,0 +1,212 @@ + + + + + +
+ +
+ +
+
+

Report - Year-wise-Total()

+
+ +
+
+ + + + + + + + + + + + + uri->total_segments(); + $ab=$this->uri->segment($last); + foreach($ytotal as $rel) + { + ?> + + + + + + + + + + + + + + + + + + + + + +
Supplier NameMaterial NameQuantityTotal Value  ()
+ supplier_name;?> + material_name;?>quantity); + echo round($rel->quantity);?>total,2,'.',''); + echo number_format($rel->total,2,'.','');?>
+ + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/reportcashbook.php b/application/views/reportcashbook.php index aea56fa3..e02eb19f 100644 --- a/application/views/reportcashbook.php +++ b/application/views/reportcashbook.php @@ -142,7 +142,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled: -
+
@@ -153,7 +153,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
- + Receipt : Payments : @@ -168,7 +168,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
- + Receipt : Payments :
@@ -181,7 +181,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
- + Receipt : Payments :
diff --git a/application/views/reportslink.php b/application/views/reportslink.php index 75b0c683..32cbc334 100644 --- a/application/views/reportslink.php +++ b/application/views/reportslink.php @@ -73,11 +73,11 @@ h1{
@@ -95,9 +95,9 @@ h1{
@@ -138,20 +138,24 @@ h1{
- +
@@ -179,7 +183,7 @@ h1{
-

Attentance

+

Attendance


Employee Attentance