igr
This commit is contained in:
parent
5c210411dc
commit
271b049d97
@ -250,29 +250,33 @@ class inwardgateregister extends BaseController
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$config['upload_path'] = 'uploads/Igrfiles/';
|
||||
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
||||
$config['allowed_types'] = '*';
|
||||
$config['file_name'] = str_replace(" ","",$_FILES['file']['name']);
|
||||
// print_r($config);die;
|
||||
//print_r($config);die;
|
||||
//Load upload library and initialize configuration
|
||||
$this->load->library('upload',$config);
|
||||
$this->upload->initialize($config);
|
||||
|
||||
$this->load->library('upload',$config);
|
||||
$this->upload->initialize($config);
|
||||
|
||||
if($this->upload->do_upload('file'))
|
||||
{
|
||||
echo "uploadif";
|
||||
$uploadData = $this->upload->data();
|
||||
$picture = $uploadData['file_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
$picture = '';
|
||||
}
|
||||
|
||||
if($this->upload->do_upload('file'))
|
||||
{
|
||||
$uploadData = $this->upload->data();
|
||||
$picture = $uploadData['file_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
$picture = '';
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$picture = '';
|
||||
}
|
||||
|
||||
|
||||
return $picture ;
|
||||
}
|
||||
@ -280,17 +284,21 @@ class inwardgateregister extends BaseController
|
||||
|
||||
function addloadfile()
|
||||
{
|
||||
|
||||
$upfiles = '';
|
||||
$pono= $this->input->post('PONO');
|
||||
|
||||
$igr= $this->input->post('igr');
|
||||
|
||||
//print_r($igr);
|
||||
$new_file_name =$_FILES['file']['name'];
|
||||
|
||||
$new_file_name = str_replace(" ","",$new_file_name);
|
||||
|
||||
// print_r($new_file_name);
|
||||
|
||||
$files = $this->inwardgateregister_model->getfies($igr);
|
||||
|
||||
//print_r($files);
|
||||
|
||||
$fcount = 0;
|
||||
|
||||
@ -302,9 +310,12 @@ $fcount = 0;
|
||||
|
||||
if($lastfile == $new_file_name)
|
||||
{
|
||||
//echo 'eqal';
|
||||
|
||||
//echo 'cm'.$fcount;
|
||||
$fcount ++;
|
||||
|
||||
|
||||
//echo 'cp'.$fcount;
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,11 +323,15 @@ $fcount = 0;
|
||||
|
||||
if($fcount == 0)
|
||||
{
|
||||
|
||||
//echo 'if'.$fcount;
|
||||
|
||||
if(!empty($new_file_name))
|
||||
{ $Picture = $this->adfile();
|
||||
{
|
||||
$Picture = $this->adfile();
|
||||
|
||||
// print_r($Picture); die;
|
||||
$myfiles =array('PONO'=>$pono,'IGRNO'=>$igr,'FilePath'=>$Picture);
|
||||
// print_r($myfiles);
|
||||
|
||||
$upfiles = $this->inwardgateregister_model->fileupload($myfiles);
|
||||
//print_r($upfiles);
|
||||
}
|
||||
|
||||
@ -4250,7 +4250,7 @@ $fcount = 0;
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$config['upload_path'] = 'uploads/BillFiles/';
|
||||
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
||||
$config['allowed_types'] = '*';
|
||||
$config['file_name'] = str_replace(" ","",$_FILES['file']['name']);
|
||||
// print_r($config);die;
|
||||
//Load upload library and initialize configuration
|
||||
@ -4372,7 +4372,7 @@ function uploadfile()
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$config['upload_path'] = 'uploads/BillFiles/';
|
||||
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
||||
$config['allowed_types'] = '*';
|
||||
//$config['file_name'] = $_FILES['file']['name'];
|
||||
$config['file_name'] = str_replace(" ","",$_FILES['file']['name']);
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ return $afftectedRows;
|
||||
$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',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);
|
||||
|
||||
@ -690,7 +690,7 @@ counter++;
|
||||
// '</div>'+
|
||||
'<div class="col-md-3">'+
|
||||
'<label><br></label>'+
|
||||
'<input type="file" name="browseFiles" id="images'+counter+'" onchange="Copyfilename(this.name); "><br>'+
|
||||
'<input type="file" name="browseFiles" id="images'+counter+'" ><br>'+
|
||||
'</div>'+
|
||||
// '<div class="col-md-3">'
|
||||
// '<label><br><br></label>'+
|
||||
|
||||
Loading…
Reference in New Issue
Block a user