MRIR Issue Item

This commit is contained in:
gandhimathi Bharathirajan 2017-08-01 17:36:23 +05:30
parent 4b533db9e9
commit d926b897b4

View File

@ -61,15 +61,15 @@ function ViewDistributionList()
{
$subQuery = 'select distinct MR.PONO,REQ.ReqNo,ReqLine.MaterialCode,MM.MaterialName,MM.UOM,
EMP.FirstName,DD.DEPCode,DD.DepartmentName,ReqLine.Quantity as RequestedQty,POL.Quantity as OrderedQuantity
,sum(MD.ActualQuantityReceived) as ActualReceivedqty,sum(MD.QuantityAccepted) as AcceptedQty,REQ.ReqDate from T_PurchaseOrder_LineItem POL left join T_Requestion_Details ReqLine on ReqLine.ReqNo = POL.ReqNo
,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
left join T_Requestion_Master REQ on REQ.ReqNo = ReqLine.ReqNo
join T_MRIR_Master MR on MR.PONO = POL.PONO
join T_MRIR_Details MD on MD.MRIRNO = MR.MRIRNO
left join T_MaterialMaster MM on MM.MaterialCode = ReqLine.MaterialCode
left join T_Employee_Details EMP on EMP.EmpID = REQ.Requestedby
left join T_DepartmentDetails DD on DD.DEPCode = EMP.Departmentcode group by MR.PONO';
$query = $this->db->query($subQuery
);
join T_Status st on st.StatusCode = ReqLine.Status
left join T_DepartmentDetails DD on DD.DEPCode = EMP.Departmentcode where POL.status=? group by MR.PONO';
$query = $this->db->query($subQuery,array(MRIR_APPROVED));
return $query->result();
}
/* This function is used to list the MRIR value*/
@ -91,6 +91,14 @@ function ViewDistributionList()
return $query->result();
}
function getStatus()
{
$this->db->select('StatusCode,StatusName');
$this->db->from('T_Status');
$this->db->where('StatusType',8);
$query = $this->db->get();
return $query->result();
}
/* This function is used to list the MRIR value*/
function view_mrir_Billing()
{
@ -99,7 +107,7 @@ function ViewDistributionList()
$this->db->from ('T_MRIR_Master TMM');
$this->db->join ('T_MRIR_Details TMD','TMM.MRIRNO=TMD.MRIRNO');
$this->db->join ('T_IGR_Master IGRM','TMM.IGRNO=IGRM.IGRNO');
$this->db->join ('T_IGR_Details IGRD','IGRM.IGRNO=IGRD.IGRNO and IGRD.MaterialCode= TMD.MaterialCode');
$this->db->join ('T_IGR_Details IGRD','IGRM.IGRNO=IGRD.IGRNO');
$this->db->join ('T_PurchaseOrder_Master POM','POM.PONO=IGRM.PONO');
$this->db->join ('T_PurchaseOrder_LineItem POL','POL.PONO=POM.PONO');
$this->db->join('T_PurchaseOrder_AdvanceRequest PUADV','POM.PONO=PUADV.PONO','left');
@ -185,7 +193,10 @@ function ViewDistributionList()
}
function UpdateReqStatus()
{
}
/* This function is used to update the value in MRIR detail table*/
function update_mrirdetail($updatedetailvalues,$Lineitm)
{