diff --git a/application/controllers/inwardgateregister.php b/application/controllers/inwardgateregister.php index 4a440f76..6d57aea3 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,'OGR_Status'=>$POMStatus); + $POLineItem = array('ReceivedQuantity'=>$totalReceivedqty); $this->inwardgateregister_model->UpdatePOLineItem($POLineItem,$pono,$MaterialCode); diff --git a/application/models/inwardgateregister_model.php b/application/models/inwardgateregister_model.php index 28492877..6c6d2a0d 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,OGR_Status'); + $this->db->select('POM.PONO,POM.ServiceDescription,POM.DeliveryDate,sup.SupplierName,sup.Address,POM.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 7920eb19..13d547cc 100755 --- a/application/views/inwardgateregister.php +++ b/application/views/inwardgateregister.php @@ -493,7 +493,7 @@ $('').attr({ }); - if((status == '' || status == '' || status == '') && ostatus != '' ) + if((status == '' || status == '' || status == '')) { alert('The Order is completed!!'); $("#IGRLink").hide();