@extends('layouts.vertical', ['pageTitle' => __('customers.customer_details')]) @section('page-title')

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

{{ __('customers.edit') }} {{ __('customers.back') }}
@endsection @section('content') @if(session('success')) @endif @if(session('error')) @endif

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

{{ $customer->customer_number }}

{{ $customer->rfc }}

{{ $customer->type == 'Moral' ? 'Moral' : 'FĂ­sica' }}

{{ $customer->name }}

{{ $customer->commercial_name }}

ID: {{ $customer->cfdi_id }}

{{ $customer->fiscal_regime_id ? 'ID: ' . $customer->fiscal_regime_id : __('customers.not_specified') }}

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

{{ $customer->account_number ?? __('customers.not_specified') }}

{{ $customer->bank ?? __('customers.not_specified') }}

ID: {{ $customer->payment_way_id }}

{{ $customer->payment_method_id ? 'ID: ' . $customer->payment_method_id : __('customers.not_specified') }}

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

@forelse($customer->addresses as $address)
@if($address->main == 1) {{ __('customers.main_address_label') }} @else {{ __('customers.alternate_address') }} @endif
@if($address->main == 0)
@csrf
@endif {{ __('customers.edit') }} @if($address->main == 0) @endif

{{ __('customers.branch_office_label') }}: {{ $address->office_branch }}

{{ __('customers.address_label') }}: {{ $address->address }}

{{ __('customers.postal_code') }}: {{ $address->postal_code }}

{{ __('customers.city') }}: {{ $address->city }}, {{ $address->state }}

{{ __('customers.country') }}: ID {{ $address->country }}

{{ __('customers.phone') }}: ({{ $address->lada }}) {{ $address->phonenumber }} @if($address->extention) Ext. {{ $address->extention }} @endif

{{ __('customers.email') }}: {{ $address->email }}

@if($address->webpage)

{{ __('customers.website') }}: {{ $address->webpage }}

@endif
@empty
{{ __('customers.no_addresses') }}
@endforelse

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

@forelse($customer->contacts as $contact)

{{ __('customers.type') }}: {{ $contact->type }}

{{ __('customers.name') }}: {{ $contact->name }}

{{ __('customers.email') }}: @if($contact->email) {{ $contact->email }} @else {{ __('customers.not_specified') }} @endif

{{ __('customers.branch_ext') }}: {{ $contact->branch_extention }}

@empty
{{ __('customers.no_contacts_registered') }}
@endforelse

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

@forelse($customer->credits as $credit)
{{ __('customers.credit_status') }}: {{ $credit->status }}

{{ __('customers.grantor_label') }} {{ $credit->grantor }}

{{ __('customers.limit_label') }} ${{ number_format($credit->limit, 2) }}

{{ __('customers.days_label') }} {{ $credit->days }} {{ __('customers.days_suffix') }}

{{ __('customers.legal_rep') }}: {{ $credit->legal_representation }}

@if($credit->references->count() > 0)
{{ __('customers.references_title') }}
@foreach($credit->references as $reference)

{{ __('customers.type') }}: {{ $reference->type }}

{{ __('customers.name') }}: {{ $reference->name }}

{{ __('customers.phone') }}: ({{ $reference->lada }}) {{ $reference->phonenumber }} @if($reference->extention) Ext. {{ $reference->extention }} @endif

@endforeach
@endif
@empty
{{ __('customers.no_credit_registered') }}
@endforelse

{{ __('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') }}

@endsection @section('scripts') @endsection