@php $vatRate = $order->company->getVatRate(); $vatPercent = $vatRate * 100; $currencyConfig = config('currencies.available.' . $order->company->currency, []); $lang = $currencyConfig['language'] ?? 'en'; $translations = [ 'en' => [ 'invoice' => 'INVOICE', 'invoice_number' => 'Invoice Number:', 'date' => 'Date:', 'customer' => 'Customer:', 'payment_status' => 'Payment Status:', 'payment_method' => 'Payment Method:', 'due_date' => 'Due Date:', 'description' => 'Description', 'unit_price' => 'Unit Price', 'qty' => 'Qty', 'vat' => 'VAT', 'total' => 'Total', 'subtotal' => 'Subtotal:', 'discount' => 'Discount', 'grand_total' => 'TOTAL:', 'thank_you' => 'Thank you for your business!', 'generated_by' => 'Generated by Bilpleie System', ], 'no' => [ 'invoice' => 'FAKTURA', 'invoice_number' => 'Fakturanummer:', 'date' => 'Dato:', 'customer' => 'Kunde:', 'payment_status' => 'Betalingsstatus:', 'payment_method' => 'Betalingsmåte:', 'due_date' => 'Forfallsdato:', 'description' => 'Beskrivelse', 'unit_price' => 'Enhetspris', 'qty' => 'Antall', 'vat' => 'Mva', 'total' => 'Sum', 'subtotal' => 'Netto:', 'discount' => 'Rabatt', 'grand_total' => 'Å BETALE:', 'thank_you' => 'Takk for handelen!', 'generated_by' => 'Generert av Bilpleie System', ], ]; $t = $translations[$lang] ?? $translations['en']; @endphp {{ $t['invoice'] }} - {{ $order->order_number }}
@if($order->company->logo)
@endif
company->logo) style="text-align: center; margin-left: 0;" @endif>
{{ $order->company->name }}
@if($order->company->city || $order->company->country) {{ $order->company->city }}@if($order->company->city && $order->company->country), @endif{{ $order->company->country }}
@endif @if($order->company->email){{ $order->company->email }} | @endif @if($order->company->mobile){{ $order->company->mobile }}@endif
{{ $t['invoice'] }}
@if($order->payment_method->value === 'postpaid' && $order->postpaid_deadline) @else @endif
{{ $t['invoice_number'] }} {{ $order->order_number }} {{ $t['date'] }} {{ $order->created_at->format('d M Y') }}
{{ $t['customer'] }} {{ $order->customer->getFullName() }} {{ $t['payment_status'] }} {{ $order->payment_status->label() }}
{{ $t['payment_method'] }} {{ $order->payment_method->label() }}{{ $t['due_date'] }} {{ $order->postpaid_deadline->format('d M Y') }}
@foreach($order->vehicles as $vehicle) @endforeach
{{ $t['description'] }} {{ $t['unit_price'] }} {{ $t['qty'] }} {{ $t['vat'] }} {{ $t['total'] }}
@foreach($order->washCategories as $category) {{ $category->name }}@if(!$loop->last), @endif @endforeach
{{ $vehicle->getDisplayName() }} - {{ $vehicle->plate_number }}
{{ $order->company->formatPrice($vehicle->pivot->subtotal) }} 1 {{ $vatPercent }}% {{ $order->company->formatPrice($vehicle->pivot->subtotal + $vehicle->pivot->vat_value) }}
@if($order->discount_amount > 0) @endif
{{ $t['subtotal'] }} {{ $order->company->formatPrice($order->subtotal) }}
{{ $t['discount'] }} @if($order->coupon_code)({{ $order->coupon_code }})@endif: -{{ $order->company->formatPrice($order->discount_amount) }}
{{ $t['vat'] }} ({{ $vatPercent }}%): {{ $order->company->formatPrice($order->vat_value) }}
{{ $t['grand_total'] }} {{ $order->company->formatPrice($order->total) }}
Invoice QR Code