@php /** Editable invoice settings form — embeddable in a store tab or the standalone page. */ $settings = $settings ?? \App\Models\InvoiceSetting::forWorkspace((int) (auth()->user()->current_workspace_id ?? 0)); if (! isset($senders)) { $__ws = (int) (auth()->user()->current_workspace_id ?? 0); $senders = []; foreach (\App\Models\WaProviderConfig::where('workspace_id', $__ws)->where('provider', 'waba')->get() as $c) { $waLabel = trim((string) $c->phone_number) ?: trim((string) $c->display_label) ?: ('#'.$c->id); if ($c->phone_number && $c->display_label) $waLabel = $c->phone_number.' · '.$c->display_label; $senders[] = ['value' => 'waba:'.$c->id, 'label' => 'WABA · '.$waLabel]; } foreach (\App\Models\Device::where('workspace_id', $__ws)->get() as $d) { $num = trim(($d->country_code ? '+'.$d->country_code.' ' : '').$d->phone_number); $dLabel = $num ?: trim((string) $d->device_name) ?: ('#'.$d->id); if ($num && $d->device_name) $dLabel = $num.' · '.$d->device_name; $senders[] = ['value' => 'device:'.$d->id, 'label' => 'Unofficial · '.$dLabel]; } } $extra = is_array($settings->seller_extra_json) ? $settings->seller_extra_json : []; @endphp
@csrf
{{ __('Company details') }} {{ __('(prints on every invoice)') }}
{{ __('Extra fields') }}
@foreach ($extra as $ex)
@endforeach
{{ __('Logo & signature') }}
{{ __('Company logo') }} @if ($settings->logo_path)
@endif
{{ __('Signature image') }} @if ($settings->signature_path)
@endif
{{ __('Tax & numbering') }}

{{ __('A taxless order is issued as a Receipt (not a tax invoice) — set a tax rate at checkout for a proper tax invoice.') }}

{{ __('WhatsApp delivery') }}
{{ __('Invoice template') }} {{ $settings->template_status }}
{{ __('WABA is submitted to Meta for approval; Unofficial is ready instantly. Auto-send on WABA needs an approved template.') }}