Status Update view changes

This commit is contained in:
gandhimathi Bharathirajan 2017-07-24 21:50:27 +05:30
parent fcf29a9663
commit c23fa3aae2

View File

@ -4,10 +4,15 @@ class purchaseorder_model extends CI_Model
{
function GetServicePOListforStatusUpdate()
{
$this->db->select('*');
$this->db->from('T_PurchaseOrder_Master');
$this->db->where('POType',SERVICE);
$this->db->where('status',PO_RELEASED);
$this->db->distinct();
$this->db->select('PO.PONO');
$this->db->from('T_PurchaseOrder_Master PO');
$this->db->Join('T_PurchaseOrder_LineItem Line','PO.PONO = Line.PONO');
$this->db->Join('T_Requestion_Master Req','Req.ReqNo = Line.ReqNo');
$this->db->Join('T_Employee_Details Emp','Emp.EmpID= Req.Requestedby');
$this->db->where('PO.POType',SERVICE);
$this->db->where('PO.status',PO_RELEASED);
$this->db->where('Emp.Departmentcode',$this->session->userdata('DEPCode'));
$query = $this->db->get();
return $query->result();