diff --git a/application/controllers/report.php b/application/controllers/report.php index a78aae30..fb3308ea 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -506,7 +506,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['spurchse']=$this->dahsboard_Model->consolidate_month($m,$cname,$mid,$fa,$aa); + $data['spurchse']=$this->dahsboard_Model->consolidate_month($m,$sid,$mid,$fa,$aa); // print_r( $data['spurchse']); if($this->DEPCode == MANAGEMENT) { @@ -535,7 +535,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['spurchse']=$this->dahsboard_Model->consolidate_year($cname,$mid,$fa,$aa); + $data['spurchse']=$this->dahsboard_Model->consolidate_year($sid,$mid,$fa,$aa); // print_r( $data['spurchse']); if($this->DEPCode == MANAGEMENT) { @@ -836,7 +836,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['spurchse']=$this->dahsboard_Model->i_consolidate_month($m,$cname,$prod,$fa,$aa); + $data['spurchse']=$this->dahsboard_Model->i_consolidate_month($m,$sid,$mid,$fa,$aa); // print_r( $data['spurchse']); if($this->DEPCode == MANAGEMENT) { @@ -865,7 +865,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['spurchse']=$this->dahsboard_Model->i_consolidate_year($cname,$prod,$fa,$aa); + $data['spurchse']=$this->dahsboard_Model->i_consolidate_year($sid,$mid,$fa,$aa); // print_r( $data['spurchse']); if($this->DEPCode == MANAGEMENT) { diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index 5f116baf..66975bd1 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -1207,7 +1207,7 @@ if ($cname!= ''){ return $query->result(); } - function consolidate_month($m=null,$cname=null,$mid=null,$fa=null,$aa=null){ + function consolidate_month($m=null,$sid=null,$mid=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, @@ -1219,7 +1219,7 @@ 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' and -monthname(pm.PODate) = '".$m."' and sd.SupplierName = '".$cname."' and mm.MaterialCode = '".$mid."' "; +monthname(pm.PODate) = '".$m."' and sd.SupplierID = '".$sid."' and mm.MaterialCode = '".$mid."' "; if ($fa and $aa != ''){ $sql.=" and (pm.PODate >= '".$fa."-04-01' and pm.PODate <= '".$aa."-03-31')"; @@ -1230,7 +1230,7 @@ if ($fa and $aa != ''){ //echo $sql; return $query->result(); } - function consolidate_year($cname=null,$mid=null,$fa=null,$aa=null){ + function consolidate_year($sid=null,$mid=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, @@ -1241,7 +1241,7 @@ join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode 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' and sd.SupplierName = '".$cname."' and mm.MaterialCode = '".$mid."' "; +where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierID = '".$sid."' and mm.MaterialCode = '".$mid."' "; if ($fa and $aa != ''){ $sql.=" and (pm.PODate >= '".$fa."-04-01' and pm.PODate <= '".$aa."-03-31')"; @@ -1699,12 +1699,12 @@ if ($cname!= ''){ } $sql.= "group by supplier_name,material_name"; - //echo $sql; + // echo $sql; $query = $this->db->query($sql); return $query->result(); } - function i_consolidate_month($m=null,$cname=null,$prod=null,$fa=null,$aa=null){ + function i_consolidate_month($m=null,$sid=null,$mid=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, @@ -1717,7 +1717,7 @@ 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 -monthname(im.CreatedDate) = '".$m."' and sd.SupplierName = '".$cname."' and mm.MaterialName = '".$prod."' "; +monthname(im.CreatedDate) = '".$m."' and sd.SupplierID = '".$sid."' and mm.MaterialCode = '".$mid."' "; if ($fa and $aa != ''){ $sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')"; @@ -1728,7 +1728,7 @@ if ($fa and $aa != ''){ //echo $sql; return $query->result(); } - function i_consolidate_year($cname=null,$prod=null,$fa=null,$aa=null){ + function i_consolidate_year($sid=null,$mid=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, @@ -1740,7 +1740,7 @@ join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode 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 sd.SupplierName = '".$cname."' and mm.MaterialName = '".$prod."' "; +where pm.Status != 'ST030' and sd.SupplierID = '".$sid."' and mm.MaterialCode = '".$mid."' "; if ($fa and $aa != ''){ $sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')"; @@ -1932,7 +1932,7 @@ where pm.Status != 'ST030' and date(im.CreatedDate) = current_date() and mm.Category = '".$cat."' group by supplier_name,material_name"; $query = $this->db->query($sql); - echo $sql; + //echo $sql; return $query->result(); } function rawi_report_consolidate($cname,$fa,$aa){ diff --git a/application/views/Report_Material_Master_ReceiptValue.php b/application/views/Report_Material_Master_ReceiptValue.php index 8526ec5c..91837ab5 100755 --- a/application/views/Report_Material_Master_ReceiptValue.php +++ b/application/views/Report_Material_Master_ReceiptValue.php @@ -214,8 +214,8 @@ $(document).ready(function() { { extend: 'excelHtml5', footer: 'true', - messageTop: $('h3').text(), - title: 'Report - Material Master - ReceiptValue', + //messageTop: $('h3').text(), + title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_POreleased.php b/application/views/Report_POreleased.php index 77b491fc..8f099fc3 100755 --- a/application/views/Report_POreleased.php +++ b/application/views/Report_POreleased.php @@ -259,8 +259,8 @@ $(document).ready(function() { { extend: 'excelHtml5', footer: 'true', - messageTop: $('h3').text(), - title: 'Report - Released PO', + //messageTop: $('h3').text(), + title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_consolidate.php b/application/views/Report_consolidate.php index b895e245..fd27103b 100755 --- a/application/views/Report_consolidate.php +++ b/application/views/Report_consolidate.php @@ -172,7 +172,7 @@ foreach ($spurchse as $result) { ?> - supplier_name;?> + supplier_name;?> material_name)) { echo $result->material_name ; } else {echo "-";} @@ -180,67 +180,67 @@ April); ?> - April);?> + April);?> May); ?> - May);?> + May);?> June); ?> - June);?> + June);?> July); ?> - July);?> + July);?> August); ?> - August);?> + August);?> September); ?> - September);?> + September);?> October); ?> - October);?> + October);?> November); ?> - November);?> + November);?> December); ?> - December);?> + December);?> January); ?> - January);?> + January);?> February); ?> - February);?> + February);?> March); ?> - March);?> + March);?> qtotal); ?> - qtotal);?> + qtotal);?> @@ -436,7 +436,7 @@ foreach ($spurchse as $result) { ?> - supplier_name;?> + supplier_name;?> material_name)) { echo $result->material_name ; } else {echo "-";} @@ -444,67 +444,67 @@ vApril,2,'.',''); ?> - vApril,2,'.','');?> + vApril,2,'.','');?> vMay,2,'.',''); ?> - vMay,2,'.','');?> + vMay,2,'.','');?> vJune,2,'.',''); ?> - vJune,2,'.','');?> + vJune,2,'.','');?> vJuly,2,'.',''); ?> - vJuly,2,'.','');?> + vJuly,2,'.','');?> vAugust,2,'.',''); ?> - vAugust,2,'.','');?> + vAugust,2,'.','');?> vSeptember,2,'.',''); ?> - vSeptember,2,'.','');?> + vSeptember,2,'.','');?> vOctober,2,'.',''); ?> - vOctober,2,'.','');?> + vOctober,2,'.','');?> vNovember,2,'.',''); ?> - vNovember,2,'.','');?> + vNovember,2,'.','');?> vDecember,2,'.',''); ?> - vDecember,2,'.','');?> + vDecember,2,'.','');?> vJanuary,2,'.',''); ?> - vJanuary,2,'.','');?> + vJanuary,2,'.','');?> vFebruary,2,'.',''); ?> - vFebruary,2,'.','');?> + vFebruary,2,'.','');?> vMarch,2,'.',''); ?> - vMarch,2,'.','');?> + vMarch,2,'.','');?> vtotal,2,'.',''); ?> - vtotal,2,'.','');?> + vtotal,2,'.','');?> @@ -687,8 +687,8 @@ $(document).ready(function() { { extend: 'excelHtml5', footer: 'true', - messageTop: $('h3').text(), - title: 'REPORT-Consolidate(Quantity)', + //messageTop: $('h3').text(), + title: $('h3').text(), exportOptions: { columns: ':visible' @@ -709,8 +709,8 @@ $(document).ready(function() { { extend: 'excelHtml5', footer: 'true', - messageTop: $('h3').text(), - title: 'REPORT-Consolidate(Value)', + //messageTop: $('h3').text(), + title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_consolidate_inward.php b/application/views/Report_consolidate_inward.php index 1663aab1..38f505be 100755 --- a/application/views/Report_consolidate_inward.php +++ b/application/views/Report_consolidate_inward.php @@ -170,7 +170,7 @@ foreach ($spurchse as $result) { ?> - supplier_name;?> + supplier_name;?> material_name)) { echo $result->material_name ; } else {echo "-";} @@ -178,67 +178,67 @@ April); ?> - April);?> + April);?> May); ?> - May);?> + May);?> June); ?> - June);?> + June);?> July); ?> - July);?> + July);?> August); ?> - August);?> + August);?> September); ?> - September);?> + September);?> October); ?> - October);?> + October);?> November); ?> - November);?> + November);?> December); ?> - December);?> + December);?> January); ?> - January);?> + January);?> February); ?> - February);?> + February);?> March); ?> - March);?> + March);?> qtotal); ?> - qtotal);?> + qtotal);?> @@ -435,7 +435,7 @@ foreach ($spurchse as $result) { ?> - supplier_name;?> + supplier_name;?> material_name)) { echo $result->material_name ; } else {echo "-";} @@ -443,67 +443,67 @@ vApril,2,'.',''); ?> - vApril,2,'.','');?> + vApril,2,'.','');?> vMay,2,'.',''); ?> - vMay,2,'.','');?> + vMay,2,'.','');?> vJune,2,'.',''); ?> - vJune,2,'.','');?> + vJune,2,'.','');?> vJuly,2,'.',''); ?> - vJuly,2,'.','');?> + vJuly,2,'.','');?> vAugust,2,'.',''); ?> - vAugust,2,'.','');?> + vAugust,2,'.','');?> vSeptember,2,'.',''); ?> - vSeptember,2,'.','');?> + vSeptember,2,'.','');?> vOctober,2,'.',''); ?> - vOctober,2,'.','');?> + vOctober,2,'.','');?> vNovember,2,'.',''); ?> - vNovember,2,'.','');?> + vNovember,2,'.','');?> vDecember,2,'.',''); ?> - vDecember,2,'.','');?> + vDecember,2,'.','');?> vJanuary,2,'.',''); ?> - vJanuary,2,'.','');?> + vJanuary,2,'.','');?> vFebruary,2,'.',''); ?> - vFebruary,2,'.','');?> + vFebruary,2,'.','');?> vMarch,2,'.',''); ?> - vMarch,2,'.','');?> + vMarch,2,'.','');?> vtotal,2,'.',''); ?> - vtotal,2,'.','');?> + vtotal,2,'.','');?> @@ -686,8 +686,8 @@ $(document).ready(function() { { extend: 'excelHtml5', footer: 'true', - messageTop: $('h3').text(), - title: 'REPORT-Consolidate-Inward(Quantity)', + //messageTop: $('h3').text(), + title: $('h3').text(), exportOptions: { columns: ':visible' @@ -708,8 +708,8 @@ $(document).ready(function() { { extend: 'excelHtml5', footer: 'true', - messageTop: $('h3').text(), - title: 'REPORT-Consolidate-Inward(Quantity)', + //messageTop: $('h3').text(), + title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_consolidate_m.php b/application/views/Report_consolidate_m.php index d2837f74..2c4399f8 100644 --- a/application/views/Report_consolidate_m.php +++ b/application/views/Report_consolidate_m.php @@ -77,7 +77,7 @@ if(!empty($mms)) - supplier_name;?> + supplier_name;?> material_name;?> - supplier_name;?> + supplier_name;?> material_name;?> - supplier_name;?> + supplier_name;?> material_name;?> @@ -172,8 +172,8 @@ $(document).ready(function() { { extend: 'excelHtml5', footer: 'true', - messageTop: $('h3').text(), - title: 'REPORT-Consolidate', + //messageTop: $('h3').text(), + title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_consolidate_year.php b/application/views/Report_consolidate_year.php index d8fb2c28..d41ced53 100755 --- a/application/views/Report_consolidate_year.php +++ b/application/views/Report_consolidate_year.php @@ -183,8 +183,8 @@ $(document).ready(function() { { extend: 'excelHtml5', footer: 'true', - messageTop: $('h3').text(), - title: 'REPORT-Consolidate Category-Wise', + //messageTop: $('h3').text(), + title: $('h3').text(), exportOptions: { columns: ':visible' diff --git a/application/views/Report_consolidate_year_inward.php b/application/views/Report_consolidate_year_inward.php index 441d881b..478e891b 100755 --- a/application/views/Report_consolidate_year_inward.php +++ b/application/views/Report_consolidate_year_inward.php @@ -79,7 +79,7 @@ if(!empty($mms)) - supplier_name;?> + supplier_name;?> material_name;?>