diff --git a/resources/views/pdf/invoice.blade.php b/resources/views/pdf/invoice.blade.php index 58cf50755..7f9d877c9 100644 --- a/resources/views/pdf/invoice.blade.php +++ b/resources/views/pdf/invoice.blade.php @@ -3,153 +3,347 @@
-|
- {{ __('invoices.issued_to') }} - {{ $invoice->user->name }} - @foreach($invoice->user->properties()->with('parent_property')->whereHas('parent_property', function - ($query) { - $query->where('show_on_invoice', true); - })->get() as $property) - {{ $property->value }} - @endforeach + |
+ @if(config('settings.logo'))
+
+ {{ __('invoices.invoice', ['id' => $invoice->number]) }}
+
+
|
-
- {{ strtoupper(__('invoices.bill_to')) }} - {{ config('settings.company_name') }} - {{ config('settings.company_address') }} {{ config('settings.company_address2') }} - {{ config('settings.company_zip') }} {{ config('settings.company_city') }} - {{ config('settings.company_state') }} {{ config('settings.company_country') }} - {{ config('settings.company_tax_id') }} - {{ config('settings.company_id') }} + | + + {{ $invoice->status == 'paid' ? __('invoices.paid') : __('invoices.payment_pending') }} + |
{{ __('invoices.invoice_date') }}: {{ $invoice->created_at->format('d/m/Y') }}
-{{ __('invoices.invoice_no') }}: {{ $invoice->number }}
-|
+ {{ __('invoices.issued_to') }}
+ {{ $invoice->user->properties->where('parent_property.name', 'Company Name (Include Registration Number)')->first()?->value }}
+
+ Attention: {{ $invoice->user->first_name }} {{ $invoice->user->last_name }}
+ + {{ $invoice->user->properties->where('parent_property.name', 'Property Number/House Name')->first()?->value }} + {{ $invoice->user->properties->where('parent_property.name', 'Street Name')->first()?->value }} + {{ $invoice->user->properties->where('parent_property.name', 'City')->first()?->value }} + {{ $invoice->user->properties->where('parent_property.name', 'State/Province/Region')->first()?->value }} + {{ $invoice->user->properties->where('parent_property.name', 'Full Postal Code')->first()?->value }} + {{ $invoice->user->properties->where('parent_property.name', 'Country')->first()?->value }} + |
+
+ {{ __('invoices.bill_to') }}
+ {{ config('settings.company_name') }}
+
+ {{ config('settings.company_address') }} {{ config('settings.company_address2') }}
+ + {{ config('settings.company_city') }} {{ config('settings.company_state') }} {{ config('settings.company_zip') }} + {{ \Locale::getDisplayRegion('-' . config('settings.company_country')) }} + |
+
+ Invoice Details
+
|
+
| {{ __('invoices.item') }} | -{{ __('invoices.quantity') }} | -{{ __('invoices.unit_price') }} | +{{ __('invoices.price') }} | +{{ __('invoices.quantity') }} | {{ __('invoices.total') }} |
|---|---|---|---|---|---|
| {{ $item->description }} | -{{ $item->quantity }} | +{{ $item->description }} | {{ $item->formattedPrice }} | +{{ $item->quantity }} | {{ $item->formattedTotal }} |
| {{ __('invoices.subtotal') }} | +{{ $invoice->formattedTotal->format($invoice->formattedTotal->price - $invoice->formattedTotal->tax) }} | +
| {{ \App\Classes\Settings::tax()->name }} | +{{ $invoice->formattedTotal->formatted->tax }} | +
| {{ __('invoices.total') }} | +{{ $invoice->formattedTotal }} | +
| {{ __('invoices.date') }} | {{ __('invoices.transaction_id') }} | -{{ __('invoices.payment_date') }} | +{{ __('invoices.gateway') }} | {{ __('invoices.amount') }} | -{{ __('invoices.payment_method') }} |
|---|---|---|---|---|---|
| {{ $transaction->created_at->format('d M Y H:i') }} | {{ $transaction->transaction_id }} | -{{ $transaction->created_at->format('d/m/Y') }} | +{{ $transaction->gateway?->name }} | {{ $transaction->formattedAmount }} | -{{ $transaction->gateway ? $transaction->gateway->name : '' }} |