sia-Inward report issues fixes
This commit is contained in:
parent
200e9d06d7
commit
0505148606
@ -2473,7 +2473,7 @@ $sql.="group by doc_no,material_name,supplier_name";
|
||||
}
|
||||
function report_inwardcashbook($cname,$fa,$aa,$m,$frm,$t,$cat){
|
||||
|
||||
$sql="select tinex.account_code as AccountCode,date_format(tinex.date,'%d-%m-%Y') as Date,ac.name as AccountName,
|
||||
$sql="select tinex.account_code as AccountCode,date_format(tinex.date,'%d-%m-%Y') as Date,ac.name as AccountName,date_format(tinex.created_on,'%d-%m-%Y') as CreatedDate,
|
||||
tinex.type as type,tinex.cashtype as category ,tinex.merchant as merchantname,tinex.Supplier_id as Supplierid,sup.SupplierName as Suppliername, tinex.sgst as sgst,
|
||||
tinex.value_before_gst as Value,tinex.cgst as cgst,tinex.igst as igst,tinex.document as cashbookfile,
|
||||
tinex.total as Total
|
||||
@ -2488,17 +2488,17 @@ $sql.="group by doc_no,material_name,supplier_name";
|
||||
}
|
||||
|
||||
if ($fa and $aa != ''){
|
||||
$sql.=" and (tinex.created_on >= '".$fa."-04-01' and tinex.created_on <= '".$aa."-03-31')";
|
||||
$sql.=" and (tinex.date >= '".$fa."-04-01' and tinex.date <= '".$aa."-03-31')";
|
||||
}
|
||||
if ($m!= ''){
|
||||
$sql.="and monthname(tinex.created_on) = '".$m."'";
|
||||
$sql.="and monthname(tinex.date) = '".$m."'";
|
||||
}
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
|
||||
$sql.="and date(tinex.created_on) >= '".$fromd."'
|
||||
and date(tinex.created_on) <= '".$tod."'";
|
||||
$sql.="and date(tinex.date) >= '".$fromd."'
|
||||
and date(tinex.date) <= '".$tod."'";
|
||||
}
|
||||
if ($cat!= ''){
|
||||
$sql.=" and tinex.type = '".$cat."' ";
|
||||
|
||||
@ -1,49 +1,35 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#client_name").select2();
|
||||
$("#item_name").select2();
|
||||
|
||||
|
||||
});
|
||||
$("#item_name").select2();
|
||||
});
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
|
||||
|
||||
<style>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
.dataTables_filter {
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
@ -186,20 +172,17 @@ if(!empty($mms))
|
||||
|
||||
|
||||
</div>
|
||||
<!-- <div class="container"> -->
|
||||
|
||||
|
||||
<div class="modal fade" id="Fileshow" role="dialog">
|
||||
<div class="modal fade" id="Fileshow" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<form>
|
||||
<div class="modal-content" style="width:800px;">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Table to show the line item of po -->
|
||||
<div id="content" > </div>
|
||||
<table class="table table-bordered" id="Inwardgateregistertable1" style="font-size:12px;">
|
||||
<table class="table table-bordered" id="Inwardgateregistertable1" style="font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>SNo</th>
|
||||
@ -213,7 +196,7 @@ if(!empty($mms))
|
||||
<tbody id="tbleAppend1">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
@ -240,7 +223,6 @@ if(!empty($mms))
|
||||
<th style="text-align:center">Supplier Name</th>
|
||||
<th style="text-align:center">Total (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Attachments</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -248,7 +230,7 @@ if(!empty($mms))
|
||||
|
||||
$tot_tot = 0;
|
||||
|
||||
foreach($purchase as $rel)
|
||||
foreach($purchase as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
@ -265,27 +247,12 @@ if(!empty($mms))
|
||||
$tot_tot= $tot_tot + round($rel->total,2);
|
||||
echo $rel->total;
|
||||
?></span></td>
|
||||
<!-- <td style="text-align:center"><span>
|
||||
<?php
|
||||
if(!empty($rel->file)){ ?>
|
||||
<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $rel->file ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button>File Available</button></a>
|
||||
<?php }else if(!empty($rel->ifile)) { ?>
|
||||
<a target="_blank" href="<?php echo base_url().''. $rel->ifile ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button>File Available</button></a>
|
||||
<?php
|
||||
}else
|
||||
{
|
||||
echo 'N/A';
|
||||
}
|
||||
?>
|
||||
</span></td> -->
|
||||
|
||||
<td style="text-align:center"><span>
|
||||
|
||||
<td style="text-align:center"><span>
|
||||
<?php
|
||||
if(!empty($rel->file)){ ?>
|
||||
<a target="_blank" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm splpofile" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
|
||||
|
||||
<?php }else if(!empty($rel->ifile)) { ?>
|
||||
<?php }else if(!empty($rel->ifile)) { ?>
|
||||
<a target="_blank" href="<?php echo base_url().''. $rel->ifile ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm">Download</button></a>
|
||||
<?php
|
||||
}else {
|
||||
@ -302,30 +269,22 @@ if(!empty($mms))
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td class="amount" style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tot_tot,2,'.','');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
<td><strong> </strong></td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td class="amount" style="text-align:right">
|
||||
<strong><?php {
|
||||
echo number_format($tot_tot,2,'.','');
|
||||
}
|
||||
?></strong></td>
|
||||
<td><strong> </strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
@ -303,7 +303,7 @@ table.dataTable thead > tr > td.sorting {
|
||||
//$tot_inc = 0;
|
||||
$tot_tot = 0;
|
||||
if(!empty($purchase)){
|
||||
foreach($purchase as $rel)
|
||||
foreach($purchase as $key => $rel)
|
||||
{
|
||||
?>
|
||||
<tr id="lastvalue">
|
||||
@ -380,8 +380,7 @@ table.dataTable thead > tr > td.sorting {
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left"><span><?php echo $cb->AccountCode;?></span></td>
|
||||
<td style="text-align:center"><span><?php echo $cb->created_date;?></span></td>
|
||||
<!-- <td style="text-align:right"><span><?php echo $cb->created_time;?></span></td> -->
|
||||
<td style="text-align:center"><span><?php echo $cb->CreatedDate;?></span></td>
|
||||
<td style="text-align:right"><span><?php echo '-';?></span></td>
|
||||
<td style="text-align:center"><span><?php echo $cb->Date;?></span></td>
|
||||
<td><span><?php echo $cb->AccountName;?></span></td>
|
||||
@ -525,47 +524,37 @@ table.dataTable thead > tr > td.sorting {
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.splpofile').click(function() {
|
||||
var id = $(this).attr('id');
|
||||
$("#Fileshow").modal("show");
|
||||
$.ajax({
|
||||
$('.splpofile').click(function() {
|
||||
var id = $(this).attr('id');
|
||||
$("#Fileshow").modal("show");
|
||||
$.ajax({
|
||||
data:{id:id},
|
||||
type:"POST",
|
||||
//dataType: 'json',
|
||||
url:"<?php echo base_url() ?>report/Viewfiles",
|
||||
success: function(data){
|
||||
//console.log((data));
|
||||
|
||||
|
||||
var trHTML = '';
|
||||
|
||||
$.each($.parseJSON(data), function (i, item) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
i=i+1;
|
||||
trHTML += '<tr>' +
|
||||
'<td align="right">' + i + '</td>' +
|
||||
|
||||
'<td>' + item.BillNo+ '</td>' +
|
||||
'<td>' + item.PONO+ '</td>' +
|
||||
|
||||
'<td><a target="_blank" href = <?php echo base_url()?>uploads/BillFiles/'+item.FilePath+'>'+ item.FilePath +'</a></td>' +
|
||||
|
||||
// '<td>' +item.FilePath+"<?php echo base_url().'uploads/BillFiles/'?>"> +'</td>'
|
||||
|
||||
'</tr>';
|
||||
'<td align="right">' + i + '</td>' +
|
||||
'<td>' + item.BillNo+ '</td>' +
|
||||
'<td>' + item.PONO+ '</td>' +
|
||||
'<td><a target="_blank" href = <?php echo base_url()?>uploads/BillFiles/'+item.FilePath+'>'+ item.FilePath +'</a></td>' +
|
||||
'</tr>';
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$("#tbleAppend1").empty();
|
||||
$('#Inwardgateregistertable1 > tbody').append(trHTML);
|
||||
}
|
||||
});
|
||||
$("#tbleAppend1").empty();
|
||||
$('#Inwardgateregistertable1 > tbody').append(trHTML);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});//onclick function closed
|
||||
|
||||
/******************** Datatable codes starts here **************************/
|
||||
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||
table = $('#cc').DataTable( {
|
||||
|
||||
@ -595,6 +584,7 @@ $("#Fileshow").modal("show");
|
||||
]
|
||||
|
||||
} );
|
||||
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user