@php $company = $company ?? null; $companyName = $company?->name ?? $company?->company_name ?? config('app.name'); $companyAddress = $company?->address ?? $company?->company_address ?? ''; $totalMinutes = $overtimes ->where('status', 'Approved') ->sum('duration_minutes'); $totalHours = intdiv( (int) $totalMinutes, 60 ); $totalRemainingMinutes = (int) $totalMinutes % 60; $totalDuration = sprintf( '%d jam %d menit', $totalHours, $totalRemainingMinutes ); @endphp {{-- HEADER --}}
{{ $companyName }}
@if($companyAddress)
{{ $companyAddress }}
@endif
LAPORAN IZIN LEMBUR
Periode: {{ $date_from ? \Carbon\Carbon::parse($date_from)->format('d/m/Y') : '-' }} s/d {{ $date_to ? \Carbon\Carbon::parse($date_to)->format('d/m/Y') : '-' }}
{{-- SUMMARY --}}
TOTAL PENGAJUAN
{{ $overtimes->count() }}
DISETUJUI
{{ $overtimes->where('status', 'Approved')->count() }}
DITOLAK
{{ $overtimes->where('status', 'Rejected')->count() }}
MENUNGGU
{{ $overtimes->where('status', 'Pending')->count() }}
TOTAL LEMBUR DISETUJUI
{{ $totalDuration }}
{{-- REPORT --}} @forelse($overtimes as $index => $overtime) @php $hours = intdiv( (int) $overtime->duration_minutes, 60 ); $minutes = (int) $overtime->duration_minutes % 60; @endphp @empty @endforelse
No Nomor Tanggal Karyawan Jam Durasi Alasan Atasan Status
{{ $index + 1 }} {{ $overtime->overtime_no }} {{ $overtime->overtime_date?->format('d/m/Y') }} @if($overtime->employee) {{ $overtime->employee->full_name }}
{{ $overtime->employee->employee_no }} @else - @endif
{{ substr($overtime->start_time, 0, 5) }} - {{ substr($overtime->end_time, 0, 5) }} {{ $hours }} jam {{ $minutes }} menit {{ $overtime->reason }} {{ $overtime->supervisor?->full_name ?? '-' }} @if($overtime->status === 'Approved') DISETUJUI @elseif($overtime->status === 'Rejected') DITOLAK @else MENUNGGU @endif
Tidak ada data izin lembur.
Mengetahui,
__________________________