@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; $accountLabel = $account?->account_name ?? __('All Accounts'); $accountType = $account?->account_type; $fromDateLabel = \Illuminate\Support\Carbon::parse($from_date)->format('d/m/Y'); $toDateLabel = \Illuminate\Support\Carbon::parse($to_date)->format('d/m/Y'); @endphp
@if ($shopLogo) @endif

{{ $shopName }}

{{ $adminProfile?->display_address ?: __('Address not available') }}
{{ __('Phone') }}: {{ $adminProfile?->phone ?: __('N/A') }}
{{ __('Account Statement') }}
{{ __('Account') }}
{{ $accountLabel }}
@if($accountType)
{{ $accountType }}
@endif
{{ __('From Date') }}
{{ $fromDateLabel }}
{{ __('To Date') }}
{{ $toDateLabel }}
{{ __('Opening Balance') }}
Rs. {{ number_format((float) $opening_balance, 2) }}
{{ __('Total Credit') }}
Rs. {{ number_format((float) $total_credit, 2) }}
{{ __('Total Debit') }}
Rs. {{ number_format((float) $total_debit, 2) }}
{{ __('Closing Balance') }}
Rs. {{ number_format((float) $closing_balance, 2) }}
@if(!empty($transactions)) @foreach($transactions as $transaction) @endforeach
{{ __('Date') }} {{ __('Account') }} {{ __('Description') }} {{ __('Debit') }} {{ __('Credit') }} {{ __('Balance') }}
- {{ __('Opening Balance') }} {{ __('System Carry Forward') }} {{ $opening_balance > 0 ? number_format((float) $opening_balance, 2) : '-' }} {{ $opening_balance < 0 ? number_format(abs((float) $opening_balance), 2) : '-' }} Rs. {{ number_format((float) $opening_balance, 2) }}
{{ $transaction['date'] }} {{ $transaction['account_name'] }} @if(!empty($transaction['account_type']))
{{ $transaction['account_type'] }}
@endif
{{ $transaction['description'] }} {{ $transaction['debit'] > 0 ? number_format((float) $transaction['debit'], 2) : '-' }} {{ $transaction['credit'] > 0 ? number_format((float) $transaction['credit'], 2) : '-' }} Rs. {{ number_format((float) ($transaction['balance'] ?? 0), 2) }}
@else
{{ __('Selected range mein koi transaction nahi mili.') }}
@endif