@extends('adminlte::page') @section('title', 'Detalle del Cliente') @section('content_header')

Detalle del Cliente

@stop @section('content')
@can('admin.clientes.edit') Editar @endcan Volver
Información del Usuario

ID: {{ $cliente->user->id }}
Nombre: {{ $cliente->user->name }}
Email: {{ $cliente->user->email }}
Estado: @if($cliente->user->activo) Activo @else Inactivo @endif
Registrado: {{ $cliente->user->created_at->format('d/m/Y H:i') }}
Última actualización: {{ $cliente->user->updated_at->format('d/m/Y H:i') }}
Información del Cliente

ID Cliente: {{ $cliente->id }}
Celular: {{ $cliente->celular ?? 'N/A' }}
Empresa: {{ $cliente->empresa ?? 'N/A' }}
Tipo de Documento: @if($cliente->tipo_documento == 1) DNI @elseif($cliente->tipo_documento == 2) RUC @else N/A @endif
Número de Documento: {{ $cliente->ruc ?? 'N/A' }}
Razón Social: {{ $cliente->razon_social ?? 'N/A' }}
Dirección: {{ $cliente->direccion ?? 'N/A' }}
Roles: @foreach($cliente->user->roles as $role) {{ $role->name }} @endforeach
Creado: {{ $cliente->created_at->format('d/m/Y H:i') }}

Historial de Cotizaciones

@if($cotizaciones->count() > 0)
@foreach($cotizaciones as $index => $cotizacion) @endforeach
# Número de Cotización Fecha Emisión Fecha Vencimiento Estado Subtotal Descuento Impuesto Total Productos Acciones
{{ $index + 1 }} {{ $cotizacion->numero_cotizacion }} {{ $cotizacion->fecha_emision->format('d/m/Y') }} {{ $cotizacion->fecha_vencimiento ? $cotizacion->fecha_vencimiento->format('d/m/Y') : 'Sin fecha' }} @if($cotizacion->estado == 'aprobada') Aprobada @elseif($cotizacion->estado == 'rechazada') Rechazada @elseif($cotizacion->estado == 'vencida') Vencida @else Pendiente @endif S/ {{ number_format($cotizacion->subtotal, 2) }} @if($cotizacion->descuento > 0) -S/ {{ number_format($cotizacion->descuento, 2) }} @else - @endif S/ {{ number_format($cotizacion->impuesto_total, 2) }} S/ {{ number_format($cotizacion->total, 2) }} {{ $cotizacion->productos->count() }} producto(s) @can('admin.cotizaciones.show') @endcan @can('admin.cotizaciones.pdf') @endcan
RESUMEN TOTAL: S/ {{ number_format($cotizaciones->sum('subtotal'), 2) }} -S/ {{ number_format($cotizaciones->sum('descuento'), 2) }} S/ {{ number_format($cotizaciones->sum('impuesto_total'), 2) }} S/ {{ number_format($cotizaciones->sum('total'), 2) }} {{ $cotizaciones->sum(function($cot) { return $cot->productos->count(); }) }} producto(s)
@else
Este cliente no tiene cotizaciones registradas.
@endif
@stop @section('css') @stop @section('js') @stop