@extends('layouts.portal') @php $isEdit = $document->exists; $quickPaymentMode = old( 'quick_payment_mode', $document->quick_payment_method_id !== null ? 'method' : ($document->quick_paid_by_person_id !== null ? 'employee' : ($isEdit ? null : 'method')), ); @endphp @section('title', $isEdit ? __('Edit supplier invoice') : __('New supplier invoice')) @push('styles') @include('accounting.journal._styles') @endpush @section('content')
@include('partials.portal-header')

{{ $isEdit ? __('Edit supplier invoice') : __('New supplier invoice') }} @if($isEdit){{ $document->document_number }}@endif

{{ __('Save the draft now, then post it when it is ready to become a true invoice.') }}

@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @if($isEdit) @method('PUT') @endif
{{ __('Invoice header') }}
{{ __('Immediate payment (optional)') }}
{{ __('Lines') }}
@php $showAllAccounts = auth()->user()?->can('use-all-purchase-accounts') && ($concepts->isEmpty() || (bool) old('show_all_accounts') || collect($initialLines)->contains(fn (array $line): bool => ($line['line_type'] ?? null) === 'account' && blank($line['purchase_concept_id'] ?? null) && filled($line['account_id'] ?? null))); @endphp
{{ __('Set all concept lines to:') }}
@can('use-all-purchase-accounts')
@endcan
{{ __('Item lines resolve their linked accounts from the item first, then from the category tree.') }}
# {{ __('Line type') }} {{ __('Item / account') }} {{ __('Description') }} {{ __('Quantity') }} {{ __('Unit') }} {{ __('Unit price') }} {{ __('Discount %') }} {{ __('Project') }} {{ __('Shelf / location') }} {{ __('Lot / expiry') }} {{ __('Total') }}
{{ __('Total') }} 0.00
@endsection