Branch Statement

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

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 }}

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

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

@endif

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

@if($records->isNotEmpty()) @if(!$isBranchAdmin) @endif
SummaryTotalToday
Sales{{ number_format($totalSales, 2) }}{{ number_format($todaySales, 2) }}
Cash (SR){{ number_format($totalCash, 2) }}{{ number_format($todayCash, 2) }}
Bank (SR){{ number_format($totalBank, 2) }}{{ number_format($todayBank, 2) }}
Due Collection{{ number_format($totalDueCollection, 2) }}{{ number_format($todayDueCollection, 2) }}
Due{{ number_format($totalDue, 2) }}{{ number_format($todayDue, 2) }}
Refund{{ number_format($totalRefund, 2) }}{{ number_format($todayRefund, 2) }}
Agent Commission{{ number_format($totalAgentCommissionPayable, 2) }}{{ number_format($todayAgentCommissionPaid, 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 Invoice NoBranchCustomer ID Service Rate Cash Bank Due Due Coll. Comm. Profit
{{ \Carbon\Carbon::parse($record['date'])->format('Y-m-d H:i') }}{{ $record->delivery_date ? \Carbon\Carbon::parse($record->delivery_date)->format('Y-m-d') : 'N/A' }}{{ Str::limit(Str::of($record['invoice_no'])->replace('-', ''), 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'], 2) }} {{ number_format($record['due'], 2) }} {{ number_format($record['due_collection'], 2) }}{{ number_format($record['agent_commission_payable'] ?? 0, 2) }} {{ number_format($record['profit'] ?? 0, 2) }}
Period Totals: {{ number_format($totalSales, 2) }} {{ number_format($totalCash, 2) }} {{ number_format($totalBank, 2) }} {{ number_format($totalDue, 2) }} {{ number_format($totalDueCollection, 2) }} {{ number_format($totalAgentCommissionPayable, 2) }} {{ number_format($totalProfit, 2) }}Period Totals: {{ number_format($totalSales, 2) }} {{ number_format($totalCash, 2) }} {{ number_format($totalBank, 2) }} {{ number_format($totalDue, 2) }} {{ number_format($totalDueCollection, 2) }}
@else

No data found.

@endif