@extends('layouts.dashboard.superadminapp') @section('title', 'Receivable Details - ' . $invoice->invoice_no) @section('styles') @endsection @section('content')

Invoice: {{ $invoice->invoice_no }}

@php $status = $balance <= 0 ? 'paid' : ($totalPaid > 0 ? 'partial' : 'pending'); @endphp {{ ucfirst($status) }}
Invoice Details
Invoice Number
{{ $invoice->invoice_no }}
Invoice Date
{{ \Carbon\Carbon::parse($invoice->invoice_date)->format('d M Y') }}
Buyer Order No
{{ $invoice->buyer_order_no ?? 'N/A' }}
Payment Terms
{{ $invoice->terms_payment ?? 'N/A' }}
Delivery Note
{{ $invoice->delivery_note ?? 'N/A' }}
Customer Details
Customer Name
{{ $invoice->company->company_name ?? 'N/A' }}
Phone
{{ $invoice->phone ?? $invoice->company->phone ?? 'N/A' }}
Email
{{ $invoice->email ?? $invoice->company->email ?? 'N/A' }}
GSTN
{{ $invoice->gst ?? $invoice->company->gstn ?? 'N/A' }}
Address
{{ $invoice->address ?? 'N/A' }}
Amount Summary
Taxable Value ₹{{ number_format($invoice->taxable_value ?? 0, 2) }}
SGST ₹{{ number_format($invoice->sgst ?? 0, 2) }}
CGST ₹{{ number_format($invoice->cgst ?? 0, 2) }}
IGST ₹{{ number_format($invoice->igst ?? 0, 2) }}
Total Amount ₹{{ number_format($invoice->total_amount ?? 0, 2) }}
Amount Received ₹{{ number_format($totalPaid, 2) }}
Balance Due ₹{{ number_format($balance, 2) }}
@if($balance > 0)
Record Payment
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
@csrf
Max: ₹{{ number_format($balance, 2) }}
@endif
@if($paymentHistory->count() > 0)
Payment History
@foreach($paymentHistory as $payment) @endforeach
Payment No Date Method Reference Amount Notes
{{ $payment->payment_no }} {{ \Carbon\Carbon::parse($payment->payment_date)->format('d M Y') }} {{ $payment->payment_method ?? '-' }} {{ $payment->reference_no ?? '-' }} ₹{{ number_format($payment->payment_amount, 2) }} {{ $payment->notes ?? '-' }}
Total Received: ₹{{ number_format($totalPaid, 2) }}
@endif @if($invoice->items && $invoice->items->count() > 0)
Invoice Items
@foreach($invoice->items as $index => $item) @endforeach
# Description HSN/SAC Qty Rate Amount
{{ $index + 1 }} {{ $item->description ?? $item->item_name ?? 'N/A' }} {{ $item->hsn_code ?? '-' }} {{ $item->quantity ?? 0 }} ₹{{ number_format($item->rate ?? $item->unit_price ?? 0, 2) }} ₹{{ number_format($item->amount ?? 0, 2) }}
@endif @endsection