diff --git a/application/controllers/inwardgateregister.php b/application/controllers/inwardgateregister.php index 6d57aea3..4a440f76 100644 --- a/application/controllers/inwardgateregister.php +++ b/application/controllers/inwardgateregister.php @@ -495,7 +495,7 @@ class inwardgateregister extends BaseController $totalReceivedqty = $ReceivedQuantity - $Outwardtotal; $POMStatus=OGR_CREATED; - $POLineItem = array('ReceivedQuantity'=>$totalReceivedqty); + $POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'OGR_Status'=>$POMStatus); $this->inwardgateregister_model->UpdatePOLineItem($POLineItem,$pono,$MaterialCode); diff --git a/application/models/inwardgateregister_model.php b/application/models/inwardgateregister_model.php index 6c6d2a0d..28492877 100755 --- a/application/models/inwardgateregister_model.php +++ b/application/models/inwardgateregister_model.php @@ -34,17 +34,17 @@ class inwardgateregister_model extends CI_Model function getpurchaseorder() { $this->db->distinct(); - $this->db->select('POM.PONO,POM.ServiceDescription,POM.DeliveryDate,sup.SupplierName,sup.Address,POM.status'); + $this->db->select('POM.PONO,POM.ServiceDescription,POM.DeliveryDate,sup.SupplierName,sup.Address,POM.status,OGR_Status'); $this->db->from('T_PurchaseOrder_Master POM'); - $this->db->join('T_PurchaseOrder_LineItem POL', 'POL.PONO = POM.PONO'); + $this->db->join('T_PurchaseOrder_LineItem POL', 'POL.PONO = POM.PONO'); $this->db->join('T_SupplierDetailsN sup', 'POM.SupplierID = sup.SupplierID'); $this->db->join('T_OGR_Master OGM ', 'POM.PONO = OGM.PONO_INV','left'); - $this->db->where('POM.Status',PO_RELEASED); - $this->db->where('POM.POType !=',SERVICE); - $this->db->or_where('POM.Status',IGR_CREATED); - $this->db->or_where('POM.Status',MRIR_CREATED); - $this->db->or_where('POM.Status',MRIR_APPROVED); - $this->db->or_where('POM.Status',OGR_COMPLETE); + $this->db->where('POM.Status',PO_RELEASED); + $this->db->where('POM.POType !=',SERVICE); + $this->db->or_where('POM.Status',IGR_CREATED); + $this->db->or_where('POM.Status',MRIR_CREATED); + $this->db->or_where('POM.Status',MRIR_APPROVED); + $this->db->or_where('POM.Status',OGR_COMPLETE); $query = $this->db->get(); $result = $query->result(); diff --git a/application/views/inwardgateregister.php b/application/views/inwardgateregister.php index 13d547cc..6324a297 100755 --- a/application/views/inwardgateregister.php +++ b/application/views/inwardgateregister.php @@ -142,7 +142,7 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));