@extends('backEnd.master') @section('title') @lang('hr.generate_payroll') @endsection @push('css') @endpush @section('mainContent')
@if (userPermission('payroll-search'))

@lang('common.select_criteria')

{{ Form::open(['class' => 'form-horizontal', 'route' => 'payroll', 'method' => 'GET', 'enctype' => 'multipart/form-data']) }}
@if ($errors->has('role_id')) {{ $errors->first('role_id') }} @endif
@php $month = date('F'); @endphp
@if ($errors->has('payroll_month')) {{ $errors->first('payroll_month') }} @endif
@if ($errors->has('payroll_year')) {{ $errors->first('payroll_year') }} @endif
{{ Form::close() }}
@endif @if (isset($staffs))

@lang('hr.staff_list')

@foreach ($staffs as $value) @php $getPayrollDetails = $value->payrollStatus; @endphp @endforeach
@lang('hr.staff_no') @lang('common.name') @lang('hr.role') @lang('hr.department') @lang('common.description') @lang('common.mobile') @lang('hr.paid') @lang('common.status') @lang('common.action')
{{ $value->staff_no }} {{ $value->first_name }} {{ $value->last_name }} {{ $value->roles != '' ? $value->roles->name : '' }} {{ $value->departments != '' ? $value->departments->name : '' }} {{ $value->designations != '' ? $value->designations->title : '' }} {{ $value->mobile }} {{ $getPayrollDetails ? $getPayrollDetails->payrollPayments->sum('amount') : __('hr.not_generated')}} @if (!empty($getPayrollDetails)) @if ($getPayrollDetails->payroll_status == 'G') @if(count($getPayrollDetails->payrollPayments) > 0) @else @endif @endif @if ($getPayrollDetails->payroll_status == 'P') @endif @else @endif @if (!empty($getPayrollDetails)) @if ($getPayrollDetails->payroll_status == 'G') @if (userPermission('pay-payroll')) @lang('hr.proceed_to_pay') @endif @lang('hr.print') @endif @if ($getPayrollDetails->payroll_status == 'P') @if (userPermission('view-payslip')) @lang('hr.view_payslip') @endif @endif @if($getPayrollDetails->payrollPayments) @lang('hr.view Payment') @endif @else @if (userPermission('generate-Payroll')) @lang('hr.generate_payroll') @endif @endif
@endif
@endsection @include('backEnd.partials.data_table_js') @include('backEnd.partials.date_picker_css_js')