@extends('admin.layouts.app') @section('title', __('admin.clients.edit_client') . ': ' . $client->full_name) @section('content') @if($errors->any())
@foreach($errors->all() as $e)
• {{ $e }}
@endforeach
@endif
@csrf @method('PUT')
{{ __('admin.clients.billing_email_hint') }}
{{-- The billing identity. Not enforced here: an admin must be able to open a record with gaps, but should see them now rather than when the invoice is written. Which fields matter depends on the customer type. --}}
@php $clientType = old('client_type', $client->client_type) ?: 'individual'; @endphp
@php $clientCurrencyId = (int) old('currency_id', $client->currency_id ?: $currencies->firstWhere('is_default', true)?->id); @endphp
{{ \App\Support\CustomerCurrency::enabled() ? __('admin.currencies.client_currency_hint_on') : __('admin.currencies.client_currency_hint_off') }}

{{ __('common.form.password') }}

@if($customFields->isNotEmpty())

{{ __('admin.clients.custom_fields') }}

@foreach($customFields as $field) @php($value = old("custom_fields.{$field->id}", $field->values->first()?->value))
field_type === 'textarea') style="grid-column:span 2;" @endif> @if($field->field_type === 'textarea') @elseif($field->field_type === 'select') @elseif($field->field_type === 'checkbox')
@elseif($field->field_type === 'number') required) required @endif> @elseif($field->field_type === 'date') required) required @endif> @else regex) pattern="{{ $field->regex }}" @endif @if($field->required) required @endif> @endif
@endforeach
@endif
{{ __('common.actions.cancel') }}
@endsection