@extends('layouts.finance') @section('title', 'Client Invoices') @section('subtitle', 'Work billed to clients — received via a bank credit in Transactions') @section('content') @if($summary->isNotEmpty())

Totals

@foreach($summary as $row)
{{ $row->currency }} Collected
{{ number_format((float) $row->collected, 2) }}
{{ $row->currency }} Outstanding
{{ number_format((float) $row->outstanding, 2) }}
@endforeach
@endif

Invoices

+ New Invoice
@forelse($invoices as $invoice) @empty @endforelse
Invoice Client Work Issued Due Amount Status
{{ $invoice->invoice_number }} @if($invoice->client) {{ $invoice->client->name }} @else {{ $invoice->client_name }} @endif {{ $invoice->productSummary() }} {{ optional($invoice->issue_date)->format('d M Y') }} {{ optional($invoice->due_date)->format('d M Y') }} {{ $invoice->currency }} {{ number_format($invoice->total(), 2) }} @if($invoice->status === 'paid') Paid {{ optional($invoice->paid_at)->format('d M Y') }} @else Unpaid @endif @if($invoice->status !== 'paid')
@csrf @method('DELETE')
@endif
No client invoices yet.

To receive an invoice: go to Transactions → pick the bank account → Credit → category Client Invoice, then select the invoice. The amount is credited to the account and the invoice is marked paid.

{{ $invoices->links() }}
@endsection