{{-- Header --}}
{{ __('Pre-Invoice Details') }} #{{ $preInvoice->id }}
{{-- Customer Info --}}
{{ __('Customer Information') }}
- {{ __('Customer Name') }}: {{ $preInvoice->customer_name ?? '-' }}
- {{ __('Company Name') }}: {{ $preInvoice->company_name ?? '-' }}
- {{ __('Phone') }}: {{ $preInvoice->phone ?? '-' }}
- {{ __('Email') }}: {{ $preInvoice->email ?? '-' }}
- {{ __('Address') }}: {{ $preInvoice->address ?? '-' }}
- {{ __('City') }}: {{ $preInvoice->city ?? '-' }}
- {{ __('Postal Code') }}: {{ $preInvoice->postal_code ?? '-' }}
{{ __('Status and Overview') }}
-
{{ __('Status') }}:
@php
$statusColors = [
'open' => 'bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300',
'closed' => 'bg-gray-100 text-gray-700 dark:bg-secondary/0.5 dark:text-gray-300',
'awarded' => 'bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300',
'cancelled' => 'bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300',
];
@endphp
{{ __($preInvoice->status) }}
-
{{ __('Paid') }}:
@if($preInvoice->is_paid)
{{ __('Yes') }} ({{ number_format($preInvoice->paid_amount) }} {{ __('Toman') }})
@else
{{ __('No') }}
@endif
- {{ __('Created At') }}: {{ verta($preInvoice->created_at)->format('Y/m/d H:i') }}
- {{ __('Notes') }}: {{ $preInvoice->notes ?? '-' }}
{{-- Items --}}
{{ __('Items List') }}
| # |
{{ __('Item Name') }} |
{{ __('Quantity') }} |
{{ __('Unit') }} |
{{ __('Description') }} |
{{ __('External Link') }} |
@foreach($preInvoice->items as $index => $item)
| {{ $index + 1 }} |
{{ $item->name }} |
{{ $item->qty }} |
{{ $item->unit ?? '-' }} |
{{ $item->description ?? '-' }} |
@if($item->external_url)
{{ __('View Link') }}
@else
-
@endif
|
@endforeach
{{-- Quotes Section --}}
@if($preInvoice->quotes->count())
{{ __('Supplier Quotes') }}
| # |
{{ __('Supplier') }} |
{{ __('Total') }} |
{{ __('Terms') }} |
{{ __('Status') }} |
{{ __('Date') }} |
{{ __('Actions') }} |
@foreach($preInvoice->quotes as $index => $quote)
| {{ $index + 1 }} |
{{ $quote->supplier->name ?? '—' }}
|
{{ number_format($quote->total) }} |
{{ Str::limit($quote->terms, 50) ?? '-' }} |
{{ __($quote->status) ?? $quote->status }}
|
{{ verta($quote->created_at)->format('Y/m/d') }} |
@if ($preInvoice->selected_quote_id !== $quote->id)
@else
{{ __('Selected') }}
@endif
|
@endforeach
@else
{{ __('No quotes have been submitted yet.') }}
@endif
{{-- comparison table --}}
@if($preInvoice->quotes->count())
@php
$compression = $preInvoice->createCompressionQuote()
@endphp
{{ __('Supplier Quotes Compression') }}
@foreach ($compression['headers'] as $h)
| {{ $h['name'] }} |
@endforeach
{{ __('Products / Items') }} |
@foreach ($compression['rows'] as $row)
@foreach ($row['sellers'] as $cell)
|
@if(!is_null($cell['price']))
{{ number_format($cell['price']) }}
@else
-
@endif
|
@endforeach
{{ $row['item_name'] }} |
@endforeach
@else
{{ __('No quotes have been submitted yet.') }}
@endif
@endif