From 54c96e89e74dfd9fcbdd45e04e974823255e858e Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Wed, 9 Aug 2017 16:02:46 +0530 Subject: [PATCH] Sorting changed in table --- application/models/purchaseorder_model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 28694087..e1736fa0 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -56,7 +56,7 @@ class purchaseorder_model extends CI_Model join T_Employee_Details emp on emp.EmpID = mast.Requestedby join T_DepartmentDetails Dept on Dept.DEPCode = emp.Departmentcode join T_CostCenter_Master Cost on Cost.CostCenterCode=LineItem.CostCenterCode - where POMast.POType=? and ServiceWorkStatus=?'; + where POMast.POType=? and ServiceWorkStatus=? order by POMast.UpdatedOn desc'; $query = $this->db->query($subQuery,array(SERVICE,SERVICE_COMPLETED)); @@ -111,6 +111,7 @@ function purchaseorderListing($forwhat='') $this->db->where('POMast.Status !=',PO_AMENDED); // $this->db->order_by('POMast.Status !=',PO_AMENDED); } + $this->db->order_by('POMast.UpdatedOn','desc'); $query = $this->db->get(); //print_r( $this->db->last_query()); $result = $query->result();