@extends('app-new') @push('head-script') @endpush @section('content')
{{ trans('common/common.filter') }}
{!! $errors->first('date_range', '')!!} @if (Auth::user()->is_contractor == 0) @endif @if (Auth::user()->is_contractor == 0) @else @endif
@foreach ($dateArr as $dates) @endforeach @foreach ($employeeSummary as $key => $value) @php $totalPresent = $overtime = $actualOvertime = $totalActualOvertime = $totalovertime = 0; $totalWorkingDays = 0; $atSummary = $value->getAttendanceSummaryFilter($fromDate, $toDate); $salarySlip = @$value->salarySlip->select('id','employee_id','month','year','total_gross') ->where('employee_id',$value->id) ->where('month','=',$month_id) ->where('year','=',$year_id) ->first(); $totalGross = $salarySlip->total_gross? $salarySlip->total_gross:'-'; $overtimeIncentive = @$salarySlip->slipLogs->where('type_id', $overtimeIncentiveComponent->config_value)->first(); $overtimeIncentive = @$overtimeIncentive->calculate_salary?:0; $attendanceIncentive = @$salarySlip->slipLogs->where('type_id', $attendanceIncentiveComponent->config_value)->first(); $attendanceIncentive = @$attendanceIncentive->calculate_salary?:0; $multiAmount = @$salarySlip->slipLogs->where('type_id', $multiAmountComponent->config_value)->first(); $multiAmount = @$multiAmount->calculate_salary?:0; $totalAmount = $overtimeIncentive + $attendanceIncentive + $multiAmount; @endphp @foreach ($dateArr as $date) @if (!isset($atSummary[$date])) @continue; @endif @php $attendance = isset($atSummary[$date]) ? $atSummary[$date] : null; $approvedOvertime = intval(substr($attendance->overtime, 0, -6)) * 60 + intval(substr($attendance->overtime, -5, -3)); $overtime = $overtime + $approvedOvertime; $totalovertime = round($overtime / 60, 2); $actualOvertime += intval(substr($attendance->actual_overtime, 0, -6)) * 60 + intval(substr($attendance->actual_overtime, -5, -3)); $totalActualOvertime = round($actualOvertime / 60, 2); $totalWorkingDays = $totalWorkingDays + $attendance->day_count; @endphp @endforeach @endforeach
{{ $employeeSummary->appends($nextQuery)->links('pagination::bootstrap-4') }}
@endsection @push('footer-script') {{-- date range picker --}} @endpush