165 lines
5.8 KiB
PHP
Executable File
165 lines
5.8 KiB
PHP
Executable File
<?php//print_r($list); ?>
|
|
|
|
<div class="content-wrapper" style="min-height: 537px;">
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<h1>
|
|
<center> Resico Industries - Receipt and Payment List </center>
|
|
</h1>
|
|
</section>
|
|
|
|
<section class="content">
|
|
<div class="box">
|
|
<div class="box-header">
|
|
<div align="right" style="padding-right:10px">
|
|
<a href="<?php echo base_url(); ?>cashbook/addNewIncomeExpenseLoad" class="btn btn-primary" align="right"style="padding-right:10px" >Add New</a>
|
|
<!-- <a href="<?php echo base_url(); ?>addNewIncomeExpenseLoad" class="btn btn-primary" align="right"style="padding-right:10px" >Add New</a> -->
|
|
</div>
|
|
</div>
|
|
<table id="inexlist" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
|
<div align="right" style="padding-right:10px">
|
|
<div id="content" > </div>
|
|
<div class="modal fade" role="dialog">
|
|
|
|
<thead style="background-color:#ddf">
|
|
<tr>
|
|
<th>Account Type</th>
|
|
<th>DATE</th>
|
|
<th>Account Name</th>
|
|
<th>Amount(₹)</th>
|
|
<th>Details</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="inexlistbody">
|
|
|
|
<?php if(!empty($list))
|
|
{
|
|
$base = base_url();
|
|
foreach($list as $l)
|
|
{
|
|
?>
|
|
|
|
<tr>
|
|
<td><?php echo '<a href="'.$base.'cashbook/incomeExpenseList/'.$l->id.'">'.$l->type.'</a>';?></td>
|
|
<td style="text-align:right;"><?php echo date_format(date_create($l->date),'d-m-Y');?></td>
|
|
<td><?php if($l->type == 'PAYMENT' && $l->account_code == '999') { echo $l->description; } else {echo $l->name;}?></td>
|
|
<td style="text-align:right;"><?php echo $l->total;?></td>
|
|
<td><?php echo $l->description;?></td>
|
|
<td>
|
|
<a href="<?php echo base_url(); ?>cashbook/editcashbook?sid=<?php echo $l->id;?>"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the RECEIPT OR PAYMENT"></i> </a>
|
|
<!-- <span data-toggle="modal" data-target="#myModal" data-id="<?php echo $l->id; ?>" >
|
|
<a data-toggle="tooltip" title="Click here to view multiple payment details"><i class="fa fa-clone"></i></a></span> -->
|
|
<?php if($l->type == 'PAYMENT' && $l->account_code == '999') { ?>
|
|
<span data-toggle="tooltip" title="Click here to view multiple payment details">
|
|
<a data-toggle="modal" onclick="inex(<?php echo $l->id; ?>)" data-id="<?php echo $l->id; ?>"><i class="fa fa-clone"></i></a></span>
|
|
<?php } ?>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
|
|
</tbody>
|
|
</div>
|
|
</div>
|
|
</table>
|
|
|
|
<!-- Modal -->
|
|
<div id="myModal" class="modal fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">Multiple Payment List</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div>
|
|
<table class="table table-bordered table-hover" id="paymentdetails">
|
|
<thead>
|
|
<th>Account Type</th>
|
|
<th>Account Name</th>
|
|
<th>Sub Description</th>
|
|
<th>Amount(₹)</th>
|
|
<th>Tax value(₹)(sgst+cgst+igst)</th>
|
|
<th>Total amount(₹)</th>
|
|
</thead>
|
|
<tbody id="tbleAppend"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer" style="background-color: #5d0411;">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<br>
|
|
<!-- </div>
|
|
</div> -->
|
|
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
$(function () {
|
|
|
|
|
|
$('#inexlist').DataTable({
|
|
"paging": true,
|
|
"lengthChange": true,
|
|
"searching": true,
|
|
"aaSorting": [[ 0, "desc" ]],
|
|
"ordering": true,
|
|
"info": true,
|
|
"autoWidth": true
|
|
|
|
});
|
|
});
|
|
|
|
function inex(input){
|
|
|
|
$.ajax({
|
|
data:{id:input},
|
|
type:"POST",
|
|
//dataType: 'json',
|
|
url:"<?php echo base_url() ?>cashbook/ViewPaymentDetails",
|
|
success:function(data) {
|
|
$('#myModal').modal('show');
|
|
var trHTML = '';
|
|
|
|
$.each(JSON.parse(data), function (i, item) {
|
|
if(input == item.Payment_id)
|
|
{
|
|
var tax = (+item.sgst+ +item.cgst+ +item.igst);
|
|
|
|
trHTML += '<tr>' +
|
|
'<td>' + item.type + '</td>' +
|
|
'<td>' + item.name + '</td>' +
|
|
'<td align="right" >' + item.Account_description + '</td>' +
|
|
'<td>'+ item.Amount+ '</td>' +
|
|
'<td align="right" >'+ tax +'</td>' +
|
|
'<td align="right" >'+item.total+'</td>' +
|
|
'</tr>';
|
|
|
|
}
|
|
|
|
});
|
|
$("#tbleAppend").empty();
|
|
$('#paymentdetails > tbody').append(trHTML);
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|