{{-- resources/views/cashing-up/show.blade.php --}} @extends('layouts.app') @section('title', 'Shift ' . $shift->reference) @section('page_title', $shift->reference) @section('page_subtitle', 'Cash shift · ' . $shift->opened_at->format('d M Y')) @section('content') {{-- Action Bar --}}
← Shifts {{ strtoupper($shift->status) }}
Print
{{-- ═══ LEFT COLUMN ═══ --}}
{{-- Summary Cards --}}
{{ $shift->currency }} {{ number_format($shift->opening_float, 2) }}
Opening Float
{{ $shift->currency }} {{ number_format($totalCashIn, 2) }}
Cash Received
{{ $shift->currency }} {{ number_format($totalCashOut + $totalRefunds, 2) }}
Cash Out / Refunds
{{ $shift->currency }} {{ number_format($expectedCash, 2) }}
Expected Float
{{-- Cash Payments --}}
Cash Payments Received {{ $cashPayments->count() }} payment{{ $cashPayments->count() !== 1 ? 's' : '' }} {{ $shift->currency }} {{ number_format($totalCashIn, 2) }}
@if($cashPayments->isEmpty())

No cash payments recorded during this shift

@else
@foreach($cashPayments as $payment) @endforeach
Reference Guest Invoice Amount Time
{{ $payment->reference }} {{ $payment->guest?->first_name }} {{ $payment->guest?->last_name ?? '—' }} @if($payment->invoice) {{ $payment->invoice->invoice_number }} @else — @endif {{ $payment->currency }} {{ number_format($payment->amount, 2) }} {{ $payment->paid_at?->format('H:i') }}
Total Cash In {{ $shift->currency }} {{ number_format($totalCashIn, 2) }}
@endif
{{-- Manual Transactions --}}
Manual Transactions @if($shift->transactions->isNotEmpty()) {{ $shift->transactions->count() }} entries @endif
@if($shift->transactions->isEmpty())

No manual transactions recorded

@else
@foreach($shift->transactions as $txn) @php $tc = [ 'receipt' => ['bg'=>'#d1fae5','color'=>'#065f46','label'=>'Receipt'], 'refund' => ['bg'=>'#fee2e2','color'=>'#991b1b','label'=>'Refund'], 'float_in' => ['bg'=>'#dbeafe','color'=>'#1e40af','label'=>'Float In'], 'float_out'=> ['bg'=>'#fef3c7','color'=>'#92400e','label'=>'Float Out'], ][$txn->type] ?? ['bg'=>'#f1f5f9','color'=>'#475569','label'=>ucfirst($txn->type)]; @endphp @endforeach
Type Description Reference Amount Time
{{ $tc['label'] }} {{ $txn->description }} {{ $txn->reference ?? '—' }} {{ in_array($txn->type, ['float_out','refund']) ? '-' : '+' }} {{ $shift->currency }} {{ number_format($txn->amount, 2) }} {{ $txn->transacted_at?->format('H:i') }}
@endif {{-- Add Transaction — open shifts only --}} @if($shift->status === 'open')
Record Manual Transaction
@csrf
{{ $shift->currency }}
@endif
{{-- ═══ RIGHT COLUMN ═══ --}}
{{-- Shift Info --}}
Shift Info
Reference {{ $shift->reference }}
Status {{ ucfirst($shift->status) }}
Opened By {{ $shift->openedBy?->name ?? '—' }}
Opened At {{ $shift->opened_at->format('d M Y H:i') }}
@if($shift->status === 'closed')
Closed By {{ $shift->closedBy?->name ?? '—' }}
Closed At {{ $shift->closed_at?->format('d M Y H:i') }}
@endif
Duration {{ $shift->opened_at->diffForHumans($shift->closed_at ?? now(), true) }}
Currency {{ $shift->currency }}
@if($shift->opening_notes)
Opening Notes
{{ $shift->opening_notes }}
@endif
{{-- Reconciliation --}}
Reconciliation
Opening Float {{ $shift->currency }} {{ number_format($shift->opening_float, 2) }}
+ Cash Received {{ $shift->currency }} {{ number_format($totalCashIn, 2) }}
@if($totalCashOut > 0)
− Float Out ({{ $shift->currency }} {{ number_format($totalCashOut, 2) }})
@endif @if($totalRefunds > 0)
− Refunds Paid ({{ $shift->currency }} {{ number_format($totalRefunds, 2) }})
@endif
Expected Float {{ $shift->currency }} {{ number_format($expectedCash, 2) }}
@if($shift->status === 'closed' && $shift->actual_cash !== null)
Actual Cash {{ $shift->currency }} {{ number_format($shift->actual_cash, 2) }}
@php $varianceColor = $shift->variance < 0 ? 'var(--danger)' : ($shift->variance > 0 ? 'var(--success)' : 'var(--muted)'); @endphp
Variance {{ $shift->variance >= 0 ? '+' : '' }}{{ $shift->currency }} {{ number_format($shift->variance, 2) }} @if($shift->variance < 0) (short) @elseif($shift->variance > 0) (over) @else ✓ balanced @endif
@if($shift->variance_explanation)
Explanation: {{ $shift->variance_explanation }}
@endif @endif
{{-- Breakdown by payment method (closed shifts) --}} @if($shift->status === 'closed')
Payment Method Breakdown
@php $methods = [ 'Cash' => $shift->total_cash_received, 'Card' => $shift->total_card_received, 'EcoCash' => $shift->total_ecocash_received, 'InnBucks' => $shift->total_innbucks_received, 'Bank Transfer'=> $shift->total_transfer_received, ]; $grandTotal = array_sum($methods); @endphp @foreach($methods as $label => $amount) @if($amount > 0)
{{ $label }} {{ $shift->currency }} {{ number_format($amount, 2) }}
@endif @endforeach
Total Received {{ $shift->currency }} {{ number_format($grandTotal, 2) }}
@endif {{-- Close Shift --}} @if($shift->status === 'open')
Close Shift
@csrf
{{ $shift->currency }} @error('actual_cash')
{{ $message }}
@enderror
Expected: {{ $shift->currency }} {{ number_format($expectedCash, 2) }}
{{-- Open new shift toggle --}}
The actual cash amount becomes the opening float for the next shift
@endif @if($shift->closing_notes)
Closing Notes

{{ $shift->closing_notes }}

@endif
@endsection