From 0182669da842be5809b8fb82d1780892d2594303 Mon Sep 17 00:00:00 2001 From: venbatechnologies Date: Tue, 12 Jun 2018 17:16:15 +0530 Subject: [PATCH] file alert msg --- .../controllers/emergencypurchaseorder.php | 67 ++++++++----------- .../views/EditservicePurchaseorder.php | 2 +- application/views/alterpurchaseorder.php | 6 +- .../views/editRevenuepurchaseorder.php | 45 +++++++------ 4 files changed, 55 insertions(+), 65 deletions(-) diff --git a/application/controllers/emergencypurchaseorder.php b/application/controllers/emergencypurchaseorder.php index 7becbf9f..e9ee66da 100755 --- a/application/controllers/emergencypurchaseorder.php +++ b/application/controllers/emergencypurchaseorder.php @@ -470,11 +470,11 @@ function add($pathname) if($POStatus==SPECIAL_PO){ $count = $this->input->post('hidecounters'); - $constant = $this->input->post('hideconstants'); + //$constant = $this->input->post('hideconstants'); - for($i=1;$i<=$constant;$i++){ + for($i=1;$i<=$count;$i++){ $pathname = 'browseFiles'.$i; if(!empty($_FILES[$pathname]['name'])) { @@ -482,22 +482,22 @@ function add($pathname) $Picture = $this->add($pathname); - $arr[] = array($Picture); + $arr[$i] = $Picture; } // } foreach($arr as $ma){ - - $index = 0; - foreach($ma as $key=>$value){ - $index++; - if($index == 1){ - $filename = $value; - } - } + $myfile = array('FilePath'=>$ma,'PONO'=>$PONO); + // $index = 0; + // foreach($ma as $key=>$value){ + // $index++; + // if($index == 1){ + // $filename = $value; + // } + // } } - $myfile = array('FilePath'=>$filename,'PONO'=>$PONO); + $this->purchaseorder_model->fileupload($myfile); @@ -975,22 +975,12 @@ $RequestedBy = $this->input->post('drpDepartment'); } $counts = $this->input->post('hidecounter'); - $constants = $this->input->post('hideconstant'); - -// if(empty($filename)) -// { -// // echo $IGRNO; -// // echo $PONO; - -// $myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO); -// // print_r($myfile); -// $this->purchaseorder_model->fileupload($myfile); - -// } -// else{ + //$constants = $this->input->post('hideconstant'); - for($i=1;$i<=$constants;$i++){ + + + for($i=1;$i<=$counts;$i++){ $pathname = 'browseFiles'.$i; @@ -1001,26 +991,25 @@ $RequestedBy = $this->input->post('drpDepartment'); $Picture = $this->addfile($pathname); //echo $Picture; - $arr[] = array($Picture); + $arr[$i] =$Picture; } - //} -//print_r($arr); + foreach($arr as $ma){ - - $index = 0; - $filename = null; - foreach($ma as $key=>$value){ - $index++; - if($index == 1){ - $filename = $value; - } - } + $myfile = array('FilePath'=>$ma,'PONO'=>$PONO,'IGRNO'=>$IGRNO); + // $index = 0; + // $filename = null; + // foreach($ma as $key=>$value){ + // $index++; + // if($index == 1){ + // $filename = $value; + // } + // } } - $myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO); + diff --git a/application/views/EditservicePurchaseorder.php b/application/views/EditservicePurchaseorder.php index eaeff3e7..18170e55 100755 --- a/application/views/EditservicePurchaseorder.php +++ b/application/views/EditservicePurchaseorder.php @@ -3846,7 +3846,7 @@ $("#addmorebutton").click(function(){ var bill = ; if(bill.length>=5){ - alert("No more files to add");//this allows only 5 files; + alert("Five files Only updated");//this allows only 5 files; return false; } else{ diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php index c6760c96..1fbea0e6 100755 --- a/application/views/alterpurchaseorder.php +++ b/application/views/alterpurchaseorder.php @@ -8715,7 +8715,7 @@ $("#addmorebutton").click(function(){ //alert('sda'); if(counter>4){ - alert("No more files to add");//this allows only 5 files; + alert("Five files Only updated");//this allows only 5 files; return false; } else{ @@ -8823,7 +8823,7 @@ $("#addemorebutton").click(function(){ //alert('sda'); if(counters>4){ - alert("No more files to add");//this allows only 5 files; + alert("Five files Only updated");//this allows only 5 files; return false; } else{ @@ -8910,7 +8910,7 @@ function removeRows(input) { counters --; $("#divid"+number).remove(); - $('#hidecounter').val(counters); + $('#hidecounters').val(counters); } } diff --git a/application/views/editRevenuepurchaseorder.php b/application/views/editRevenuepurchaseorder.php index aac4b9aa..3828cb3a 100644 --- a/application/views/editRevenuepurchaseorder.php +++ b/application/views/editRevenuepurchaseorder.php @@ -4021,27 +4021,7 @@ return tot;
-
- - - -
- - - - - -
- - - - - -
- - - -
+
@@ -4098,6 +4078,27 @@ return tot;
+
+ + + +
+ + + + + +
+ + + + + +
+ + + +
@@ -5774,7 +5775,7 @@ return tot; //alert(bill.length); if(bill.length>=5){ - alert("No more files to add");//this allows only 5 files; + alert("Five files Only updated");//this allows only 5 files; return false; } else{
Bill No