banking file option

This commit is contained in:
gayathri1990 2018-10-25 17:42:03 +05:30
parent 2d1a0f813d
commit 25fcf64d0f
11 changed files with 8654 additions and 104 deletions

View File

@ -1017,10 +1017,9 @@ class cashbook extends BaseController
{
$igrno= $this->input->post('igrno');
$pono =$this->input->post('pono');
$igrsingle = $this->cashbook_model->igrmastersingle($igrno,$pono);
// $igrsingle = $this->cashbook_model->igrmastersingle($igrno,$pono);
$igrmultiple =$this->cashbook_model->igrmastermultiple($igrno,$pono);
$data = array_merge($igrsingle,$igrmultiple);
// print_r($data);
$data = array_merge($igrmultiple);
echo json_encode($data);

File diff suppressed because it is too large Load Diff

View File

@ -1046,7 +1046,7 @@ function receiptdata()
function igrmastermultiple($igrno,$pono)
{
$this->db->distinct();
$this->db->select('BillNo,IGRNO,FilePath,PONO,Remarks');
$this->db->select('BillNo,IGRNO,FilePath,PONO');
$this->db->from('T_Inwardgateregister_fileupload');
if(!empty($igrno) && !empty($pono)){
$this->db->where('PONO',$pono);
@ -1060,6 +1060,25 @@ function receiptdata()
$query = $this->db->get();
return $query->result();
}
function igrmastermultiple1($igrno,$pono)
{
$this->db->select('BillNo,IGRNO,FilePath,PONO');
$this->db->from('T_Inwardgateregister_fileupload');
// if(!empty($igrno) && !empty($pono)){
// $this->db->where('PONO',$pono);
$this->db->where('IGRNO',$igrno);
// }else if(!empty($pono)){
// $this->db->where('PONO',$pono);
// $this->db->where('IGRNO != ""');
// }else{
//$this->db->where('IGRNO',$IGRNO);
// }
$query = $this->db->get();
return $query->result();
}
function debitpolist($bankid)
{
@ -1456,7 +1475,8 @@ function receiptdata()
function paided($supplierid)
{
$this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.Totalpoamount,bm.Podate,
bm.Balancetopay,bm.Amountpaid,bm.IGRNO,bm.IGRLineItemNo,br.Balancetocleared,br.Clearbalance');
bm.Balancetopay,bm.Amountpaid,bm.IGRNO,bm.IGRLineItemNo,br.Balancetocleared,br.Clearbalance,
inward.FilePath as igrfile,bu.FilePath pofile');
$this->db->from ('T_Bankporeport bm');
$this->db->join('T_Inwardgateregister_fileupload inward','inward.IGRNO =bm.IGRNO','left');
$this->db->join('T_PurchaseOrder_BillUpload bu','bm.PONO=bu.PONO','left');

View File

@ -203,7 +203,7 @@ if(!empty($amountpaid))
<th>PONO</th>
<th>IGR NO</th>
<th>IGRItemNo</th>
<!--<th>Supplier Name</th>
<!--<th>Supplier Name</th>-->
<th>Total PO Amount (&#8377;)</th>
<!--<th>Advance PO Amount (&#8377;)</th>-->
<th>Balance To Pay (&#8377;)</th>
@ -238,7 +238,7 @@ if(!empty($amountpaid))
<input type="hidden" name="bankingid" id="bankingid<?php echo $i ?>" value="<?php echo $ap->mid; ?>"/>
<td align="left" id="date<?php echo $i ?>"><span><?php echo date_format(date_create($ap->Podate),'d-m-Y'); ?></span></td>
<td align="left" id="pono"><span><?php echo $ap->PONO?></span></td>
<td align="left" id="pono<?php echo $i ?>"><span><?php echo $ap->PONO?></span></td>
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
<td align="left" id="igrno<?php echo $i ?>"><span><?php echo $ap->IGRNO?></span></td>
<td align="left" id="igritemno<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $ap->IGRLineItemNo;?>"><span><?php echo $ap->IGRLineItemNo?></span></a></td>
@ -247,22 +247,28 @@ if(!empty($amountpaid))
<td align="left" id="btp<?php echo $i ?>"><span><?php echo $ap->Balancetopay?></span></td>
<td align="left" id="ap<?php echo $i ?>"><span><?php $tot_amount=$tot_amount+round($rate)?> <?php echo round($rate,2)?></span></td>
<?php
if($ap->file !='')
if($ap->igrfile !='')
{
?>
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrno(<?php echo $i ?>)"></i></a> </td>
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrfile(<?php echo $i ?>)"></i></a> </td>
<?php
}
else if($ap->Fpath !='')
else
{
?>
<td>N/A</td>
<?php
}
if($ap->pofile !='')
{
?>
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrno(<?php echo $i ?>)"></i></a> </td>
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="pofile(<?php echo $i ?>)"></i></a> </td>
<?php
@ -274,21 +280,7 @@ if(!empty($amountpaid))
<?php }
if($ap->FilePath=='')
{
?>
<td>N/A</td>
<?php
}
else
{
?>
<td>
<a data-toggle="tooltip" ><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> - Click here to Delete details" onclick="pono(<?php echo $i ?>)"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
<?php
}
?>
?>
<td>
<a data-toggle="tooltip" ><i class="fa fa-trash" data-toggle="tooltip" title="<?php echo $record->AdjustmentId; ?> - Click here to Delete details" onclick="podelete(<?php echo $i ?>)"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
@ -393,7 +385,81 @@ $.ajax({
});
}
function pono(i)
function igrfile(i)
{
var igrno=$('#igrno'+i).text();
var pono=$('#pono'+i).text();
$("#Fileshow").modal('show');
$.ajax(
{
data:{igrno:igrno,pono:pono},
type:"POST",
url:"<?php echo base_url()?>cashbook/IGRFilelist",
success:function(data)
{
var trHTML = '';
var FilePath ='';
var Filename = '';
var PONO ='';
var BillNO ='';
i=0;
$.each($.parseJSON(data),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;
BillNO =item.BillNo;
FilePath = item.FilePath;
}
}else{
Filename = item.file;
PONO =item.pono;
BillNO = '-';
FilePath ="<?php echo base_url()?>"+item.file;
}
if(Filename != null)
{
i=i+1;
i=i-1;
trHTML += '<tr id='+i+'>' +
'<td align="right">' + i + '</td>' +
'<td id="billno'+i+'">' + BillNO+ '</td>' +
'<td>' + PONO+ '</td>' +
'<td id="file'+i+'"><a target="_blank" href = '+FilePath+'>'+ Filename +'</a></td>' +
// '<td name="filepathname" id="filepathname" onclick="openbillmodel('+i+');"><i class="fa fa-pencil"></i></td>' +
'</tr>';
}
});
$("#tbleAppend1").empty();
$('#Inwardgateregistertable1 > tbody').append(trHTML);
}
});
}
function pofile(i)
{
var igrno=$('#igrno'+i).text();
var pono =$('#pono'+i).text();
@ -495,79 +561,7 @@ $( function() {
} );
function igrno(i)
{
var igrno=$('#igrno'+i).text();
var pono=$('#pono'+i).text();
$("#Fileshow").modal('show');
$.ajax(
{
data:{igrno:igrno,pono:pono},
type:"POST",
url:"<?php echo base_url()?>cashbook/IGRFilelist",
success:function(data)
{
var trHTML = '';
var FilePath ='';
var Filename = '';
var PONO ='';
var BillNO ='';
i=0;
$.each($.parseJSON(data),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;
BillNO =item.BillNo;
FilePath = item.FilePath;
}
}else{
Filename = item.file;
PONO =item.pono;
BillNO = '-';
FilePath ="<?php echo base_url()?>"+item.file;
}
if(Filename != null)
{
i=i+1;
i=i-1;
trHTML += '<tr id='+i+'>' +
'<td align="right">' + i + '</td>' +
'<td id="billno'+i+'">' + BillNO+ '</td>' +
'<td>' + PONO+ '</td>' +
'<td id="file'+i+'"><a target="_blank" href = '+FilePath+'>'+ Filename +'</a></td>' +
// '<td name="filepathname" id="filepathname" onclick="openbillmodel('+i+');"><i class="fa fa-pencil"></i></td>' +
'</tr>';
}
});
$("#tbleAppend1").empty();
$('#Inwardgateregistertable1 > tbody').append(trHTML);
}
});
}

View File

@ -273,7 +273,7 @@ foreach($financialyear as $item)
?>
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrno(<?php echo $i ?>)"></i></a> </td>
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrfile(<?php echo $i ?>)"></i></a> </td>
<?php
}
@ -283,7 +283,7 @@ foreach($financialyear as $item)
?>
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrno(<?php echo $i ?>)"></i></a> </td>
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="pofile(<?php echo $i ?>)"></i></a> </td>
<?php
@ -362,7 +362,7 @@ foreach($financialyear as $item)
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
function pono(i)
function pofile(i)
{
var igrno=$('#igrno'+i).text();
var pono =$('#pono'+i).text();
@ -402,7 +402,7 @@ foreach($financialyear as $item)
});
}
function igrno(i)
function igrfile(i)
{
var igrno=$('#igrno'+i).text();
var pono=$('#pono'+i).text();

View File

@ -202,7 +202,65 @@ foreach($financialyear as $item)
<?php } ?>
</table>
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook</b></p></h3></center>
<br>
<br>
<table class="table table-bordered table-hover" id="req1" style="table-layout:auto;">
<thead>
<tr>
<th>Supplier Name</th>
<th>Paid Amount (&#8377;)</th>
</tr>
</thead>
<tbody>
<?php
$tot_amount=0;
$ti=0.00;
$tvt=0.00;
if(!empty($bankdebitsupp)){
foreach($bankdebitsupp as $t)
{
$rate=$t->Amountpaid;
$supplierid=$t->SupplierID;
?>
<tr>
<td align="left" id="sn<?php echo $i ?>" ><a href="<?= base_url() ?>cashbook/amountpaid?sid=<?php echo $t->SupplierID;?>&sn=<?php echo $t->Suppliername ?>"><span><?php echo $t->Suppliername?></span></a></td>
<td align="left" id="tov<?php echo $i ?>" ><span><?php $tot_amount=$tot_amount+round($rate)?><?php echo round($rate,2)?></span></td>
</tr>
<?php
$i++;
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td class="amount"><strong>
<?php echo $tot_amount; ?>
</strong></td>
</tr>
</tfoot>
<?php } ?>
</table>
</div>
@ -213,6 +271,7 @@ foreach($financialyear as $item)
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
@ -284,6 +343,29 @@ foreach($financialyear as $item)
]
} );/** datatable closed */
} );/** ready closed */
$(document).ready(function() {
$.fn.dataTable.moment( 'DD-MM-YYYY' );
table = $('#req1').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'Unpaid Purchase Order Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );/** datatable closed */
} );
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

0
uploads/BillFiles/1.jpg → uploads/BillFiles/po.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

0
uploads/Igrfiles/1.jpg → uploads/Igrfiles/po.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 179 KiB