@extends('layouts.portal') @section('title', 'Invoice ' . $invoice->invoice_number) @section('page_title', 'Invoice Details') @section('page_subtitle', $invoice->invoice_number) @section('sidebar') @include('client.partials.sidebar', ['active' => 'invoices']) @endsection @section('content')

Invoice #{{ $invoice->invoice_number }}

{{ ucfirst(str_replace('_', ' ', $invoice->type)) }}

@if($invoice->will)

For Will #{{ $invoice->will->id }}

@if($invoice->will->package)

Package: {{ $invoice->will->package->name }}

@endif @endif @if($invoice->package)

Package: {{ $invoice->package->name }}

@endif
{{ ucfirst($invoice->status) }}

Invoice Date

{{ $invoice->invoice_date->format('d M Y') }}

Due Date

{{ $invoice->due_date->format('d M Y') }}

@if($invoice->paid_date)

Paid Date

{{ $invoice->paid_date->format('d M Y') }}

@endif @if($invoice->payment_method)

Payment Method

{{ ucfirst(str_replace('_', ' ', $invoice->payment_method)) }}

@endif

Invoice Details

Subtotal RM{{ number_format($invoice->amount, 2) }}
@if($invoice->discount > 0)
Discount - RM{{ number_format($invoice->discount, 2) }}
@endif @if($invoice->tax > 0)
Tax RM{{ number_format($invoice->tax, 2) }}
@endif
Total RM{{ number_format($invoice->total_amount, 2) }}
@if($invoice->notes)

Notes

{{ $invoice->notes }}

@endif @if($invoice->status === 'pending') @endif
@endsection