@extends('layouts.app') @section('title', '年度統計表') @push('styles') @endpush @section('content')
| 客戶 | 專案名稱 | 預計結案日 | 評估人天 | @foreach(range(1, 12) as $m){{ $m }}月 | @endforeach合計 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $type }} | ||||||||||||||||
| {{ $project->client?->name ?? '—' }} | {{ $project->name }} | {{ $project->end_date ? \Carbon\Carbon::parse($project->end_date)->format('Y-m-d') : '—' }} | @if(!is_null($estimatedManDays[$project->project_id] ?? null)) {{ $estimatedManDays[$project->project_id] }}天 @else — @endif | @foreach(range(1, 12) as $m) @php $h = $matrix[$project->id][$m]['hours'] ?? 0; $md = $matrix[$project->id][$m]['man_days'] ?? 0; @endphp@if($h > 0) {{ number_format($h, 1) }} @else — @endif | @endforeach{{ $rowTotal > 0 ? number_format($rowTotal, 1).'小時' : '—' }} | |||||||||||
| 月合計 | @foreach(range(1, 12) as $m){{ ($monthTotals[$m]['hours'] ?? 0) > 0 ? rtrim(rtrim(number_format($monthTotals[$m]['hours'], 2), '0'), '.') : '—' }} | @endforeach{{ rtrim(rtrim(number_format($totals['hours'], 2), '0'), '.') }}小時 | ||||||||||||||