Branch Statement

Branch: @if($isBranchAdmin) {{ auth()->user()->branch->name ?? 'Your Branch' }} @else {{ request('branch_id') ? ($branches->firstWhere('id', request('branch_id'))?->name ?? 'Specific Branch') : 'All Branches' }} @endif

Date Range: {{ $dateFrom->format('Y-m-d') }} to {{ $dateTo->format('Y-m-d') }}

@if(request('service_id'))

Service: {{ $services->firstWhere('id', request('service_id'))?->name ?? 'Specific Service' }}

@endif @if(request('agent_id'))

Agent: {{ $agents->firstWhere('id', request('agent_id'))?->name ?? 'Specific Agent' }}

@endif

Generated on: {{ now()->format('Y-m-d H:i:s') }}

@if($records->isNotEmpty()) @if(!$isBranchAdmin) @endif
Summary Total Today
Sales {{ number_format($totalSales, 2) }} {{ number_format($todaySales, 2) }}
Cash (SR) {{ number_format($totalCash, 2) }} {{ number_format($todayCash, 2) }}
Bank (SR) {{ number_format($totalBankSR, 2) }} {{ number_format($todayBankSR, 2) }}
Due Collection {{ number_format($totalDueCollection, 2) }} {{ number_format($todayDueCollection, 2) }}
Due {{ number_format($totalDue, 2) }} {{ number_format($todayDue, 2) }}
Agent Commission {{ number_format($totalAgentCommission, 2) }} {{ number_format($todayAgentCommission, 2) }}
Profit {{ number_format($totalProfit, 2) }} {{ number_format($todayProfit, 2) }}
@endif
@if($records->isNotEmpty()) @if(!$isBranchAdmin) @endif @if(!$isBranchAdmin) @endif @foreach($records as $record) @if(!$isBranchAdmin) @endif @if(!$isBranchAdmin) @endif @endforeach @if(!$isBranchAdmin) @else /* */ @endif
Create Date Delivery Date Invoice NoBranch NameCustomer Name Identity No Service Name Service Rate Cash (SR) Bank (SR) Tax ID Due Due CollectionAgent Name Agent Commission Profit
{{ \Carbon\Carbon::parse($record->create_date)->format('Y-m-d H:i') }} {{ $record->delivery_date ? \Carbon\Carbon::parse($record->delivery_date)->format('Y-m-d') : 'N/A' }} {{ Str::limit($record->invoice_no, 10) }}{{ Str::limit($record->branch_name, 8) }}{{ Str::limit($record->customer_name, 10) }} {{ Str::limit($record->customer_id, 6) }} {{ Str::limit($record->service_name, 10) }} {{ number_format($record->service_rate, 2) }} {{ number_format($record->cash, 2) }} {{ number_format($record->bank_sr, 2) }} {{ Str::limit($record->tax_id ?? 'N/A', 8) }} {{ number_format($record->due, 2) }} {{ number_format($record->due_collection, 2) }}{{ Str::limit($record->agent_name ?? 'N/A', 8) }} {{ number_format($record->agent_commission, 2) }} {{ number_format($record->profit, 2) }}
Period Totals: {{ number_format($totalSales, 2) }} {{ number_format($totalCash, 2) }} {{ number_format($totalBankSR, 2) }} {{ number_format($totalDue, 2) }} {{ number_format($totalDueCollection, 2) }} {{ number_format($totalAgentCommission, 2) }} {{ number_format($totalProfit, 2) }}Period Totals: {{ number_format($totalSales, 2) }} {{ number_format($totalCash, 2) }} {{ number_format($totalBankSR, 2) }}{{ number_format($totalBankBDT, 2) }}{{ number_format($totalDue, 2) }} {{ number_format($totalDueCollection, 2) }}
@else

No data found for the selected criteria.

@endif