123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- @extends('layouts.master')
- @section('content')
- <!-- DataTables -->
- <link rel="stylesheet" href="{{ asset('/assets/') }}/css/dataTables.bootstrap.min.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/switch/rcswitcher.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/pnotify.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweetalert.css">
- <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweet-alert-animations.css">
- <div class="panel panel-default" style="min-height: 500px">
- <!-- Default panel contents -->
- <div class="panel-heading"></div>
- <header class="panel-heading" style="height:50px;">
- <div class="pull-left">
- {{$title}}
- </div>
- <div>
- @if(\Auth::user()->utype==1)
- <a href="{{ url('admin/payroll/create') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-plus"></i> Employee Bill Create</a> <br><br>
- @endif
- </div>
- </header>
- <div class="panel-body">
- <div class="clearfix"></div>
- <table class="table table-bordered " id="example">
- <thead>
- <tr>
- <th>#</th>
- <th>Employee Name</th>
- <th>Designation</th>
- <th>Grade</th>
- <th class="text-right">Salary</th>
- <th class="text-right">Due</th>
- <th class="text-right">Payable</th>
- <th>Status</th>
- <th>Action</th>
- </tr>
- </thead>
- <tbody>
- @if($all)
- <?php $i=1; $total=0;?>
- @foreach($all as $row)
- <tr>
- <td>{{ $i++ }}</td>
- <td>{{ @$row->employee->name }}</td>
- <td>{{ @$row->designationName->designation['name'] }}</td>
- <td>{{ @$row->grade->name }}</td>
- <td class="text-right">
- <?php $salary=0; ?>
- @foreach($row->psHead as $data)
- @php $salary = $salary + $data->amount @endphp
- @endforeach
- @if($salary >0)
- <span>{{ number_format($salary,2) }} </span>
- @else
- <span>Salary not update</span>
- @endif
- </td>
- <td class="text-right">
- <?php $gross=0; $paid=0; ?>
- @foreach($row->due as $due)
- @php
- $gross = $gross + $due->gross_amount;
- $paid = $paid + $due->paid_amount
- @endphp
- @endforeach
- @php
- $total_due = $gross - $paid
- @endphp
- {{ number_format($total_due,2) }}
- </td>
- <td class="text-right">{{ number_format($total_due,2) }}</td>
- <td>
- @if($total_due <= 0)
- <label class="label label-success">Paid</label>
- @else
- <label class="label label-info">Due</label>
- @endif
- </td>
- <td>
- @if(\Auth::user()->utype==1)
- <a href="{{ url('admin/payroll/pr_update') }}/{{ $row->id }}" class='btn btn-primary btn-sm' data-toggle="tooltip" title="Pay Now" data-placement="top" @if($total_due ==0) {{'disabled'}}@endif>Pay Now</a>
- <a href="{{ url('admin/payroll/details') }}/{{ $row->employee_id }}" class='btn btn-primary btn-sm' data-toggle="tooltip" title="Employee Payment History" data-placement="top">Details</a>
- @endif
- </td>
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- </div>
- <div class="modal fade" id="modalPreview">
- <div class="modal-dialog" style='width: 70%;'>
-
- </div>
- </div>
- <div id"statusmsg">
-
- </div>
- @stop
- @section('style')
- <style>
- .modal-dialog {
- width: 70% !important;
- height: 70% !important;
- }
- .modal-content {
- height: auto;
- min-height: 70% !important;
- border-radius: 0;
- }
- </style>
- @stop
- @section('script')
- <script src="{{ asset('/assets/') }}/js/jquery.dataTables.min.js"></script>
- <script src="{{ asset('/assets/') }}/js/dataTables.bootstrap.min.js"></script>
- <script src="{{ asset('/assets/') }}/switch/rcswitcher.js"></script>
- <script src="{{ asset('/assets/') }}/alert/sweetalert.min.js"></script>
- <script src="{{ asset('/assets/') }}/alert/pnotify.js"></script>
- <script src="{{ asset('/assets/') }}/alert/notify.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $('[data-toggle="tooltip"]').tooltip();
- $("input[type='checkbox']").rcSwitcher();
- });
- $(document).ready(function() {
- $('body').on('hidden.bs.modal', '.modal', function () {
- $(this).removeData('bs.modal');
- });
- var table=$("#example").DataTable({
- "searching": true,
- "lengthChange": true,
- "ordering": true,
- stateSave: true
- });
- $("input[type='checkbox']").rcSwitcher().on({'toggle.rcSwitcher': function( e, dataObj, changeType ){
- var id = $(this).data('id');
- var urll="{{ url('admin/payroll_structure/status') }}/"+id;
- var msg_success = 'Status Updated Successfully.';
- var msg_error = 'Something went wrong!';
- $.ajax({
- url:urll,
- success: function(data){
- notify('success',msg_success);
- },
- error: function (data) {
- notify('error',msg_error);
- }
- });
- }
- });
- });
- </script>
- @stop
- @if(Session::has('msg'))
- <div class="alert alert-success center-block msg_alt" >
- <a class="close" data-dismiss="alert" href="#">×</a>
- <strong><i class="fa fa-check"></i></strong>
- {{Session::get('msg')}}
- </div>
- @endif
|