details.blade.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. @extends('layouts.master')
  2. @section('content')
  3. <!-- DataTables -->
  4. <link rel="stylesheet" href="{{ asset('/assets/') }}/css/dataTables.bootstrap.min.css">
  5. <link rel="stylesheet" href="{{ asset('/assets/') }}/switch/rcswitcher.css">
  6. <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/pnotify.css">
  7. <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweetalert.css">
  8. <link rel="stylesheet" href="{{ asset('/assets/') }}/alert/sweet-alert-animations.css">
  9. <div class="row" style="min-height: 500px">
  10. <div class="col-md-10 col-md-offset-1">
  11. <div class="panel panel-default" style="">
  12. <!-- Default panel contents -->
  13. <div class="panel-heading"></div>
  14. <header class="panel-heading" style="height:50px;">
  15. <div class="pull-left">
  16. {{$title}}
  17. </div>
  18. <div>
  19. @if(\Auth::user()->utype==1)
  20. <a href="{{ url('admin/payroll') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-arrow-left"></i> Back</a> <br><br>
  21. @endif
  22. </div>
  23. </header>
  24. <div class="panel-body">
  25. <div class="col-md-4 text-center">
  26. <b>Name : </b> {{$emp->name}}
  27. </div>
  28. <div class="col-md-4 text-center">
  29. <b>Designation : </b> {{$emp_details->designation->name}}
  30. </div>
  31. <div class="col-md-4 text-center">
  32. <b>Grade : </b> {{$emp_details->grade->name}}
  33. </div>
  34. <br/>
  35. <hr/>
  36. <div class="clearfix"></div>
  37. <table class="table table-bordered " id="example">
  38. <thead>
  39. <tr>
  40. <th>#</th>
  41. <th>Month of Salary</th>
  42. <th>Payment Date</th>
  43. <th class="text-right">Total Salary</th>
  44. <th class="text-right">Paid</th>
  45. <th class="text-right">Due</th>
  46. <th style="text-align: center;">Status</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. @if($all)
  51. <?php $i=1; $total_due=0;?>
  52. @foreach($all as $row)
  53. <tr>
  54. <td>{{ $i++ }}</td>
  55. <td>{{ date("M Y", strtotime(@$row->date)) }}</td>
  56. <td>
  57. @if($row->paid_amount >0)
  58. {{ date("d M Y", strtotime(@$row->updated_at)) }}</td>
  59. @else
  60. N/A
  61. @endif
  62. <td class="text-right">
  63. <span>{{ number_format( @$row->gross_amount,2) }} </span>
  64. </td>
  65. <td class="text-right">
  66. <span>{{ number_format( @$row->paid_amount,2) }} </span>
  67. </td>
  68. <td class="text-right">
  69. <span>{{ number_format( $total_due = @$row->gross_amount - @$row->paid_amount,2) }} </span>
  70. </td>
  71. <td class="text-center">
  72. @if($total_due <= 0)
  73. <label class="label label-success">Paid</label>
  74. @else
  75. <label class="label label-info">Due</label>
  76. @endif
  77. <a href="{{ url('admin/payroll/receipt/') }}/{{$emp->id}}/{{ $row->id }}" class="btn btn-info btn-sm @if($row->paid_amount <=0) disabled @endif " data-toggle='modal' data-target='#modalPreview' style="padding: 1px 5px;font-size: 12px;">Receipt</a>
  78. </td>
  79. </tr>
  80. @endforeach
  81. @endif
  82. </tbody>
  83. </table>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="modal fade" id="modalPreview">
  89. <div class="modal-dialog" style='width: 70%;'>
  90. </div>
  91. </div>
  92. <div id"statusmsg">
  93. </div>
  94. @stop
  95. @section('style')
  96. <style>
  97. .modal-dialog {
  98. width: 70% !important;
  99. height: 70% !important;
  100. }
  101. .modal-content {
  102. height: auto;
  103. min-height: 70% !important;
  104. border-radius: 0;
  105. }
  106. </style>
  107. @stop
  108. @section('script')
  109. <script src="{{ asset('/assets/') }}/js/jquery.dataTables.min.js"></script>
  110. <script src="{{ asset('/assets/') }}/js/dataTables.bootstrap.min.js"></script>
  111. <script src="{{ asset('/assets/') }}/switch/rcswitcher.js"></script>
  112. <script src="{{ asset('/assets/') }}/alert/sweetalert.min.js"></script>
  113. <script src="{{ asset('/assets/') }}/alert/pnotify.js"></script>
  114. <script src="{{ asset('/assets/') }}/alert/notify.js"></script>
  115. <script type="text/javascript">
  116. $(document).ready(function(){
  117. $('[data-toggle="tooltip"]').tooltip();
  118. $("input[type='checkbox']").rcSwitcher();
  119. });
  120. $(document).ready(function() {
  121. $('body').on('hidden.bs.modal', '.modal', function () {
  122. $(this).removeData('bs.modal');
  123. });
  124. var table=$("#example").DataTable({
  125. "searching": true,
  126. "lengthChange": true,
  127. "ordering": true,
  128. stateSave: true
  129. });
  130. });
  131. </script>
  132. @stop
  133. @if(Session::has('msg'))
  134. <div class="alert alert-success center-block msg_alt" >
  135. <a class="close" data-dismiss="alert" href="#">&times;</a>
  136. <strong><i class="fa fa-check"></i></strong>&nbsp;
  137. {{Session::get('msg')}}
  138. </div>
  139. @endif