@extends('layouts.app') @section('content') @php // Blind close: cashiers must count the drawer without seeing what the system expects $isAdmin = auth()->user()->hasRole('admin') || auth()->user()->hasRole('super_admin'); // One switch in Loss Prevention settings: when on, everyone must count the drawer and non-admins can't see the expected cash $countRequired = \App\Models\IntegrityEvent::cashCountRequired(); $blind = $countRequired && !$isAdmin; $money = fn ($v, $prefix = 'MWK ') => $blind ? '••••••' : $prefix . number_format($v, 2); @endphp

Close Register

Review sales and finalize the session of {{ $register->user->name ?? auth()->user()->name }} @if((int) $register->user_id !== (int) auth()->id()) Closing as super admin @endif

Opening Cash
MWK {{ number_format($report['opening_cash'], 2) }}
Started at {{ $register->opened_at->format('H:i') }}
Total Sales
{{ $money($report['gross_sales']) }}
{{ $report['sales_count'] }} Transactions
Time Open
{{ $report['duration'] }}
{{ $register->opened_at->format('d M Y') }}
Sales Breakdown
@forelse($report['payments'] as $payment) @empty @endforelse @if($report['sales_count']) @endif
Method Count Total
{{ $payment['label'] }} @if($payment['split_count']) incl. {{ $payment['split_count'] }} split @endif
{{ $payment['count'] }} {{ $money($payment['amount']) }}
No sales recorded for this session.
Total Sales {{ $report['sales_count'] }} {{ $money($report['gross_sales']) }}
@if($report['split_sales']->count())
{{ $report['split_sales']->count() }} split sale(s) are counted once in Total Sales and shown under each method they were paid with.
@endif
Expected Balance
Opening Cash MWK {{ number_format($report['opening_cash'], 2) }}
Cash received (incl. cash part of split sales) {{ $money($report['cash_sales']) }}
@if($report['cash_paid_out'] > 0)
Paid out of the drawer (expenses) -{{ $money($report['cash_paid_out']) }}
@endif
Expected in Drawer {{ $money($report['expected_cash']) }}
@if($countRequired) Count all the cash in your drawer. You will enter the amount when you close the register. The full Z report prints after closing. @else Confirm the amount in your drawer matches the expected total before closing. @endif
Back to POS
@include('pos.register.partials.z-receipt', ['report' => $report, 'money' => $money, 'final' => false])
{{-- Sales made offline on this device must be uploaded before the shift is closed --}} @if($errors->has('counted_cash')) @endif @endsection