Distribution list issue fixed

This commit is contained in:
gandhimathi Bharathirajan 2017-08-18 16:17:08 +05:30
parent 26e7cd5420
commit 37cee8457d

View File

@ -68,14 +68,15 @@ function ViewDistributionList()
ReqLine.Remarks
from T_Requestion_Details ReqLine join T_PurchaseOrder_LineItem POL on ReqLine.ReqNo = POL.ReqNo
join T_Requestion_Master REQ on REQ.ReqNo = ReqLine.ReqNo
join T_PurchaseOrder_Master POMast on POMast.PONO=POL.PONO
join T_Status st on ReqLine.Status = st.StatusCode
join T_MRIR_Master MR on MR.PONO = POL.PONO join T_MRIR_Details MD
on MD.MRIRNO = MR.MRIRNO and ReqLine.MaterialCode = MD.MaterialCode join T_MaterialMaster MM on
MM.MaterialCode = ReqLine.MaterialCode join
T_Employee_Details EMP on EMP.EmpID = REQ.Requestedby join
T_DepartmentDetails DD on DD.DEPCode = EMP.Departmentcode where
POL.status in (?,?) and ReqLine.Status not in(?) group by ReqLine.MaterialCode ,POL.PONO';
$query = $this->db->query($subQuery,array(MRIR_APPROVED,PARTIAL_MRIRAPPROVED,REQITEM_NEW));
POL.status in (?,?) and ReqLine.Status not in(?) and POMast.status not in(?) group by ReqLine.MaterialCode ,POL.PONO';
$query = $this->db->query($subQuery,array(MRIR_APPROVED,PARTIAL_MRIRAPPROVED,REQITEM_NEW,PO_AMENDED));
//print_r($this->db->last_query());
return $query->result();
}
@ -94,7 +95,7 @@ function ViewDistributionList()
$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->join ('T_Status ST','ST.StatusCode = TMM.MRIRStatus');
$this->db->where('POM.status !=',PO_AMENDED);
$this->db->order_by ('TMM.MRIRNO','desc');
$query = $this->db->get();
return $query->result();