@extends('layouts.app') @section('title', 'Cash & Shift Variance') @section('nav_reports', 'bg-teal-50 text-teal-700 font-semibold') @section('page_title', 'Reports') @section('page_subtitle', 'Cash & Shift Variance') @section('content') @php $varColor = function ($v) { if ($v === null) return 'text-gray-300'; if ($v > 0.009) return 'text-green-600'; if ($v < -0.009) return 'text-red-600'; return 'text-gray-500'; }; $varText = function ($v) { if ($v === null) return '—'; $sign = $v > 0 ? '+' : ($v < 0 ? '−' : ''); return $sign . '₱' . number_format(abs($v), 2); }; @endphp @include('reports._filter', [ 'active' => 'reports.cash-variance', 'mode' => 'range', 'from' => $from, 'to' => $to, 'title' => 'Cash Handling & Shift Variance', 'subtitle' => 'Shifts started ' . \Carbon\Carbon::parse($from)->format('M j') . ' – ' . \Carbon\Carbon::parse($to)->format('M j, Y'), ]) {{-- Summary tiles --}}
Net Variance
{{ $varText($netVariance) }}
over {{ $shiftCount }} shift{{ $shiftCount !== 1 ? 's' : '' }}
Total Over
₱{{ number_format($totalOver, 2) }}
cash surpluses
Total Short
₱{{ number_format(abs($totalShort), 2) }}
cash shortfalls
Unreconciled
{{ $flagged }}
control gap · {{ $overThreshold }} over ₱{{ number_format($threshold, 0) }}
Cumulative over/short per staff member — sorted by magnitude
No shifts in this period.
@else| Cashier | Shifts | Counted | Unrecon. | Net Variance |
|---|---|---|---|---|
| {{ $c['name'] }} | {{ $c['shifts'] }} | {{ $c['counted'] }} | {{ $c['no_count'] }} | {{ $varText($c['variance']) }} |
Most recent first · variance = counted closing − (opening + cash received)
No shifts started in this period.
@else| Shift | Cashier | Status | Opening | Closing | Variance |
|---|---|---|---|---|---|
|
{{ $row['started_at']->format('M j, Y') }} {{ $row['type'] }} · {{ $row['started_at']->format('g:i A') }}{{ $row['ended_at'] ? '–' . $row['ended_at']->format('g:i A') : '' }} |
{{ $row['cashier'] }} | @if($row['no_count']) Unreconciled @else {{ $row['status'] }} @endif | {{ $row['opening'] !== null ? '₱' . number_format($row['opening'], 2) : '—' }} | {{ $row['closing'] !== null ? '₱' . number_format($row['closing'], 2) : '—' }} | {{ $varText($row['variance']) }} |