@lang('app.to')
@foreach($branches as $branch) @endforeach {{-- @foreach($registers as $register) @endforeach --}} @if(user_can('View Cash Register Reports')) @foreach($cashiers as $cashier) @endforeach @endif
@if($sessions && count($sessions) > 0)

Closed Sessions

@foreach($sessions as $s) @php $cashierName = $s->cashier?->name ?? optional(\App\Models\User::find($s->opened_by))->name; @endphp @endforeach
ID Branch Cashier Closed At Action
#{{ $s->id }} {{ $s->branch?->name ?? 'N/A' }}{{ $cashierName ?? 'N/A' }} {{ optional($s->closed_at)->timezone(timezone())->format('d M Y, h:i A') }}
@endif @if(($sessions && count($sessions) > 0) && $reportData)
@endif @if($reportData)

Z Report (End-Shift Closing)

Generated: {{ $reportData['generated_at']->timezone(timezone())->format('d M Y, h:i A') }}

Branch: {{ $reportData['session']->branch?->name ?? 'N/A' }}

Register: {{ $reportData['session']->register->name ?? 'N/A' }}

Cashier: {{ $reportData['session']->cashier->name ?? 'N/A' }}

Closed: {{ $reportData['session']->closed_at->timezone(timezone())->format('d M Y, h:i A') }}

Movement Summary

Line Item Amount
Opening Float {{ currency_format($reportData['opening_float'], restaurant()->currency_id) }}
Cash Sales {{ currency_format($reportData['cash_sales'], restaurant()->currency_id) }}
Change Given -{{ currency_format($reportData['change_given'], restaurant()->currency_id) }}
Cash-In {{ currency_format($reportData['cash_in'], restaurant()->currency_id) }}
Cash-Out -{{ currency_format($reportData['cash_out'], restaurant()->currency_id) }}
Safe Drops -{{ currency_format($reportData['safe_drops'], restaurant()->currency_id) }}
Refunds (Cash) -{{ currency_format($reportData['refunds'], restaurant()->currency_id) }}
Expected Cash {{ currency_format($reportData['expected_cash'], restaurant()->currency_id) }}

@lang('cashregister::app.countedCash') (@lang('cashregister::app.denominations'))

@if($denominations->count() > 0) @php $grouped = $denominations->groupBy('cash_denomination_id')->map(function($items) { return [ 'value' => optional($items->first()->denomination)->value, 'count' => $items->sum('count'), 'subtotal' => $items->sum('subtotal'), ]; })->sortByDesc('value'); @endphp
@foreach($grouped as $row) @endforeach
Denomination Count Subtotal
{{ currency_format((float) $row['value'], restaurant()->currency_id) }} {{ $row['count'] }} {{ currency_format((float) $row['subtotal'], restaurant()->currency_id) }}
Total {{ currency_format($reportData['counted_cash'], restaurant()->currency_id) }}
@else
No denomination data available
@endif

Discrepancy Summary

Expected: {{ currency_format($reportData['expected_cash'], restaurant()->currency_id) }} | Counted: {{ currency_format($reportData['counted_cash'], restaurant()->currency_id) }}

{{ $reportData['discrepancy'] >= 0 ? '+' : '' }}{{ currency_format($reportData['discrepancy'], restaurant()->currency_id) }} @if($reportData['discrepancy'] > 0) (Over) @elseif($reportData['discrepancy'] < 0) (Short) @else (Exact) @endif

@if($reportData['session']->closing_reason)

Notes

{{ $reportData['session']->closing_reason }}

@endif

Status: {{ $reportData['session']->status }}

@if($reportData['session']->approved_by)

Approved By: {{ $reportData['session']->closer->name ?? 'Manager' }}

@endif
@else

No Data Available

No closed cash register sessions found for the selected criteria.

@endif
@script @endscript