From 6ffa08ee37b2ee23280fe3a930bd6d1d88b079a0 Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Wed, 9 Aug 2017 14:42:08 +0530 Subject: [PATCH] Sorting changed in table --- application/models/mrir_model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/models/mrir_model.php b/application/models/mrir_model.php index 5b4ab303..5bfe003d 100755 --- a/application/models/mrir_model.php +++ b/application/models/mrir_model.php @@ -30,6 +30,7 @@ class mrir_model extends CI_Model $this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO'); $this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID'); $this->db->where('igr.IGRStatus !=',MRIR_CREATED); + $this->db->order_by("CreatedDate","desc"); $query = $this->db->get(); $result = $query->result(); @@ -86,7 +87,7 @@ function ViewDistributionList() $this->db->join ('T_Employee_Details ED','ED.EmpID = user.EmpID','left'); $this->db->join ('tbl_users user1','user1.userid = POM.CreatedBy','left'); $this->db->join ('T_Employee_Details ED1','ED1.EmpID = user1.EmpID','left'); - $this->db->order_by ('TMM.MRIRNO','asc'); + $this->db->order_by ('TMM.MRIRNO','desc'); $query = $this->db->get(); return $query->result(); @@ -123,7 +124,7 @@ TMD.QuantityRejected,ST.StatusName,TMD.Remarks,AdvanceAmount '); $this->db->join ('T_MaterialMaster MM','MM.MaterialCode = IGRD.MaterialCode and POL.MaterialCode = MM.MaterialCode'); $this->db->join ('T_Status ST','ST.StatusCode = TMD.MRIRStatus'); $this->db->where('TMM.MRIRStatus',MRIR_APPROVED); - $this->db->order_by('TMM.MRIRNO','asc'); + $this->db->order_by('TMM.UpdatedOn','desc'); $query = $this->db->get(); //print_r($this->db->last_query()); return $query->result();