IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>View Report</strong></h2>
</div>
<div class="body">
<?php echo Form::open(['url' => 'view-report-bengaluru','method'=>'GET', 'class' => 'form-horizontal']); ?>
<div class="row clearfix">
<div class="col-sm-1 form-control-label">
<label for="classname">Comapny</label>
</div>
<div class="col-sm-2">
<div class="form-group">
<?php echo Form::select('idCompany',getCompanies(),null,['class' => 'form-control show-tick ms']); ?>
<?php if($errors->has('idCompany')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idCompany')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-1 form-control-label">
<label for="classname">Branch</label>
</div>
<div class="col-sm-2">
<div class="form-group">
<?php echo Form::select('idBranch',[],null,['class' => 'form-control show-tick ms']); ?>
<?php if($errors->has('idBranch')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idBranch')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
<div class="col-sm-1 form-control-label">
<label for="classname">Car No</label>
</div>
<div class="col-sm-2">
<div class="form-group">
<?php echo Form::select('vehicleNo',['All'=>'All'],null,['class' => 'form-control select2 show-tick ms']); ?>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-8 offset-sm-2">
<?php echo Form::submit('GENERATE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php echo Form::close(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>List Of Challans</strong></h2>
</div>
<div class="body table-responsive">
<button class="btn btn-raised btn-danger waves-effect btn-round js-sweetalert" data-id="deleteall" data-type="confirm">DELETE All</button>
<table class="table table-bordered table-striped table-hover dataTable" id='challanexp'>
<thead>
<tr>
<th>Date</th>
<th>Car No</th>
<th>Challan No</th>
<th>Offence Date & Time</th>
<th>Offense Name</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $challans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($var->created_at); ?></td>
<td><?php echo e($var->vehicleNo); ?></td>
<td><?php echo e($var->challanNo); ?></td>
<td><?php echo e($var->offenceDateTime); ?></td>
<td><?php echo e($var->offenceName); ?></td>
<td><?php echo e($var->amount); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$('select[name="idCompany"]').on('change', function() {
var compID = $(this).val();
if (compID) {
$.ajax({
url: "<?php echo e(url('/company')); ?>" + '/' + compID + "/branches",
type: "GET",
dataType: "json",
success:function(data) {
$('select[name="idBranch"]').empty();
$('select[name="idBranch"]').append('<option value="">--- Select ---</option>');
$.each(data, function(key, value) {
$('select[name="idBranch"]').append('<option value="' + key + '">' + value + '</option>');
});
}
});
} else{
$('select[name="idBranch"]').empty();
}
});
$('select[name="idBranch"]').on('change', function() {
var branchid = $(this).val();
if (branchid) {
$.ajax({
url: "<?php echo e(url('/branch')); ?>" + '/' + branchid + "/vehicles",
type: "GET",
dataType: "json",
success:function(data) {
$('select[name="vehicleNo"]').empty();
$('select[name="vehicleNo"]').append('<option value="All">All</option>');
$.each(data, function(key, value) {
$('select[name="vehicleNo"]').append('<option value="' + key + '">' + value + '</option>');
});
}
});
} else{
$('select[name="vehicleNo"]').empty();
}
});
$(document).on('click', '.js-sweetalert', function (e) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
e.preventDefault();
swal({
title: "Are you sure?",
text: "Are You sure you want to delete all data!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: true
},
function() {
// console.log('here');
$.ajax({
type: "GET",
url: "<?php echo e(url('/delete-parivahandata')); ?>",
})
.done(function(data) {
swal({
title: "Deleted",
text: "All Data has been successfully deleted",
type: "success"
},function() {
location.reload();
});
})
.error(function(data) {
swal("Oops", "We couldn't connect to the server!", "error");
});
return false;
});
});
$(function () {
$('#challanexp').DataTable({
dom: 'Bfrtip',
buttons: [
{ extend: 'excelHtml5', text: 'Export to Excel',title:'Bengaluru Report'}
]
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/onlinelogin/public_html/gomygps/resources/views/reports/bengaluru-report.blade.php ENDPATH**/ ?>
Copyright © 2021 -