@php $customer = $user; $profileStatus = app(\App\Services\Billing\FiscalProfileService::class)->status($customer); @endphp

{{ __('einvoicing.profile.title') }}

{{ __('einvoicing.profile.description') }}

{{ __('einvoicing.status.'.$profileStatus) }}
@csrf @method('PUT') @if(request('return_to')) @endif

{{ __('einvoicing.admin.identity') }}

@include('shared.select', ['name' => 'customer_type', 'label' => __('einvoicing.profile.type'), 'options' => ['individual' => __('einvoicing.profile.individual'), 'business' => __('einvoicing.profile.business'), 'association' => __('einvoicing.profile.association')], 'value' => old('customer_type', $customer->customer_type)])
@foreach(app(\App\Services\Billing\FiscalProfileExtensionRegistry::class)->views() as $extensionView) @include($extensionView, ['customer' => $customer, 'context' => 'front']) @endforeach
@include('shared.input', ['name' => 'legal_name', 'label' => __('einvoicing.profile.legal_name'), 'value' => old('legal_name', $customer->legal_name), 'optional' => true])
@include('shared.select', ['name' => 'tax_subject_status', 'label' => __('einvoicing.profile.tax_subject_status'), 'options' => ['unknown' => __('einvoicing.profile.tax_status_unknown'), 'non_taxable' => __('einvoicing.profile.tax_status_non_taxable'), 'taxable_not_vat_liable' => __('einvoicing.profile.tax_status_taxable_not_vat_liable'), 'vat_liable' => __('einvoicing.profile.tax_status_vat_liable')], 'value' => old('tax_subject_status', $customer->tax_subject_status ?? 'unknown'), 'help' => __('einvoicing.profile.tax_subject_status_help')])
@include('shared.input', ['name' => 'rna_number', 'label' => __('einvoicing.profile.rna_number'), 'value' => old('rna_number', $customer->rna_number), 'optional' => true])
@include('shared.input', ['name' => 'siren', 'label' => __('einvoicing.profile.siren'), 'value' => old('siren', $customer->siren), 'optional' => true])
@include('shared.input', ['name' => 'siret', 'label' => __('einvoicing.profile.siret'), 'value' => old('siret', $customer->siret), 'optional' => true])
@include('shared.input', ['name' => 'tax_registration_number', 'label' => __('einvoicing.profile.tax_registration_number'), 'value' => old('tax_registration_number', $customer->tax_registration_number), 'optional' => true])
@include('shared.input', ['name' => 'vat_number', 'label' => __('einvoicing.profile.vat_number'), 'value' => old('vat_number', $customer->vat_number), 'optional' => true])

{{ __('einvoicing.admin.address') }}

@include('shared.input', ['name' => 'address', 'label' => __('global.address'), 'value' => old('address', $customer->address)])
@include('shared.input', ['name' => 'address2', 'label' => __('global.address2'), 'value' => old('address2', $customer->address2), 'optional' => true])
@include('shared.input', ['name' => 'zipcode', 'label' => __('global.zip'), 'value' => old('zipcode', $customer->zipcode)])
@include('shared.input', ['name' => 'city', 'label' => __('global.city'), 'value' => old('city', $customer->city)])
@include('shared.input', ['name' => 'region', 'label' => __('global.region'), 'value' => old('region', $customer->region)])
@include('shared.select', ['name' => 'country', 'label' => __('global.country'), 'options' => $countries, 'value' => old('country', $customer->country)])
@include('shared.textarea', ['name' => 'billing_details', 'label' => __('einvoicing.profile.additional_details'), 'value' => old('billing_details', $customer->billing_details), 'help' => __('einvoicing.profile.additional_details_help'), 'optional' => true])