igrfiles
This commit is contained in:
parent
0dc3ca032d
commit
0fe29a960d
@ -694,7 +694,9 @@ $prefile =array();
|
||||
{
|
||||
$IGRNO= $this->input->post('id');
|
||||
$PO =$this->input->post('id1');
|
||||
$data = $this->inwardgateregister_model->viewIGRFile($IGRNO);
|
||||
$igrfile = $this->inwardgateregister_model->viewIGRFile($IGRNO);
|
||||
$billfile = $this->inwardgateregister_model->viewIGRFile1($IGRNO);
|
||||
$data = array_merge($igrfile,$billfile);
|
||||
echo json_encode($data);
|
||||
|
||||
}
|
||||
|
||||
@ -112,29 +112,28 @@ return $afftectedRows;
|
||||
|
||||
|
||||
|
||||
// function viewIGRFile($IGRNO)
|
||||
// {
|
||||
// $this->db->distinct();
|
||||
// $this->db->select('*'); //BillNo,IGRNO,FilePath,PONO
|
||||
// $this->db->from('T_Inwardgateregister_fileupload');
|
||||
// $this->db->where('IGRNO',$IGRNO);
|
||||
|
||||
// $query = $this->db->get();
|
||||
|
||||
// $result = $query->result();
|
||||
// // print_r($result);die;
|
||||
// //print_r($this->db->last_query());
|
||||
// return $result;
|
||||
|
||||
|
||||
|
||||
// }
|
||||
function viewIGRFile($IGRNO)
|
||||
function viewIGRFile($IGRNO)
|
||||
{
|
||||
$this->db->distinct();
|
||||
$this->db->select('igrm.file,igrf.*'); //BillNo,IGRNO,FilePath,PONO
|
||||
$this->db->select('*'); //BillNo,IGRNO,FilePath,PONO
|
||||
$this->db->from('T_Inwardgateregister_fileupload');
|
||||
$this->db->where('IGRNO',$IGRNO);
|
||||
|
||||
$query = $this->db->get();
|
||||
|
||||
$result = $query->result();
|
||||
|
||||
return $result;
|
||||
|
||||
|
||||
|
||||
}
|
||||
function viewIGRFile1($IGRNO)
|
||||
{
|
||||
$this->db->distinct();
|
||||
$this->db->select('igrm.file,igrm.PONO as pono'); //BillNo,IGRNO,FilePath,PONO
|
||||
$this->db->from('T_IGR_Master igrm');
|
||||
$this->db->join('T_Inwardgateregister_fileupload igrf','igrm.IGRNO = igrf.IGRNO','left');
|
||||
//$this->db->join('T_Inwardgateregister_fileupload igrf','igrm.IGRNO = igrf.IGRNO','left');
|
||||
//$this->db->join('T_IGR_Details igrd','igrm.IGRNO = igrd.IGRNO','left');
|
||||
|
||||
$this->db->where('igrm.IGRNO',$IGRNO);
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
else
|
||||
{?>
|
||||
<!-- echo "NO FILE"; -->
|
||||
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-userid="<?php echo $record->IGRNO.'-'.$record->PONO ?>"><button class="btn btn-info btn-sm " >Addfile</button></a>
|
||||
<a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Attachment Available for Download/View" data-userid="<?php echo $record->IGRNO.'-'.$record->PONO ?>"><i class="fa fa-pencil" style="text-align: center;"></i></a>
|
||||
<?php }
|
||||
?>
|
||||
|
||||
@ -178,6 +178,8 @@
|
||||
<div class="modal-footer">
|
||||
|
||||
<!-- <a class="btn btn-primary" data-dismiss="modal" id='editfileadd' value="">ADD</a> -->
|
||||
<br>
|
||||
</br>
|
||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -481,30 +483,38 @@ $("#hiddenPONO").val(po);
|
||||
var trHTML = '';
|
||||
var FilePath ='';
|
||||
var Filename = '';
|
||||
var PONO ='';
|
||||
var BillNO ='';
|
||||
$.each(JSON.parse(file), function (i, item)
|
||||
{
|
||||
if(item.file == null)
|
||||
{ if(item.Remarks ==null)
|
||||
{
|
||||
//alert()
|
||||
PONO =item.PONO;
|
||||
BillNO =item.BillNo;
|
||||
Filename =item.FilePath;
|
||||
FilePath = "<?php echo base_url()?>uploads/Igrfiles/"+item.FilePath;
|
||||
}else{
|
||||
Filename ="BillDetails";
|
||||
PONO =item.PONO;
|
||||
FilePath = item.FilePath;
|
||||
}
|
||||
|
||||
}else{
|
||||
Filename = item.file;
|
||||
PONO =item.pono;
|
||||
BillNO = '-';
|
||||
|
||||
FilePath =item.file;
|
||||
}
|
||||
if(item.BillNo != null)
|
||||
if(Filename != null)
|
||||
{
|
||||
i=i+1;
|
||||
trHTML += '<tr id='+i+'>' +
|
||||
'<td align="right">' + i + '</td>' +
|
||||
'<td id="billno'+i+'">' + item.BillNo+ '</td>' +
|
||||
'<td>' + item.PONO+ '</td>' +
|
||||
'<td id="billno'+i+'">' + BillNO+ '</td>' +
|
||||
'<td>' + PONO+ '</td>' +
|
||||
|
||||
'<td id="file'+i+'"><a target="_blank" href = '+FilePath+'>'+ Filename +'</a></td>' +
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user