diff --git a/application/controllers/emergencypurchaseorder.php b/application/controllers/emergencypurchaseorder.php index c66f5630..323c9a2c 100755 --- a/application/controllers/emergencypurchaseorder.php +++ b/application/controllers/emergencypurchaseorder.php @@ -473,6 +473,7 @@ function add($pathname) $constant = $this->input->post('hideconstants'); +$arr = []; for($i=1;$i<=$constant;$i++){ $pathname = 'browseFiles'.$i; @@ -486,6 +487,8 @@ function add($pathname) } } //print_r($arr); + if(!empty($arr)) + { foreach($arr as $ma){ @@ -496,7 +499,7 @@ function add($pathname) $filename = $value; } } - + $myfile = array('FilePath'=>$filename,'PONO'=>$PONO); $this->purchaseorder_model->fileupload($myfile); @@ -504,7 +507,7 @@ $myfile = array('FilePath'=>$filename,'PONO'=>$PONO); } - + } } @@ -981,7 +984,7 @@ $RequestedBy = $this->input->post('drpDepartment'); $constants = $this->input->post('hideconstant'); - +$arr = []; for($i=1;$i<=$constants;$i++){ $pathname = 'browseFiles'.$i; @@ -998,6 +1001,9 @@ $RequestedBy = $this->input->post('drpDepartment'); } //print_r($arr); + + if(!empty($arr)) + { foreach($arr as $ma){ @@ -1023,7 +1029,8 @@ $RequestedBy = $this->input->post('drpDepartment'); } - } + } +} diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 40d8521d..fa3d3290 100644 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -4173,6 +4173,7 @@ function addloadfile() $Picture =''; } //echo $Picture;die; + $filelist =array('PONO'=>$pono,'IGRNO'=>$igr,'FilePath'=>$Picture); diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 02213059..537ee0ab 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -914,11 +914,12 @@ function GetPOType($ReqNo) function GetServicePurchaseOrder($PONO = '') { $this->db->distinct(); - $this->db->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*,POMast.TotalOrderValue,POMast.BudgetType'); + $this->db->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*,POMast.TotalOrderValue,POMast.BudgetType,IGR.IGRNO'); $this->db->from('T_PurchaseOrder_Master POMast'); $this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID'); $this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status'); $this->db->join('T_PurchaseOrder_LineItem LineItem', 'POMast.PONO = LineItem.PONO'); + $this->db->join('T_IGR_Master IGR','POMast.PONO = IGR.PONO'); $this->db->where('POMast.PONO', $PONO); $query = $this->db->get(); diff --git a/application/models/user_model.php b/application/models/user_model.php index 64a5260b..324c58c5 100755 --- a/application/models/user_model.php +++ b/application/models/user_model.php @@ -3,7 +3,7 @@ class User_model extends CI_Model { - + /** * This function is used to get the user listing count * @param string $searchText : This is optional search text diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php index 854a0098..06357708 100755 --- a/application/views/alterpurchaseorder.php +++ b/application/views/alterpurchaseorder.php @@ -8712,6 +8712,9 @@ var counterConstant = 0; $("#addmorebutton").click(function(){ + + + //alert('sda'); if(counter>4){ @@ -8726,7 +8729,7 @@ else{ var div = document.createElement('div'); div.id = "divid"+counterConstant; div.className="row"; -div.innerHTML='