{{ __('Sales Invoice') }} {{ $document->document_number }}
{{ __(ucfirst($document->status)) }}
{{ __('New sale') }}
{{ __('Back to list') }}
@if($document->isPosted())
@endif
{{ session('success') }}
@endif
@if ($errors->any())
-
@foreach ($errors->all() as $error)
- {{ $error }} @endforeach
{{ __('Customer') }}
{{ $document->person?->first_name }} {{ $document->person?->last_name }}{{ __('Date') }}
{{ $document->document_date->format('Y-m-d') }}{{ __('Payment') }}
{{ $document->quickPaymentMethod?->name ?? __('Credit') }}{{ $document->paymentTerm ? ' · '.$document->paymentTerm->name : '' }}{{ __('Due date') }}
{{ $document->due_date?->format('Y-m-d') ?? '—' }}{{ __('Warehouse') }}
{{ $warehouse ? $warehouse->code.' — '.$warehouse->name : '—' }}{{ __('Paid') }}
{{ number_format((float) $document->amount_paid, 2) }}{{ __('Reference') }}
{{ $document->reference }}{{ __('Journal entry') }}
{{ $document->journalEntry->display_number }}
{{ __('Notes') }}
{{ $document->notes }}| # | {{ __('Product / concept') }} | {{ __('Lot / expiry') }} | {{ __('Quantity') }} | {{ __('Unit price') }} | {{ __('Discount %') }} | {{ __('Total') }} |
|---|---|---|---|---|---|---|
| {{ $line->line_number }} |
@if($line->line_type === 'item')
{{ $line->item?->name }} {{ $line->item?->sku }}
@else
{{ $line->salesConcept?->name ?? $line->description }}
@endif
@if($line->description && $line->description !== $line->item?->name && $line->description !== $line->salesConcept?->name)
{{ $line->description }}
@endif
|
{{ $lot?->lot_number ?? $line->lot_number ?? '—' }} @if($lot?->expires_on) {{ __('Expires') }} {{ substr((string) $lot->expires_on, 0, 10) }} @endif | {{ rtrim(rtrim(number_format((float) $line->quantity, 6, '.', ''), '0'), '.') }} {{ $line->unit?->code }} | {{ number_format((float) $line->unit_price, 2) }} | {{ number_format((float) $line->discount_pct, 2) }} | {{ number_format((float) $line->line_total, 2) }} |
| {{ __('Total') }} | {{ number_format((float) $document->total, 2) }} | |||||