From d5878ff6325d03262a574927a96e5af41cd9e305 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 26 Apr 2018 11:32:46 +0530 Subject: [PATCH] ogr --- application/models/inwardgateregister_model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/models/inwardgateregister_model.php b/application/models/inwardgateregister_model.php index c28441ab..e4eb057f 100755 --- a/application/models/inwardgateregister_model.php +++ b/application/models/inwardgateregister_model.php @@ -422,12 +422,14 @@ class inwardgateregister_model extends CI_Model function getPO($supplierId) { + /// echo $supplierId; $subQuery='select T_PurchaseOrder_Master.PONO from T_PurchaseOrder_Master join T_MRIR_Master on T_MRIR_Master.PONO= T_PurchaseOrder_Master.PONO - where T_PurchaseOrder_Master.SupplierID=? and T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? group by T_PurchaseOrder_Master.PONO'; + where T_PurchaseOrder_Master.SupplierID=? and (T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=? or T_PurchaseOrder_Master.Status=?) group by T_PurchaseOrder_Master.PONO'; //$query= $this->db->query($subQuery, array($supplierId,ST044,PO,ST063)); $query= $this->db->query($subQuery, array($supplierId,ST044,PO,PO_RELEASED,IGR_CREATED,MRIR_CREATED,PARTIAL_MRIRAPPROVED,OGR_COMPLETE,OGR_PARTIAL_COMPLETE,OGR_CREATED)); + //print_r( $this->db->last_query()); return $query->result();