@extends('layouts.app') @section('title', 'Invoice '.$order->order_no) @section('content') @php $paid = $order->paid(); $due = $order->isCancelled() ? 0 : $order->due(); @endphp Back to order
{{ config('erp.company_name') }}
Invoice
{{ $order->order_no }}
@if ($order->isCancelled())Cancelled@endif
Bill to
{{ $order->client->name }}
@if ($order->client->billing_address)
{!! nl2br(e($order->client->billing_address)) !!}
@endif @if ($order->client->location())
{{ $order->client->location() }}
@endif @if ($order->client->phone)
{{ $order->client->phone }}
@endif @if ($order->client->tax_number)
Tax ID: {{ $order->client->tax_number }}
@endif
Ship to
{!! nl2br(e($order->shipping_address ?: ($order->client->shipping_address ?: $order->client->billing_address ?: $order->client->name))) !!}
Dates
Order date: {{ $order->order_date->format('d M Y') }}
@if ($order->delivery_date)
Delivery: {{ $order->delivery_date->format('d M Y') }}
@endif
Status: {{ $order->statusLabel() }}
@foreach ($order->items as $n => $i) @endforeach
#DesignMaterial · colourSizeQtyRateAmount
{{ $n + 1 }} {{ $n + 1 }}. {{ $i->design_name }} {{ collect([$i->material, $i->color])->filter()->join(' · ') ?: '—' }}
{{ $i->sizeText() ?: '—' }}@if ($i->area_sqft)
{{ number_format($i->area_sqft, 2) }} sq ft each
@endif
{{ rtrim(rtrim(number_format($i->quantity, 2), '0'), '.') }} pcs @if ($i->totalArea())
{{ number_format($i->totalArea(), 2) }} sq ft
@endif
{{ $i->rateText() }} {{ money($i->line_total) }}
Subtotal{{ money($order->subtotal) }}
@if ($order->discount > 0)
Discount−{{ money($order->discount) }}
@endif @if ($order->tax_amount > 0)
{{ config('erp.tax_label') }} ({{ $order->tax_percent + 0 }}%){{ money($order->tax_amount) }}
@endif
Total{{ money($order->total) }}
Paid{{ money($paid) }}
Balance due{{ money($due) }}
@if ($order->notes)
Notes
{!! nl2br(e($order->notes)) !!}
@endif

Thank you for your business.

@endsection