ForgotPassword, Draft for other status issue fixed in PDF

This commit is contained in:
gandhimathi Bharathirajan 2017-08-16 22:40:18 +05:30
parent 67695758f1
commit 51f88c7ea1

View File

@ -60,17 +60,20 @@ class mrir_model extends CI_Model
} }
function ViewDistributionList() function ViewDistributionList()
{ {
$subQuery = 'select distinct MR.PONO,REQ.ReqNo,ReqLine.MaterialCode,MM.MaterialName,MM.UOM, $subQuery = 'select distinct POL.MaterialCode, MR.PONO,REQ.ReqNo,MM.MaterialName,MM.UOM,
EMP.FirstName,DD.DEPCode,DD.DepartmentName,ReqLine.Quantity as RequestedQty,POL.Quantity as OrderedQuantity EMP.FirstName,DD.DEPCode,DD.DepartmentName,ReqLine.Quantity as RequestedQty,POL.Quantity
,sum(MD.ActualQuantityReceived) as ActualReceivedqty,sum(MD.QuantityAccepted) as AcceptedQty,REQ.ReqDate,ReqLine.Status as ReqStatus,st.StatusName,ReqLine.Remarks from T_PurchaseOrder_LineItem POL left join T_Requestion_Details ReqLine on ReqLine.ReqNo = POL.ReqNo as OrderedQuantity ,sum(MD.ActualQuantityReceived) as ActualReceivedqty,sum(MD.QuantityAccepted) as
left join T_Requestion_Master REQ on REQ.ReqNo = ReqLine.ReqNo AcceptedQty,REQ.ReqDate,ReqLine.Status as ReqStatus,st.StatusName,ReqLine.Remarks
join T_MRIR_Master MR on MR.PONO = POL.PONO from T_PurchaseOrder_LineItem POL join T_Requestion_Details ReqLine on ReqLine.ReqNo = POL.ReqNo
join T_MRIR_Details MD on MD.MRIRNO = MR.MRIRNO join T_Requestion_Master REQ on REQ.ReqNo = ReqLine.ReqNo
left join T_MaterialMaster MM on MM.MaterialCode = ReqLine.MaterialCode join T_MRIR_Master MR on MR.PONO = POL.PONO join T_MRIR_Details MD
left join T_Employee_Details EMP on EMP.EmpID = REQ.Requestedby on MD.MRIRNO = MR.MRIRNO and POL.MaterialCode = MD.MaterialCode join T_MaterialMaster MM on
join T_Status st on st.StatusCode = ReqLine.Status MM.MaterialCode = POL.MaterialCode join
left join T_DepartmentDetails DD on DD.DEPCode = EMP.Departmentcode where POL.status=? group by MR.PONO'; T_Employee_Details EMP on EMP.EmpID = REQ.Requestedby join T_Status st on
$query = $this->db->query($subQuery,array(MRIR_APPROVED)); st.StatusCode = ReqLine.Status join T_DepartmentDetails DD on DD.DEPCode = EMP.Departmentcode where
POL.status=? and ReqLine.Status not in(?) group by POL.MaterialCode ,POL.PONO';
$query = $this->db->query($subQuery,array(MRIR_APPROVED,REQITEM_NEW));
//print_r($this->db->last_query());
return $query->result(); return $query->result();
} }
/* This function is used to list the MRIR value*/ /* This function is used to list the MRIR value*/