@extends('layouts.admin') @section('title', 'Branch Reports') @section('content')
@foreach (['bookings' => 'Bookings', 'sales' => 'Sales', 'paid' => 'Booking Paid', 'due' => 'Due', 'expenses' => 'Expenses', 'cash_balance' => 'Cash Balance', 'staff' => 'Staff', 'documents' => 'Documents'] as $key => $label)
{{ $label }}

{{ is_numeric($summary[$key]) && !in_array($key, ['bookings', 'staff', 'documents']) ? number_format($summary[$key], 2) : $summary[$key] }}

@endforeach
Branch-wise Bookings
@foreach ($bookingRows as $row) @endforeach
Date Branch Booking Customer Net Paid Due
{{ optional($row->booking_date)->format('d M Y') }} {{ $row->branch?->name ?: '-' }} {{ $row->booking_no }} {{ $row->customer?->full_name }} {{ number_format($row->net_amount, 2) }} {{ number_format($row->paid_amount, 2) }} {{ number_format($row->due_amount, 2) }}
Branch-wise Expenses
@foreach ($expenseRows as $row) @endforeach
Date Branch No Category Amount
{{ optional($row->expense_date)->format('d M Y') }} {{ $row->branch?->name ?: '-' }} {{ $row->expense_no }} {{ $row->category }} {{ number_format($row->amount, 2) }}
Branch-wise Staff
@foreach ($staffRows as $row) @endforeach
Code Name Branch Designation Status
{{ $row->employee_code }} {{ $row->name }} {{ $row->branchOffice?->name ?: $row->branch }} {{ $row->designation }} {{ $row->is_active ? 'Active' : 'Inactive' }}
Branch-wise Inventory/Documents
@foreach ($documentRows as $row) @endforeach
Branch Customer Type Name Expiry
{{ $row->branch?->name ?: '-' }} {{ $row->customer?->full_name }} {{ $row->document_type }} {{ $row->document_name }} {{ optional($row->expiry_date)->format('d M Y') ?: '-' }}
@endsection