@extends('layouts.syndron.app') @section('content') {{ __('Pre Invoices List') }} {{ __(key: 'Pre invoice details') }}
{{ __('Customer Information') }}

{{ __('Customer Name') }}: {{ $preInvoice->customer_name }}

{{ __('Company Name') }}: {{ $preInvoice->company_name }}

{{ __('Email') }}: {{ $preInvoice->email }}

{{ __('Phone') }}: {{ $preInvoice->phone }}

{{ __('Address') }}: {{ $preInvoice->address }}

{{ __('City') }}: {{ $preInvoice->city }} | {{ __('Postal Code') }}: {{ $preInvoice->postal_code }}

{{ __('Products / Items') }}
@foreach($preInvoice->items as $item) @endforeach
{{ __('Product') }} {{ __('SKU') }} {{ __('Qty') }} {{ __('Unit') }} {{ __('Estimated Price') }} {{ __('Subtotal') }} {{ __('View Link') }}
{{ $item->name }} @if($item->description)
{{ $item->description }} @endif
{{ $item->sku }} {{ $item->qty }} {{ $item->unit }} {{ number_format($item->estimated_price) }} {{ number_format($item->subtotal) }} {{ __('visit') }}
@if($preInvoice->quotes->count() > 0)
{{ __('Supplier Quotes') }}
@if (auth()->user()->isAdmin()) @foreach($preInvoice->quotes as $quote)
{{ __('Supplier') }}: {{ $quote->supplier->name ?? 'N/A' }}
{{ __(ucfirst($quote->status)) }}
{{ __('Total') }}: {{ $quote->currency }} {{ number_format($quote->total) }}
{{ __('Calculated') }}: {{ $quote->currency }} {{ number_format($quote->total_calculated) }}
@if($quote->items->count() > 0)
@foreach($quote->items as $quoteItem) @endforeach
{{ __('Product') }} {{ __('Qty') }} {{ __('Price') }} {{ __('Delivery Time') }} {{ __('Subtotal') }}
{{ $quoteItem->preInvoiceItem->name ?? 'N/A' }} {{ $quoteItem->qty }} {{ $quote->currency }} {{ number_format($quoteItem->price) }} {{ $quoteItem->delivery_time ?? 'N/A' }} {{ $quote->currency }} {{ number_format($quoteItem->subtotal) }}
@endif @if($quote->terms || $quote->notes)
@if($quote->terms)
{{ __('Terms') }}:

{{ $quote->terms }}

@endif @if($quote->notes)
{{ __('Notes') }}:

{{ $quote->notes }}

@endif
@endif
@endforeach @else @php $quote = $preInvoice->quotes->where('supplier_id', auth()->user()->shop->id)->first(); @endphp @if ($quote != null)
{{ __('Supplier') }}: {{ $quote->supplier->name ?? 'N/A' }}
{{ __(ucfirst($quote->status)) }}
{{ __('Total') }}: {{ $quote->currency }} {{ number_format($quote->total) }}
{{ __('Calculated') }}: {{ $quote->currency }} {{ number_format($quote->total_calculated) }}
@if($quote->items->count() > 0)
@foreach($quote->items as $quoteItem) @endforeach
{{ __('Product') }} {{ __('Qty') }} {{ __('Price') }} {{ __('Delivery Time') }} {{ __('Subtotal') }}
{{ $quoteItem->preInvoiceItem->name ?? 'N/A' }} {{ $quoteItem->qty }} {{ $quote->currency }} {{ number_format($quoteItem->price) }} {{ $quoteItem->delivery_time ?? 'N/A' }} {{ $quote->currency }} {{ number_format($quoteItem->subtotal) }}
@endif @if($quote->terms || $quote->notes)
@if($quote->terms)
{{ __('Terms') }}:

{{ $quote->terms }}

@endif @if($quote->notes)
{{ __('Notes') }}:

{{ $quote->notes }}

@endif
@endif
@else
{{ __('you did not submit any quote') }} {{ __('submit a new quote') }}
@endif @endif
@else
{{ __('No quotes available for this pre-invoice.') }} {{ __('submit a new quote') }}
@endif @if($preInvoice->notes)
{{ __('Additional Notes') }}

{{ $preInvoice->notes }}

@endif @endsection