@extends('layouts.print') @section('title', 'Cash & Shift Variance — ' . \Carbon\Carbon::parse($from)->format('M j') . '–' . \Carbon\Carbon::parse($to)->format('M j, Y')) @section('content') @php $propName = \App\Models\Setting::get('property_name', config('app.name', 'Parkview Hotel')); $periodLabel = \Carbon\Carbon::parse($from)->format('M j') . ' – ' . \Carbon\Carbon::parse($to)->format('M j, Y'); $varText = function ($v) { if ($v === null) return '—'; $sign = $v > 0 ? '+' : ($v < 0 ? '−' : ''); return $sign . '₱' . number_format(abs($v), 2); }; @endphp
@include('reports.print._letterhead', [ 'reportTitle' => 'Cash & Shift Variance', 'periodLabel' => $periodLabel, 'backUrl' => route('reports.cash-variance', ['from' => $from, 'to' => $to]), ])
@foreach([ ['Net Variance', $varText($netVariance), $shiftCount . ' shifts'], ['Total Over', '₱' . number_format($totalOver, 2), 'surpluses'], ['Total Short', '₱' . number_format(abs($totalShort), 2), 'shortfalls'], ['Unreconciled', $flagged, 'control gap'], ] as [$label, $value, $sub])

{{ $label }}

{{ $value }}

{{ $sub }}

@endforeach

By Cashier

@if(empty($byCashier))

No shifts in this period.

@else @foreach($byCashier as $c) @endforeach
Cashier Shifts Counted Unrecon. Net Variance
{{ $c['name'] }} {{ $c['shifts'] }} {{ $c['counted'] }} {{ $c['no_count'] }} {{ $varText($c['variance']) }}
@endif

Shift Detail ({{ $shiftCount }})

@if(empty($rows))

No shifts started in this period.

@else @foreach($rows as $row) @endforeach
Date Cashier Type Status Opening Closing Variance
{{ $row['started_at']->format('M j, Y') }} {{ $row['cashier'] }} {{ $row['type'] }} {{ $row['no_count'] ? 'Unreconciled' : ucfirst($row['status']) }} {{ $row['opening'] !== null ? '₱' . number_format($row['opening'], 2) : '—' }} {{ $row['closing'] !== null ? '₱' . number_format($row['closing'], 2) : '—' }} {{ $varText($row['variance']) }}
@endif
{{ $propName }} · Cash & Shift Variance Printed {{ now()->format('M j, Y g:i A') }}
@endsection