From 83eb7301449afd68a3f34910a5690a8a3f721b2f Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Tue, 14 Nov 2017 13:45:08 +0530 Subject: [PATCH] Serial Number issue fixed --- application/models/purchaseorder_model.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 0677f516..bc3bb205 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -1637,12 +1637,16 @@ left join T_Employee_Details emp on Req.Requestedby = emp.EmpID //get service tax listusing po number function GetServiceTaxDetails($PONO = ''){ - $taxQuery ='SELECT @count:=@count+1 serial_number,group_concat(@count ORDER BY @count ASC) as Itemcode,st.CGST,st.SGST,st.IGST,st.otherallowance FROM T_Service_Tax st + $taxQuery ='SELECT group_concat(@count:=@count+1) Itemcode, +st.CGST,st.SGST,st.IGST,st.otherallowance FROM T_Service_Tax st join T_PurchaseOrder_LineItem pl on pl.LineItemNo=st.LineItemNo - join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO - JOIN (SELECT @count := 0) count - where pm.POType=? and pm.PONO=? - group by st.CGST,st.SGST,st.IGST,st.otherallowance ORDER BY st.LineItemNo ASC'; + join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO JOIN + (SELECT @count := 0) count + where pm.POType=? and pm.PONO=? + group by st.CGST,st.SGST,st.IGST,st.otherallowance + ORDER BY Itemcode ASC '; + + $query = $this->db->query($taxQuery,array("SERVICE",$PONO)); return $query->result();