Detail Perhitungan Jam

Karyawan: {{ $assignment->karyawan?->employee_code }} - {{ $assignment->karyawan?->full_name }}

Profil Bulan: {{ $profil->code }} - {{ $profil->name }}

Periode: {{ $dateFrom }} s/d {{ $dateTo }}

Generated: {{ now()->format('Y-m-d H:i:s') }}

@foreach ($otColumns as $otCol) @endforeach @foreach ($otColumns as $otCol) @endforeach @forelse ($rows as $idx => $row) @php $dayType = (string) ($row['day_type'] ?? 'workday'); $dayLabel = match ($dayType) { 'holiday_special' => 'Holiday Special', 'holiday' => 'Holiday', 'weekend' => 'Weekend', default => 'Workday', }; @endphp @php $specialLabel = (string) ($row['special_overtime_label'] ?? ''); $specialMode = (string) ($row['special_overtime_mode'] ?? ''); @endphp @foreach ($otColumns as $otCol) @endforeach @empty @endforelse
No. Tanggal In Out Jenis Hari Jam Aktual / Efektif Jam Lembur Bersih{{ $otCol['label'] }}Jam Lembur xKali In Lembur Out Lembur Status Reason
{{ $idx + 1 }} {{ $row['work_date'] }} ({{ $row['day_name'] }}) @if (!empty($row['day_type_description']) && $row['day_type_description'] !== '-')
{{ $row['day_type_description'] }}
@endif
{{ $row['in_time'] }} @php $inEff = (string) ($row['in_time'] ?? '-'); $inShadow = (string) ($row['in_time_shadow'] ?? '-'); $inRaw = (string) ($row['in_time_real'] ?? '-'); $inReal = '-'; if ($inShadow !== '-' && $inShadow !== '') { $inReal = $inShadow; } elseif ($inRaw !== '-' && $inRaw !== '') { $inReal = $inRaw; } $hasSpl = (bool) ($row['spl_approved'] ?? false); @endphp @if ($inReal !== '-') @if (!$hasSpl && $inReal !== $inEff)
{{ $inReal }}
@else
{{ $inReal }}
@endif @endif
{{ $row['out_time'] }} @php $outEff = (string) ($row['out_time'] ?? '-'); $outShadow = (string) ($row['out_time_shadow'] ?? '-'); $outRaw = (string) ($row['out_time_real'] ?? '-'); $outReal = '-'; if ($outShadow !== '-' && $outShadow !== '') { $outReal = $outShadow; } elseif ($outRaw !== '-' && $outRaw !== '') { $outReal = $outRaw; } $hasSpl = (bool) ($row['spl_approved'] ?? false); @endphp @if ($outReal !== '-') @if (!$hasSpl && $outReal !== $outEff)
{{ $outReal }}
@else
{{ $outReal }}
@endif @endif
{{ $dayLabel }} @if ($specialLabel !== '')
{{ $specialLabel }}@if($specialMode !== '') - {{ $specialMode }}@endif
@endif @php $dayTypeValue = (string) ($row['day_type'] ?? 'workday'); $actualInTime = trim((string) ($row['in_time'] ?? '-')); $actualOutTime = trim((string) ($row['out_time'] ?? '-')); $hasActualInOut = $actualInTime !== '' && $actualInTime !== '-' && $actualOutTime !== '' && $actualOutTime !== '-'; $isHolidayWeekend = in_array($dayTypeValue, ['holiday', 'holiday_special', 'weekend'], true); $sourceHours = $isHolidayWeekend && (float) ($row['overtime_hours_gross'] ?? 0) > 0 ? (float) ($row['overtime_hours_gross'] ?? 0) : (float) ($row['actual_hours'] ?? 0); $sourceLabel = $isHolidayWeekend ? 'Total Jam Lembur' : 'Jam Aktual'; $hasNormalBreakCut = (float) ($row['break_hours'] ?? 0) > 0 && $sourceHours > 0 && $hasActualInOut; $actualDisplayHours = $hasNormalBreakCut ? max(0, $sourceHours - (float) ($row['break_hours'] ?? 0)) : $sourceHours; @endphp
{{ number_format($actualDisplayHours, 2, '.', '') }}
@if ($hasNormalBreakCut)
{{ $sourceLabel }}: {{ number_format($sourceHours, 2, '.', '') }} jam
Potong Istirahat Normal: {{ number_format((float) ($row['break_hours'] ?? 0), 2, '.', '') }} jam
Hasil Jam Efektif: {{ number_format($actualDisplayHours, 2, '.', '') }} jam
@endif
{{ number_format((float) $row['overtime_hours'], 2, '.', '') }}
@if ((float) ($row['overtime_break_hours'] ?? 0) > 0)
Gross {{ number_format((float) ($row['overtime_hours_gross'] ?? 0), 2, '.', '') }} - Break {{ number_format((float) ($row['overtime_break_hours'] ?? 0), 2, '.', '') }}
@endif @if (!empty($row['overtime_detail_segments']))
Segments: {{ count((array) $row['overtime_detail_segments']) }}
@endif
{{ number_format((float) ($row['ot_dynamic'][$otCol['key']] ?? 0), 2, '.', '') }}{{ number_format((float) $row['weighted_overtime_hours'], 2, '.', '') }} {{ $row['overtime_in_time'] }} {{ $row['overtime_out_time'] }} @if ($specialLabel !== '') {{ $specialLabel }}@if($specialMode !== '') / {{ $specialMode }}@endif
@endif {{ $row['is_approved'] ? 'Approved' : 'Draft' }}
{{ mb_strimwidth(trim((string) ($row['reason'] ?? '-')), 0, 220, '...') }}
Belum ada data.