@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)

@lang('cashregister::app.zReportHeader')

@lang('cashregister::app.generated'): {{ $reportData['generated_at']->timezone(timezone())->format('d M Y, h:i A') }}

@lang('cashregister::app.branch'): {{ $reportData['session']->branch?->name ?? 'N/A' }}

@lang('cashregister::app.register'): {{ $reportData['session']->register->name ?? 'N/A' }}

@lang('cashregister::app.cashier'): {{ $reportData['session']->cashier->name ?? 'N/A' }}

@lang('cashregister::app.closed'): {{ $reportData['session']->closed_at->timezone(timezone())->format('d M Y, h:i A') }}

@lang('cashregister::app.movementSummary')

@lang('cashregister::app.lineItem') @lang('cashregister::app.amount')
@lang('cashregister::app.openingFloat') {{ currency_format($reportData['opening_float'], restaurant()->currency_id) }}
@lang('cashregister::app.cashSales') {{ currency_format($reportData['cash_sales'], restaurant()->currency_id) }}
@lang('cashregister::app.changeGiven') -{{ currency_format($reportData['change_given'], restaurant()->currency_id) }}
@lang('cashregister::app.cashIn') {{ currency_format($reportData['cash_in'], restaurant()->currency_id) }}
@lang('cashregister::app.cashOut') -{{ currency_format($reportData['cash_out'], restaurant()->currency_id) }}
@lang('cashregister::app.safeDrops') -{{ currency_format($reportData['safe_drops'], restaurant()->currency_id) }}
@lang('cashregister::app.refundsCash') -{{ currency_format($reportData['refunds'], restaurant()->currency_id) }}
@lang('cashregister::app.expectedCash') {{ currency_format($reportData['expected_cash'], restaurant()->currency_id) }}

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

@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
@lang('cashregister::app.denomination') @lang('cashregister::app.count') @lang('cashregister::app.subtotal')
{{ currency_format((float) $row['value'], restaurant()->currency_id) }} {{ $row['count'] }} {{ currency_format((float) $row['subtotal'], restaurant()->currency_id) }}
@lang('cashregister::app.total') {{ currency_format($reportData['counted_cash'], restaurant()->currency_id) }}
@else
@lang('cashregister::app.noDenominationDataAvailable')
@endif

@lang('cashregister::app.discrepancySummary')

@lang('cashregister::app.expected'): {{ currency_format($reportData['expected_cash'], restaurant()->currency_id) }} | @lang('cashregister::app.counted'): {{ currency_format($reportData['counted_cash'], restaurant()->currency_id) }}

{{ $reportData['discrepancy'] >= 0 ? '+' : '' }}{{ currency_format($reportData['discrepancy'], restaurant()->currency_id) }} @if($reportData['discrepancy'] > 0) (@lang('cashregister::app.over')) @elseif($reportData['discrepancy'] < 0) (@lang('cashregister::app.short')) @else (@lang('cashregister::app.exact')) @endif

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

@lang('cashregister::app.notes')

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

@endif

@lang('cashregister::app.status'): {{ $reportData['session']->status }}

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

@lang('cashregister::app.approvedBy'): {{ $reportData['session']->closer->name ?? __('cashregister::app.manager') }}

@endif
@else

@lang('cashregister::app.noDataAvailable')

@lang('cashregister::app.noClosedSessionsFoundForSelectedCriteria')

@endif
@script @endscript