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){
|
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.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.value_before_gst as Value,tinex.cgst as cgst,tinex.igst as igst,tinex.document as cashbookfile,
|
||||||
tinex.total as Total
|
tinex.total as Total
|
||||||
@ -2488,17 +2488,17 @@ $sql.="group by doc_no,material_name,supplier_name";
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($fa and $aa != ''){
|
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!= ''){
|
if ($m!= ''){
|
||||||
$sql.="and monthname(tinex.created_on) = '".$m."'";
|
$sql.="and monthname(tinex.date) = '".$m."'";
|
||||||
}
|
}
|
||||||
if ($frm and $t != ''){
|
if ($frm and $t != ''){
|
||||||
$fromd= date("Y-m-d",strtotime($frm));
|
$fromd= date("Y-m-d",strtotime($frm));
|
||||||
$tod=date("Y-m-d",strtotime($t));
|
$tod=date("Y-m-d",strtotime($t));
|
||||||
|
|
||||||
$sql.="and date(tinex.created_on) >= '".$fromd."'
|
$sql.="and date(tinex.date) >= '".$fromd."'
|
||||||
and date(tinex.created_on) <= '".$tod."'";
|
and date(tinex.date) <= '".$tod."'";
|
||||||
}
|
}
|
||||||
if ($cat!= ''){
|
if ($cat!= ''){
|
||||||
$sql.=" and tinex.type = '".$cat."' ";
|
$sql.=" and tinex.type = '".$cat."' ";
|
||||||
|
|||||||
@ -1,25 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if(!empty($mms))
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
$("#client_name").select2();
|
$("#client_name").select2();
|
||||||
$("#item_name").select2();
|
$("#item_name").select2();
|
||||||
|
});
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||||
|
<style>
|
||||||
|
|
||||||
<style>
|
|
||||||
.dataTables_filter input {padding: 4px;}
|
.dataTables_filter input {padding: 4px;}
|
||||||
.dataTables_filter {
|
.dataTables_filter {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
@ -41,9 +28,8 @@ if(!empty($mms))
|
|||||||
border-color: #3c8dbc;
|
border-color: #3c8dbc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
</style>
|
<div class="content-wrapper">
|
||||||
<div class="content-wrapper">
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="row" style="min-height: 600px;">
|
<div class="row" style="min-height: 600px;">
|
||||||
<!-- Left col -->
|
<!-- Left col -->
|
||||||
@ -186,17 +172,14 @@ if(!empty($mms))
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="container"> -->
|
|
||||||
|
|
||||||
<div class="modal fade" id="Fileshow" role="dialog">
|
|
||||||
|
<div class="modal fade" id="Fileshow" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
<form>
|
<form>
|
||||||
<div class="modal-content" style="width:800px;">
|
<div class="modal-content" style="width:800px;">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Table to show the line item of po -->
|
<!-- Table to show the line item of po -->
|
||||||
<div id="content" > </div>
|
<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;">
|
||||||
@ -240,7 +223,6 @@ if(!empty($mms))
|
|||||||
<th style="text-align:center">Supplier Name</th>
|
<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">Total (<i class="fa fa-rupee "></i>)</th>
|
||||||
<th style="text-align:center">Attachments</th>
|
<th style="text-align:center">Attachments</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -265,26 +247,11 @@ if(!empty($mms))
|
|||||||
$tot_tot= $tot_tot + round($rel->total,2);
|
$tot_tot= $tot_tot + round($rel->total,2);
|
||||||
echo $rel->total;
|
echo $rel->total;
|
||||||
?></span></td>
|
?></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
|
<?php
|
||||||
if(!empty($rel->file)){ ?>
|
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>
|
<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>
|
<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
|
<?php
|
||||||
@ -307,20 +274,12 @@ if(!empty($mms))
|
|||||||
<td><strong> </strong></td>
|
<td><strong> </strong></td>
|
||||||
<td><strong> </strong></td>
|
<td><strong> </strong></td>
|
||||||
<td class="amount" style="text-align:right">
|
<td class="amount" style="text-align:right">
|
||||||
<strong>
|
<strong><?php {
|
||||||
<?php
|
|
||||||
{
|
|
||||||
echo number_format($tot_tot,2,'.','');
|
echo number_format($tot_tot,2,'.','');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
?></strong></td>
|
||||||
?>
|
|
||||||
</strong></td>
|
|
||||||
<td><strong> </strong></td>
|
<td><strong> </strong></td>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tfoot>
|
</tfoot>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@ -303,7 +303,7 @@ table.dataTable thead > tr > td.sorting {
|
|||||||
//$tot_inc = 0;
|
//$tot_inc = 0;
|
||||||
$tot_tot = 0;
|
$tot_tot = 0;
|
||||||
if(!empty($purchase)){
|
if(!empty($purchase)){
|
||||||
foreach($purchase as $rel)
|
foreach($purchase as $key => $rel)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<tr id="lastvalue">
|
<tr id="lastvalue">
|
||||||
@ -380,8 +380,7 @@ table.dataTable thead > tr > td.sorting {
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:left"><span><?php echo $cb->AccountCode;?></span></td>
|
<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:center"><span><?php echo $cb->CreatedDate;?></span></td>
|
||||||
<!-- <td style="text-align:right"><span><?php echo $cb->created_time;?></span></td> -->
|
|
||||||
<td style="text-align:right"><span><?php echo '-';?></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 style="text-align:center"><span><?php echo $cb->Date;?></span></td>
|
||||||
<td><span><?php echo $cb->AccountName;?></span></td>
|
<td><span><?php echo $cb->AccountName;?></span></td>
|
||||||
@ -525,47 +524,37 @@ table.dataTable thead > tr > td.sorting {
|
|||||||
// Set up your table
|
// Set up your table
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$('.splpofile').click(function() {
|
$('.splpofile').click(function() {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
$("#Fileshow").modal("show");
|
$("#Fileshow").modal("show");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id:id},
|
data:{id:id},
|
||||||
type:"POST",
|
type:"POST",
|
||||||
//dataType: 'json',
|
|
||||||
url:"<?php echo base_url() ?>report/Viewfiles",
|
url:"<?php echo base_url() ?>report/Viewfiles",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
//console.log((data));
|
|
||||||
|
|
||||||
var trHTML = '';
|
var trHTML = '';
|
||||||
|
|
||||||
$.each($.parseJSON(data), function (i, item) {
|
$.each($.parseJSON(data), function (i, item) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
i=i+1;
|
i=i+1;
|
||||||
trHTML += '<tr>' +
|
trHTML += '<tr>' +
|
||||||
'<td align="right">' + i + '</td>' +
|
'<td align="right">' + i + '</td>' +
|
||||||
|
|
||||||
'<td>' + item.BillNo+ '</td>' +
|
'<td>' + item.BillNo+ '</td>' +
|
||||||
'<td>' + item.PONO+ '</td>' +
|
'<td>' + item.PONO+ '</td>' +
|
||||||
|
|
||||||
'<td><a target="_blank" href = <?php echo base_url()?>uploads/BillFiles/'+item.FilePath+'>'+ item.FilePath +'</a></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>';
|
'</tr>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#tbleAppend1").empty();
|
$("#tbleAppend1").empty();
|
||||||
$('#Inwardgateregistertable1 > tbody').append(trHTML);
|
$('#Inwardgateregistertable1 > tbody').append(trHTML);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});//onclick function closed
|
||||||
|
|
||||||
|
/******************** Datatable codes starts here **************************/
|
||||||
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||||
table = $('#cc').DataTable( {
|
table = $('#cc').DataTable( {
|
||||||
|
|
||||||
@ -595,6 +584,7 @@ $("#Fileshow").modal("show");
|
|||||||
]
|
]
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
} );
|
} );
|
||||||
$('#mySelect').on('change',function(){
|
$('#mySelect').on('change',function(){
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user