{{-- New-Unity ERP | Modules/Sales/Resources/Views/customers/show.blade.php | v2.3 | 06/07/2026 --}} {{-- v2.3 — Agrega Customer Type y Assigned Price List en General Information. --}} {{-- v2.2 — Revertir a layout v2.1: General arriba, Addresses+Banking/Contacts/Credits col split. Fix franja gris: quitar h-100. --}} @extends('layouts.vertical') @section('content')
{{-- Page Header --}}

{{ __('customers.customer_details') }}

{{ $customer->name }}

{{-- Breadcrumbs --}} {{-- Flash messages --}} @if(session('success')) @endif @if(session('error')) @endif
{{-- ── General Information ── --}}
{{ __('customers.generalinfo') }}
#{{ $customer->customer_number }}
{{ __('customers.rfc_taxid') }} {{ $customer->rfc }}
{{ __('customers.type') }} {{ $customer->type }}
{{ __('customers.business_name') }} {{ $customer->name }}
{{ __('customers.commercial_name') }} {{ $customer->commercial_name }}
{{ __('customers.cfdi_use') }} {{ $customer->cfdiUse ? $customer->cfdiUse->code.' - '.$customer->cfdiUse->description : '—' }}
{{ __('customers.fiscal_regime_label') }} {{ $customer->fiscalRegime ? $customer->fiscalRegime->code.' - '.$customer->fiscalRegime->description : '—' }}
{{ __('customers.payment_way') }} {{ $customer->paymentWay ? $customer->paymentWay->code : '—' }}
{{ __('customers.payment_method') }} {{ $customer->paymentMethod ? $customer->paymentMethod->code : '—' }}
{{-- Clasificación comercial --}}
{{ __('customers.customer_type') }} @php $typeLabels = ['end_user'=>__('customers.tab_end_user'),'wholesale'=>__('customers.tab_wholesale'),'distributor'=>__('customers.tab_distributor'),'online'=>__('customers.tab_online'),'special'=>__('customers.tab_special')]; $typeColors = ['end_user'=>'secondary','wholesale'=>'primary','distributor'=>'info','online'=>'success','special'=>'warning']; $ctype = $customer->customer_type ?? 'end_user'; @endphp {{ $typeLabels[$ctype] ?? $ctype }}
{{ __('customers.assigned_price_list') }} @php $typePriceList = ['end_user'=>'GEN','wholesale'=>'MAY','distributor'=>'DIS','online'=>'ONL','special'=>'ESP']; $listCode = $typePriceList[$ctype] ?? 'GEN'; @endphp @if($customer->defaultPriceList) {{ $customer->defaultPriceList->code }} {{ $customer->defaultPriceList->name }} @else {{ $listCode }} {{ __('customers.auto_from_type') }} @endif
{{-- ── Addresses ── --}}
{{ __('customers.addresses') }}
{{ __('customers.add_address') }}
@forelse($customer->addresses as $address) @empty @endforelse
{{ __('customers.branch') }} {{ __('customers.address_label') }} {{ __('customers.col_cp') }} {{ __('customers.col_city_state') }} {{ __('customers.phone') }} {{ __('customers.email') }} {{ __('customers.actions') }}
@if($address->main == 1)@endif {{ $address->office_branch }} {{ $address->address ?: '—' }} {{ $address->postal_code }} {{ implode(', ', array_filter([$address->city, $address->state])) ?: '—' }} {{ $address->phonenumber ? '('.$address->lada.') '.$address->phonenumber : '—' }} @if($address->email){{ $address->email }} @else —@endif
@if($address->main == 0)
@csrf
@csrf @method('DELETE')
@endif
{{ __('customers.no_addresses') }}
{{-- ── Banking + Contacts + Credits ── --}}
{{ __('customers.banking_payment') }}
{{ __('customers.account_number_label') }} {{ $customer->account_number ?? '—' }}
{{ __('customers.bank') }} {{ $customer->bank ?? '—' }}
{{ __('customers.tab_contacts') }}
@forelse($customer->contacts as $contact)
{{ $contact->type }}
{{ $contact->name }}
@if($contact->email)@endif @if($contact->branch_extention)
{{ __('customers.ext_label') }} {{ $contact->branch_extention }}
@endif
@empty
{{ __('customers.no_contacts_registered') }}
@endforelse
{{ __('customers.credit') }}
@forelse($customer->credits as $credit)
{{ $credit->status }}
{{ __('customers.limit_label') }} ${{ number_format($credit->limit, 2) }}
{{ __('customers.days_label') }} {{ $credit->days }}
{{ __('customers.grantor_label') }} {{ $credit->grantor }}
@empty
{{ __('customers.no_credit_info') }}
@endforelse
{{-- Timestamps --}}
{{ __('customers.created') }} {{ $customer->created_at->format('d/m/Y H:i:s') }} {{ __('customers.last_updated') }} {{ $customer->updated_at->format('d/m/Y H:i:s') }}
@section('scripts') @endsection @endsection