IMMREX7

aku nok ndi : /home/spdtg/www/gomygps/resources/views/reports/
File Up :
aku nok ndi : /home/spdtg/www/gomygps/resources/views/reports/hyderabad-report.blade.php

@extends('main')
@section('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">
                {!! Form::open(['url' => 'view-report-hyderabad','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">
                            {!! Form::select('idCompany',getCompanies(),null,['class' => 'form-control show-tick ms']) !!}
                            @if ($errors->has('idCompany'))
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong>{{ $errors->first('idCompany') }}</strong>
                            </label>
                            @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">
                            {!! Form::select('idBranch',[],null,['class' => 'form-control show-tick ms']) !!}
                            @if ($errors->has('idBranch'))
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong>{{ $errors->first('idBranch') }}</strong>
                            </label>
                            @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">
                            {!! 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">
                        {!! Form::submit('GENERATE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!}
                        {!! 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>
                        @foreach($challans as $var)
                        <tr>
                            <td>{{$var->created_at}}</td>
                            <td>{{$var->vehicleNo}}</td>
                            <td>{{$var->challanNo}}</td>
                            <td>{{$var->offenceDateTime}}</td>
                            <td>{{$var->offenceName}}</td>
                            <td>{{$var->amount}}</td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
@stop
@section('script')
<script>
$('select[name="idCompany"]').on('change', function() {
    var compID = $(this).val();
    if (compID) {
        $.ajax({
            url: "{{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: "{{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: "{{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>
@stop

Copyright © 2021 - 2025 IMMREX7