@extends('layouts.app') @section('title', 'Detalles de Oportunidad') @section('content')

{{ $opportunity->name }}

Detalles de la oportunidad

Volver Editar @if($opportunity->canBeConverted())
@csrf
@endif
Información General
Vendedor
{{ $opportunity->salesman->first_name ?? 'N/A' }} {{ $opportunity->salesman->last_name ?? '' }}
Etapa {{ $opportunity->stage->name ?? 'N/A' }}
Fecha de Cierre Esperada
@if($opportunity->expected_close_date) {{ $opportunity->expected_close_date->format('d/m/Y') }} @if($opportunity->is_overdue) Vencida @elseif($opportunity->days_to_close > 0) {{ $opportunity->days_to_close }} días @endif @else N/A @endif
@if($opportunity->description)
Descripción

{{ $opportunity->description }}

@endif @if($opportunity->notes)
Notas

{{ $opportunity->notes }}

@endif
Valor y Probabilidad
Valor Estimado

${{ number_format($opportunity->estimated_value, 2) }}

Probabilidad

{{ number_format($opportunity->probability, 1) }}%

Valor Esperado

${{ number_format($opportunity->expected_value, 2) }}

Actividades
@forelse($opportunity->activities as $activity)
{{ $activity->type_text }}

{{ $activity->description }}

{{ $activity->createdBy->name ?? 'N/A' }} {{ $activity->created_at->format('d/m/Y H:i') }}
@if($activity->scheduled_date) {{ $activity->completed ? 'Completada' : ($activity->is_overdue ? 'Vencida' : 'Programada') }} @endif
@empty

No hay actividades registradas

@endforelse
Acciones Rápidas
@if($opportunity->canBeConverted())
@csrf
@endif @if($opportunity->quotation) Ver Presupuesto @endif
Información Adicional
Creada por {{ $opportunity->createdBy->name ?? 'N/A' }}
{{ $opportunity->created_at->format('d/m/Y H:i') }}
@if($opportunity->updatedBy)
Última actualización {{ $opportunity->updatedBy->name ?? 'N/A' }}
{{ $opportunity->updated_at->format('d/m/Y H:i') }}
@endif @if($opportunity->actual_close_date)
Fecha de Cierre Real {{ $opportunity->actual_close_date->format('d/m/Y') }}
@endif
@endsection