@extends('layouts.invoices.app') @section('title', 'Invoice #' . $invoice->invoice_number) @push('styles') @endpush @section('content')

INVOICE

@if($invoice->brand->brand_logo) {{ $invoice->brand->name }} Logo @endif

{{ $invoice->brand->name }}

Payment Status: {{ ucfirst($invoice->payment_status) }}

@if($invoice->transaction)

TrxId: {{ $invoice->transaction->trx_id }}

@endif

Invoice Details

INVOICE #{{ $invoice->invoice_number }}
Creation Date {{ $invoice->created_at->format('d F, Y h:i:s A') }}
Pay to {{ $invoice->brand->name }}

Customer Information

Name: {{ $invoice->customer_name }}

@if($invoice->customer_number)

Number: {{ $invoice->customer_number }}

@endif @if($invoice->customer_email)

Email: {{ $invoice->customer_email }}

@endif

Invoice Items

Description Qty Price Amount
{{ $invoice->description ?: 'Service/Product Charge' }} 1 {{ number_format($invoice->amount, 2) }}৳ {{ number_format($invoice->amount, 2) }}৳
Total Price {{ number_format($invoice->amount, 2) }}৳
{{-- Show Pay Now button only if the invoice is unpaid --}} @if($invoice->payment_status == 'unpaid') @php // Manually construct the localized URL for the payment page $paymentUrl = route('payment', ['brand_key' => $invoice->brand->brand_key, 'amount' => $invoice->amount, 'invoice_number' => $invoice->invoice_number], false); // `false` for relative URL $localizedPaymentUrl = \Mcamara\LaravelLocalization\Facades\LaravelLocalization::getLocalizedURL(app()->getLocale(), url($paymentUrl)); @endphp Pay Now @endif
@endsection