@extends('layouts.app') @section('title', '請假統計') @section('content')
| 員工編號 | 部門 | 職稱 | 姓名 | 年資 | 核定特休 | @foreach($types as $t){{ $t->name }} | @endforeach合計 |
|---|---|---|---|---|---|---|---|
| {{ $u->employee_no ?: '—' }} | {{ $u->department ?: '—' }} | {{ $u->position ?: '—' }} | {{ $u->name }} @if($showInactive && !$u->is_active) 已離職 @endif | {{ $seniority }} | @if($annualDays !== null && $leaveCalc) @php $mismatch = (float)$annualDays < $leaveCalc['days']; @endphp {{ number_format((float)$annualDays, 2) }} @if($mismatch) @endif @elseif($annualDays !== null) {{ number_format((float)$annualDays, 2) }} @else — @endif | @foreach($types as $lt) @php $used = $userRequests->where('leave_type_id', $lt->id)->sum('days'); $total += $used; @endphp@if($used > 0) {{ number_format((float)$used, 2) }} @else — @endif | @endforeach{{ $total > 0 ? number_format((float)$total, 2) : '—' }} |