ok

Mini Shell

Direktori : /home2/selectio/www/lilyexpresslive/software/admin/
Upload File :
Current File : /home2/selectio/www/lilyexpresslive/software/admin/day-wise-report.php

<?php require_once('header.php'); 
$old_date = date('Y-m-d', strtotime("0 days")); /*Change the date for past days selection*/
$today=date('Y-m-d');           

?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript" language="javascript" >
	$(document).ready(function() {
		     function getData(){
			    var from=  $('#from').val();     
                var to=  $('#to').val();   
                var role=  $('#role').val();   
                var role_id= $('#client_id').val();
                var set_status= $('#set_status').val();
                 $('#fromm').val(from);
                $('#too').val(to);
                 $('#role').val(role);
                $('#role_id').val(role_id);
                $('#status').val(set_status);
				var dataTable = $('#employee-grid').DataTable( {
					"processing": true,
					"serverSide": true,
                    "destroy":true,
                    "ajax":{
						url :"data-tables/total-reports-data-table.php", // json datasource
						data: {client_id:role_id,client_type:role,from:from,to:to,status:'all'},
						type: "post",  // method  , by default get
						error: function(){  // error handling
							$(".employee-grid-error").html("");
							$("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="3">No data found in the server</th></tr></tbody>');
							$("#employee-grid_processing").css("display","none");
						}
					}
				} );
			    }
			    getData();
			  $('#get_report').on('click', function(){
			      var from_date=  $('#from').val();
			      if(from_date){
			        getData();
			      } else
                    {
                        alert('Select a Date !!');
                    }
			  } );      
			} );
		</script>
<script type="text/javascript">
//$('#example1').tableExport();
$(function(){
	$('#example').DataTable();
      }); 
</script>
<section class="content-header">
	<div class="content-header-left">
		<h1>Day Wise Report</h1>
	</div>
	<div class="row">
	    <div class="col-md-12">
	 <div class='col-md-3'>
         <label for="from">From:</label>
         <input type="date" class="form-control" id="from" value="<?php echo $old_date; ?>" name="from">
    </div>
    <div class='col-md-3'>
         <label for="to">To:</label>
         <input type="date"  class="form-control" id="to" value="<?php echo date("Y-m-d") ?>" name="to">
    </div>
    <div class='col-md-3'>
        <label for="to">Action</label><br>
         <button id="get_report" class="btn btn-md btn-info">Submit</button>
    </div>
	</div>
	</div>
	<div class="row" >
    <div class="btn-group pull-right" style=" padding: 10px;">
        <form action="excel/excel-total-report.php" method="POST">
	     <input type="hidden" id="fromm" name="fromm">
	      <input type="hidden" id="too" name="too">
	      <input type="hidden" id="statuss" name="statuss" value="all">
	       <input type="hidden" id="role" name="role" value="<?php echo $clientType; ?>">
         <?php  if($clientType=="Admin")
    	 {  ?>
         <input type="hidden" id="client_id" name="role_id" value="all">
         <?php }else{?>
         <input type="hidden" id="client_id" name="role_id" value="<?php echo $clientId; ?>">
         <?php  } ?>
	      <button type="submit" class="btn btn-md btn-primary" >Export As Excel</button>
	</form>
		</div>
	</div>
</section>

<section class="content">
	<div class="row">
		<div class="col-md-12">
			<div class="box box-info">
				<div class="box-body table-responsive">
					<table id="employee-grid" class="table table-bordered table-striped">
						<thead>
							<tr>
								<th width="30">SL</th>
								<th>AWB Number</th>
								<th>Ref Number</th>
								<th>Status</th>
								<th>Company Name</th>
								<th>Address</th>
								<th>Pincode</th>
								<th>Mobile Number</th>
								<th>Actual Weight</th>
								<th>Charged Weight</th>
								<th>No.Of Pics</th>
								<th>Date Added</th>
								<th>Customer Name</th>
								<th>Destination</th>
							</tr>
						</thead>
			
					</table>
				</div>
			</div>
		</div>
	</div>
</section>

<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Delete Confirmation</h4>
            </div>
            <div class="modal-body">
                <p>Are you sure want to delete this item?</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <a class="btn btn-danger btn-ok">Delete</a>
            </div>
        </div>
    </div>
</div>


<?php require_once('footer.php'); ?>

Zerion Mini Shell 1.0