From 00666a78e470bcda1a90556596662eb80940ed5f Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 13 Apr 2018 18:37:49 +0530 Subject: [PATCH] ogr --- .../controllers/inwardgateregister.php | 2 +- .../models/inwardgateregister_model.php | 16 ++++---- application/views/inwardgateregister.php | 38 +++++++++++-------- 3 files changed, 31 insertions(+), 25 deletions(-) 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"));
- + @@ -574,6 +574,7 @@ function isNumberKey(evt) return true; } + function Save() { //alert("save function worked "); @@ -614,30 +615,35 @@ function Save() $('#IGR').submit(); }//validate if closed }//save function closed + + + function filecheck() { var myfile = $('#myfile').val(); if(myfile=='') { - alert('File not Found'); - Save(); + alert('File not Found'); + Save(); } - -} -function filealert() -{ - var sizef = document.getElementById('myfile').files[0].size; - var myfile = $('#myfile').val(); - if(myfile!='' && sizef < 2100000) - { - alert('Your file added successfully'); - } - else { - alert('Sorry Your File is Large To 2MB'); - $('#myfile').val(''); + var sizef = document.getElementById('myfile').files[0].size; + var myfile = $('#myfile').val(); + if(myfile!='' && sizef < 2100000) + { + alert('Your file added successfully'); + Save(); + } + else + { + alert('Sorry Your File is Large To 2MB'); + $('#myfile').val(''); + } + } + } + \ No newline at end of file