@php $invoice = \App\Support\InvoiceSettings::from($cachedSettings); $invoiceNumber = \App\Support\InvoiceSettings::number($invoice, $sale->id); @endphp {{ __('dashboard.invoice') }}
@if ($invoice['logo_path']) @endif
{{ $invoice['company_name'] }}
@if ($invoice['subtitle'])
{{ $invoice['subtitle'] }}
@endif @if ($invoice['show_address'] && $invoice['address'])
{{ $invoice['address'] }}
@endif @if ($invoice['phone'])
{{ __('dashboard.phone') }}: {{ $invoice['phone'] }}
@endif @if ($invoice['email'])
{{ __('dashboard.email') }}: {{ $invoice['email'] }}
@endif @if ($invoice['show_tax_number'] && $invoice['tax_number'])
{{ __('dashboard.tax_number') }}: {{ $invoice['tax_number'] }}
@endif
@if ($sale->customer) @if ($sale->customer->address) @endif @if ($sale->customer->governorate) @endif @endif
{{ __('dashboard.invoice') }} #: {{ $invoiceNumber }} {{ __('dashboard.date') }}: {{ $sale->created_at->format('Y-m-d') }}
{{ __('dashboard.customer') }}: {{ $sale->customer->name }}
{{ __('dashboard.address') }}: {{ $sale->customer->address }}
{{ __('dashboard.governorate') }}: {{ $sale->customer->governorate }}
{{ __('dashboard.payment_method') }}: {{ __("dashboard.payment_method_{$sale->payment_method}") }}
{{ __('dashboard.payment_status') }}: {{ __("dashboard.payment_status_{$sale->payment_status}") }}
@foreach ($sale->saleProducts as $product) @endforeach
{{ __('dashboard.product') }} {{ __('dashboard.qty') }} {{ __('dashboard.price') }} {{ __('dashboard.discount') }} {{ __('dashboard.total') }}
{{ $product->product->name }} {{ $product->quantity }} {{ $product->price }} {{ $product->product_discount ?? '0.00' }} {{ $product->final_line_price }}
@if ($sale->discount > 0) @endif @if ($sale->total_taxes > 0) @endif @if ($sale->total_additional_expenses > 0) @endif @if ($sale->shipping_cost > 0) @endif
{{ __('dashboard.products_total_before_discount') }}: {{ $sale->products_total_before_discount }}
{{ __('dashboard.products_total_after_discount') }}: {{ $sale->products_total_after_discount }}
{{ __('dashboard.discount') }}: {{ $sale->discount }}
{{ __('dashboard.total_taxes') }}: {{ $sale->total_taxes }}
{{ __('dashboard.total_additional_expenses') }}: {{ $sale->total_additional_expenses }}
{{ __('dashboard.shipping_cost') }}: {{ $sale->shipping_cost }}
{{ __('dashboard.final_total') }}: {{ $sale->final_total }}
@if ($invoice['terms'])

{{ $invoice['terms'] }}

@endif @if ($invoice['footer'])

{{ $invoice['footer'] }}

@endif