@php $adminProfile = $admin ?? \App\Models\Admin::query()->find(session('admin_id')); $shopName = $adminProfile?->display_shop_name ?: ($adminProfile?->shop_name ?: ($adminProfile?->name ?? config('app.name', 'Easy IMS'))); $shopLogo = !empty($adminProfile?->show_pos_receipt_logo) && !empty($adminProfile?->pos_receipt_logo) ? \App\Support\Branding::storageImageSrc($adminProfile->pos_receipt_logo) : null; $fromLabel = \Illuminate\Support\Carbon::parse($from_date)->format('d/m/Y'); $toLabel = \Illuminate\Support\Carbon::parse($to_date)->format('d/m/Y'); $generatedAt = \Illuminate\Support\Carbon::parse($generated_at ?? now()); @endphp
@if($shopLogo) @endif

{{ $shopName }}

{{ $adminProfile?->display_address ?: __('Address not available') }}
{{ __('Phone') }}: {{ $adminProfile?->phone ?: __('N/A') }}
{{ __('Daily Cash Book Report') }}
( {{ __('From') }} : {{ $fromLabel }} {{ __('To') }} : {{ $toLabel }} )
{{ $account?->account_name ?? __('All Accounts') }} @if(!empty($account?->account_type)) ({{ $account->account_type }}) @endif
{{ $generatedAt->format('d/m/Y') }}    {{ $generatedAt->format('h:i:sA') }}
@if(!empty($transactions)) @foreach($transactions as $row) @endforeach
{{ __('Date') }} {{ __('Voucher No.') }} {{ __('Particulars') }} {{ __('Cash Out') }} {{ __('Cash In') }}
{{ $row['date'] }} {{ $row['voucher_no'] ?? '-' }} {{ $row['description'] }}
{{ $row['account_name'] }}
{{ ($row['paid'] ?? 0) > 0 ? number_format((float) $row['paid'], 2) : '-' }} {{ ($row['received'] ?? 0) > 0 ? number_format((float) $row['received'], 2) : '-' }} @if((float) ($row['charges'] ?? 0) > 0)
{{ __('Charges') }}: {{ number_format((float) $row['charges'], 2) }}
@endif
{{ __('Line Sub Total') }}
{{ number_format((float) $total_paid, 2) }}
{{ number_format((float) $total_received, 2) }}
{{ __('Current Date Cash In Hand') }}
{{ number_format((float) $closing_balance, 2) }}
{{ __('Before Date Cash In Hand') }}
{{ number_format((float) $opening_balance, 2) }}
{{ __('Total Cash In Hand') }}
{{ number_format((float) $closing_balance, 2) }}
@else
{{ __('Selected filters ke andar koi cashbook record nahi mila.') }}
@endif