|
{{ $sno++ }}
|
{{ $invoice->store->store ?? 'N/A' }} |
{{-- Name (Assuming relationship with customer or store) --}}
{{ $invoice->customer->name ?? 'N/A' }} |
{{-- Mobile --}}
{{ optional($invoice->customer)->mobile ?? 'N/A' }}
|
{{-- Email --}}
{{ optional($invoice->customer)->email ?? 'N/A' }}
|
{{ $invoice->category->category ?? 'N/A' }} |
{{-- Joining / Created Date --}}
{{ $invoice->created_at->format('d-m-Y') }} |
{{-- Status --}}
@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 }}
|
{{-- Action --}}
|
@endforeach