@extends('layouts.app') @section('title', $sale->invoice_number) @section('page-title', 'Sale Invoice') @section('content')
StockPilot
{{ $sale->branch?->name ?? 'Main Store' }}
@if($sale->branch?->address)
{{ $sale->branch->address }}
@endif @if($sale->branch?->phone)
{{ $sale->branch->phone }}
@endif
INVOICE
{{ $sale->invoice_number }}
{{ $sale->sale_date->format('M j, Y \a\t H:i') }}
Bill To
{{ $sale->customer?->name ?? 'Walk-in Customer' }}
@if($sale->customer?->phone)
{{ $sale->customer->phone }}
@endif
Payment
{{ ucfirst($sale->payment_method) }}
Processed by {{ $sale->user?->name }}
@foreach($sale->items as $item) @endforeach @if($sale->discount > 0) @endif
Item Qty Unit Price Subtotal
{{ $item->product?->name }}
{{ $item->product?->sku }}
{{ number_format($item->quantity) }} ${{ number_format($item->unit_price_usd, 4) }} ${{ number_format($item->subtotal_usd, 2) }}
Discount-LRD {{ number_format($sale->discount, 2) }}
TOTAL (USD)${{ number_format($sale->total_usd, 2) }}
TOTAL (LRD)LRD {{ number_format($sale->total_local, 2) }}
@if($sale->notes)
Notes: {{ $sale->notes }}
@endif
Summary
Items{{ $sale->items->sum('quantity') }} units ({{ $sale->items->count() }} SKUs)
Branch{{ $sale->branch?->name ?? '—' }}
Processed by{{ $sale->user?->name }}
Total${{ number_format($sale->total_usd, 2) }}
LRD {{ number_format($sale->total_local, 2) }}
@endsection