{{-- Header --}}
{{-- Company Logo --}} @php // Get logo from settings or fallback $logo = $settings['company_logo'] ?? 'assets/template/images/logo.jpg'; // Full path $logoPath = public_path($logo); // Final fallback if file missing if (!file_exists($logoPath)) { $logoPath = public_path('assets/template/images/logo.jpg'); } @endphp @if(file_exists($logoPath)) Logo @endif
{{ $settings['company_name'] ?? 'Shanmuga Feed Mills' }}
{{ $settings['building_address'] ?? '4/127-4, First Floor, VM Complex, Salem Road, Namakkal, Tamil Nadu - 637001' }}
Phone: {{ $settings['phone_number'] ?? '7395830836' }} | Email: {{ $settings['company_email'] ?? 'annapurnacattlefeeds@gmail.com' }}
GSTIN: {{ $settings['gst_number'] ?? '33AYWPS9138F1ZQ' }}
INVOICE
Invoice No: #INV-{{ str_pad($order->id, 6, '0', STR_PAD_LEFT) }}
Order Date: {{ $order->created_at->format('d M Y, h:i A') }}
@if($order->delivered_at) Delivered At: {{ $order->delivered_at->format('d M Y, h:i A') }}
@endif Status: {{ ucfirst(str_replace('_', ' ', $order->order_status)) }}
{{-- Customer & Address --}}
Bill To
Name: {{ $order->user->name }}
Email: {{ $order->user->email }}
Phone: {{ $order->user->mobile ?? '-' }}
Delivery Address
{{ $order->shippingAddress->address_line1 ?? '' }}
{{ $order->shippingAddress->panchayat ?? '' }}
{{ $order->shippingAddress->taluk ?? '' }}, {{ $order->shippingAddress->district ?? '' }} - {{ $order->shippingAddress->pincode ?? '' }}
{{-- Order Items --}}
Order Items
@foreach($order->items as $index => $item) @endforeach
# Product Pack Size Qty Price Discount Tax Total
{{ $index + 1 }} {{ $item->product_name }} {{ $item->pack_size_name }} {{ $item->quantity }} ₹{{ number_format($item->price, 2) }} ₹{{ number_format($item->discount_amount, 2) }} ₹{{ number_format($item->tax_amount, 2) }} ₹{{ number_format($item->total_price, 2) }}
{{-- Totals --}}
Subtotal: ₹{{ number_format($order->subtotal, 2) }}
Discount: - ₹{{ number_format($order->discount_amount, 2) }}
Tax: + ₹{{ number_format($order->gst_amount, 2) }}
Grand Total: ₹{{ number_format($order->total_amount, 2) }}
{{-- Footer --}}