@extends('garage.layouts.app') @section('title', 'View Invoice') @section('content')
| Invoice Number: | {{ $invoice->invoice_number }} |
|---|---|
| Invoice Date: | {{ \Carbon\Carbon::parse($invoice->invoice_date)->format('M d, Y') }} |
| Due Date: | {{ $invoice->due_date ? \Carbon\Carbon::parse($invoice->due_date)->format('M d, Y') : '-' }} |
| Reference Number: | {{ $invoice->reference_number ?? '-' }} |
| Work Order: | @if($invoice->work_order_number) {{ $invoice->work_order_number }} @else - @endif |
| Estimate: | @if($invoice->estimate_number) {{ $invoice->estimate_number }} @else - @endif |
| Customer: | {{ $invoice->customer_name ?? '-' }} |
|---|---|
| Vehicle: | @if($invoice->vehicle_registration) {{ $invoice->vehicle_registration }} @if($invoice->vehicle_make && $invoice->vehicle_model) ({{ $invoice->vehicle_make }} {{ $invoice->vehicle_model }}) @endif @else - @endif |
| Status: | @php $statusColors = [ 'draft' => 'secondary', 'sent' => 'info', 'partial' => 'warning', 'paid' => 'success', 'overdue' => 'danger', 'cancelled' => 'dark' ]; $statusColor = $statusColors[$invoice->status] ?? 'secondary'; @endphp {{ ucfirst($invoice->status) }} |
| Subtotal: | PKR {{ number_format($invoice->subtotal, 2) }} |
| Tax Amount: | PKR {{ number_format($invoice->tax_amount, 2) }} |
| Discount: | PKR {{ number_format($invoice->discount_amount, 2) }} |
| Shipping Charges: | PKR {{ number_format($invoice->shipping_charges, 2) }} |
| Total Amount: | PKR {{ number_format($invoice->total_amount, 2) }} |
| Paid Amount: | PKR {{ number_format($invoice->paid_amount, 2) }} |
| Balance Amount: | PKR {{ number_format($invoice->balance_amount, 2) }} |
{{ nl2br(e($invoice->customer_notes)) }}
{{ nl2br(e($invoice->internal_notes)) }}
{{ nl2br(e($invoice->terms_conditions)) }}
| # | Item | Type | Qty | Unit Price | Discount | Tax % | Tax Amount | Total |
|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $item->part_name ?? $item->labor_name ?? $item->service_group_name ?? $item->description ?? '-' }}
@if($item->notes)
{{ $item->notes }}
@endif
|
{{ ucfirst(str_replace('_', ' ', $item->item_type)) }} | {{ $item->quantity }} | PKR {{ number_format($item->unit_price, 2) }} | PKR {{ number_format($item->discount_amount, 2) }} | {{ number_format($item->tax_rate, 2) }}% | PKR {{ number_format($item->tax_amount, 2) }} | PKR {{ number_format($item->total_price, 2) }} |
| Subtotal: | PKR {{ number_format($invoice->subtotal, 2) }} | |||||||
| Tax: | PKR {{ number_format($invoice->tax_amount, 2) }} | |||||||
| Discount: | PKR {{ number_format($invoice->discount_amount, 2) }} | |||||||
| Shipping Charges: | PKR {{ number_format($invoice->shipping_charges, 2) }} | |||||||
| Total: | PKR {{ number_format($invoice->total_amount, 2) }} | |||||||
| Paid: | PKR {{ number_format($invoice->paid_amount, 2) }} | |||||||
| Balance: | PKR {{ number_format($invoice->balance_amount, 2) }} | |||||||