@extends('layouts.app') @section('title', 'Shift Details') @section('content')

Shift Details

@can('approve shifts') @if($shift->status->value === 'completed')
@csrf
@endif @endcan Back

Shift Information

{{ $shift->shift_number }}

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

{{ $shift->clock_in_at->format('M d, Y h:i A') }}

{{ $shift->clock_out_at ? $shift->clock_out_at->format('M d, Y h:i A') : 'Active' }}

{{ $shift->getFormattedDuration() }}

{{ ucfirst($shift->status->value) }}
@if($shift->notes)

{{ $shift->notes }}

@endif

Sales During Shift ({{ $shift->sales->count() }})

@if($shift->sales->count() > 0)
@foreach($shift->sales as $sale) @endforeach
Sale # Time Customer Payment Amount
{{ $sale->sale_number }} {{ $sale->created_at->format('h:i A') }} {{ $sale->customer_name ?? 'Walk-in' }} {{ $sale->payment_method }} ${{ number_format($sale->total, 2) }}
@else

No sales recorded during this shift

@endif

Sales Summary

Total Sales ${{ number_format($statistics['total_sales'], 2) }}
Transactions {{ $statistics['total_sales_count'] }}
Sales/Hour ${{ number_format($statistics['sales_per_hour'], 2) }}

Payment Methods

Cash ${{ number_format($statistics['cash_sales'], 2) }}
Card ${{ number_format($statistics['card_sales'], 2) }}
Credit ${{ number_format($statistics['credit_sales'], 2) }}
@if($shift->clock_out_at)

Cash Drawer

Opening Cash ${{ number_format($shift->opening_cash ?? 0, 2) }}
Cash Sales ${{ number_format($statistics['cash_sales'], 2) }}
Expected Cash ${{ number_format($shift->expected_cash ?? 0, 2) }}
Closing Cash ${{ number_format($shift->closing_cash ?? 0, 2) }}
@if($shift->cash_difference !== null)
Difference {{ $shift->cash_difference >= 0 ? '+' : '' }}${{ number_format($shift->cash_difference, 2) }}
@endif
@endif
@endsection