@extends('portal.layout') @section('title', 'Dashboard') @section('content')

Welcome, {{ $customer->name }}

Here's a summary of your account

Total Invoices

{{ $totalSales }}

Total Spent

{{ number_format($totalSpent, 2) }}

Total Due

{{ number_format($totalDue, 2) }}

Recent Invoices

@if($recentSales->count())
@foreach($recentSales as $sale) @endforeach
Invoice Date Total Paid Status
{{ $sale->invoice_no }} {{ displayDate($sale->created_at) }} {{ number_format($sale->total_amount, 2) }} {{ number_format($sale->paid_amount, 2) }} @if($sale->payment_status === 'paid') Paid @elseif($sale->payment_status === 'partial') Partial @else Unpaid @endif View @if($gatewayEnabled && $sale->payment_status !== 'paid') Pay @endif
@else

No invoices found.

@endif
@endsection