@include('header') @php $permissions = json_decode(session('permissions'), true); $userType = session('user_type'); @endphp
Invoice Information

Invoice

@php $sno = 1; @endphp @foreach($invoices as $invoice) {{-- Name (Assuming relationship with customer or store) --}} {{-- Mobile --}} {{-- Email --}} {{-- Joining / Created Date --}} {{-- Status --}} {{-- Action --}} @endforeach
Sl.No Store Name Mobile Email Category Ordered Date Status Action
{{ $sno++ }} {{ $invoice->store->store ?? 'N/A' }}{{ $invoice->customer->name ?? 'N/A' }} {{ optional($invoice->customer)->mobile ?? 'N/A' }} {{ optional($invoice->customer)->email ?? 'N/A' }} {{ $invoice->category->category ?? 'N/A' }}{{ $invoice->created_at->format('d-m-Y') }} @php $total = floatval($invoice->total_amount); $paid = floatval($invoice->advance_paid); if ($paid >= $total && $total > 0) { $status = 'Paid'; $badge = 'success'; } elseif ($paid > 0 && $paid < $total) { $status='Partially Paid' ; $badge='warning' ; } else { $status='Not Paid' ; $badge='danger' ; } @endphp {{ $status }}
@include('footer')