@extends('layouts.print') @section('title', 'Shift Report — ' . $shift->typeLabel() . ' · ' . $shift->started_at->format('M j, Y')) @section('content') @php $variance = $summary['variance']; $propName = $settings['property_name'] ?? config('app.name', 'Parkview Hotel'); $propAddress = $settings['property_address'] ?? ''; $propCity = $settings['property_city'] ?? ''; $propPhone = $settings['property_phone'] ?? ''; $totalCollected = $summary['payments']->sum('amount') + $summary['posTotal']; @endphp
{{-- Screen toolbar (hidden on print) --}}
All Shifts
Back to Summary
{{-- ===== LETTERHEAD ===== --}}

{{ $propName }}

@if($propAddress || $propCity)

{{ implode(', ', array_filter([$propAddress, $propCity])) }}

@endif @if($propPhone)

{{ $propPhone }}

@endif

Shift Report

{{ $shift->typeLabel() }}

{{ $shift->started_at->format('l, F j, Y') }}

{{-- ===== SHIFT META ===== --}}

Staff

{{ $shift->user->name }}

{{ $shift->user->role?->name ?? '' }}

Time

{{ $shift->started_at->format('g:i A') }}

→ {{ $shift->ended_at?->format('g:i A') ?? 'ongoing' }}

Duration

{{ $shift->duration() }}

Status

{{ $shift->status === 'open' ? 'Active' : 'Closed' }}

{{-- ===== ACTIVITY SUMMARY ===== --}}

Activity Summary

@foreach([ ['Check-ins', $summary['checkins']->count(), 'text-teal-700'], ['Check-outs', $summary['checkouts']->count(), 'text-amber-600'], ['New Reservations', $summary['newReservations'], 'text-blue-700'], ['Rooms Cleaned', $summary['roomsCleaned'], 'text-green-700'], ['Work Orders', $summary['maintenance']->count(), 'text-orange-600'], ['POS Transactions', $summary['posTxns']->count(), 'text-purple-700'], ] as [$label, $value, $color])
{{ $value }} {{ $label }}
@endforeach
{{-- ===== CHECK-INS & CHECK-OUTS (side by side) ===== --}}
{{-- Check-ins --}}

Check-ins ({{ $summary['checkins']->count() }})

@if($summary['checkins']->isEmpty())

None during this shift.

@else @foreach($summary['checkins'] as $log) @endforeach
{{ $log->description }} {{ $log->created_at->format('g:i A') }}
@endif
{{-- Check-outs --}}

Check-outs ({{ $summary['checkouts']->count() }})

@if($summary['checkouts']->isEmpty())

None during this shift.

@else @foreach($summary['checkouts'] as $log) @endforeach
{{ $log->description }} {{ $log->created_at->format('g:i A') }}
@endif
{{-- ===== PAYMENTS & CASH RECONCILIATION (side by side) ===== --}}
{{-- Payments collected --}}

Payments Collected

@if($summary['paymentsByMethod']->isEmpty() && $summary['posTotal'] == 0)

No payments during this shift.

@else @foreach($summary['paymentsByMethod'] as $method => $amount) @endforeach @if($summary['posTotal'] > 0) @endif
{{ $method }} ₱{{ number_format($amount, 0) }}
POS ({{ $summary['posTxns']->count() }} txn) ₱{{ number_format($summary['posTotal'], 0) }}
Total Collected ₱{{ number_format($totalCollected, 0) }}
@endif
{{-- Cash reconciliation --}}

Cash Reconciliation

@if($shift->opening_cash !== null) @endif @if($summary['posCash'] > 0) @endif @if($shift->closing_cash !== null) @else @endif
Opening float ₱{{ number_format($shift->opening_cash, 0) }}
Cash received (payments) ₱{{ number_format($summary['cashReceived'], 0) }}
Cash from POS ₱{{ number_format($summary['posCash'], 0) }}
Expected on hand ₱{{ number_format($summary['expectedCashOnHand'], 0) }}
Actual count ₱{{ number_format($shift->closing_cash, 0) }}
Variance {{ $variance >= 0 ? '+' : '' }}₱{{ number_format(abs($variance), 0) }}
No closing cash count recorded.
{{-- ===== MAINTENANCE WORK ORDERS ===== --}} @if($summary['maintenance']->isNotEmpty())

Maintenance Work Orders Created ({{ $summary['maintenance']->count() }})

@foreach($summary['maintenance'] as $wo) @endforeach
Description Room Priority Time
{{ $wo->description }} {{ $wo->room_no ? 'Room ' . $wo->room_no : 'Common Area' }} {{ $wo->priority }} {{ $wo->created_at->format('g:i A') }}
@endif {{-- ===== HANDOVER NOTES ===== --}}

Handover Notes

@if($shift->handover_notes)

{{ $shift->handover_notes }}

@else

No handover notes recorded.

@endif
{{-- ===== SIGNATURE BLOCK ===== --}}

Staff Signature

{{ $shift->user->name }}

Supervisor / Manager

{{-- ===== PRINT FOOTER ===== --}}
{{ $propName }} · Shift Report Printed {{ now()->format('M j, Y g:i A') }}
@endsection