@extends('layouts.app') @section('content')

@if(!empty($company['logo']) && file_exists(public_path('storage/' . $company['logo']))) {{ $company['name'] }} @else

{{ $company['name'] }}

@endif

{{ $company['address'] }}
Email: {{ $company['email'] }} | Phone: {{ $company['phone'] }}
@if(!empty($company['gstin'])) GSTIN: {{ $company['gstin'] }} @endif

TAX INVOICE

#{{ $invoice->invoice_no }}

PAID
Billed To
{{ $invoice->customer_name }}

@if($invoice->customer_phone) Phone: {{ $invoice->customer_phone }}
@endif @if($invoice->customer_email) Email: {{ $invoice->customer_email }}
@endif @if($invoice->customer_address || $invoice->customer_city) Address: {{ $invoice->customer_address ? $invoice->customer_address . ', ' : '' }}{{ $invoice->customer_city }}
@endif Country: {{ $invoice->customer_country ?? 'India' }}

Payment Details

Invoice Date: {{ $invoice->invoice_date->format('d M, Y') }}
Payment Method: {{ strtoupper($invoice->payment_method) }}
@if($invoice->paid_at) Paid At: {{ $invoice->paid_at->format('d M, Y h:i A') }}
@endif @if($invoice->razorpay_payment_id) Payment ID: {{ $invoice->razorpay_payment_id }}
@endif Invoice Type: {{ ucwords(str_replace('_', ' ', $invoice->invoice_type)) }}

@php $items = $invoice->items ?? []; @endphp @forelse($items as $idx => $item) @empty @endforelse
# ITEM & DESCRIPTION QTY AMOUNT (INR)
{{ $idx + 1 }}
{{ $item['name'] ?? 'Item' }}
@if(!empty($item['description'])) {{ $item['description'] }} @endif
{{ $item['quantity'] ?? 1 }} ₹ {{ number_format((float)($item['amount'] ?? 0), 2) }}
1 {{ ucwords(str_replace('_', ' ', $invoice->invoice_type)) }} Service 1 ₹ {{ number_format((float)$invoice->subtotal_amount, 2) }}
Subtotal: ₹ {{ number_format((float)$invoice->subtotal_amount, 2) }}
Subtotal: ₹ {{ number_format((float)$invoice->subtotal_amount, 2) }}
@if($invoice->discount_amount > 0)
Discount {{ $invoice->coupon_code ? "({$invoice->coupon_code})" : '' }}: - ₹ {{ number_format((float)$invoice->discount_amount, 2) }}
@endif @if($invoice->tax_amount > 0)
{{ $invoice->tax_name ?? 'Tax' }} ({{ number_format((float)$invoice->tax_rate, 2) }}%): ₹ {{ number_format((float)$invoice->tax_amount, 2) }}
@endif @if($invoice->platform_fee > 0)
Platform Fee: ₹ {{ number_format((float)$invoice->platform_fee, 2) }}
@endif
Total Paid: ₹ {{ number_format((float)$invoice->total_amount, 2) }}

This is a computer-generated invoice and requires no physical signature.

@endsection