@extends('layouts.app') @section('title', 'Detalles de Retención de Venta') @section('content')

Detalles de Retención de Venta

Volver al Listado @if($retention->status !== 'processed') Editar @endif @if($retention->status === 'approved' && $retention->status !== 'processed')
@csrf
@endif
Información de la Retención
N° Retención:
{{ $retention->retention_number ?? 'N/A' }}
Estado:
@php $statusColors = [ 'draft' => 'secondary', 'pending' => 'warning', 'approved' => 'success', 'rejected' => 'danger', 'processed' => 'info' ]; $statusLabels = [ 'draft' => 'Borrador', 'pending' => 'Pendiente', 'approved' => 'Aprobada', 'rejected' => 'Rechazada', 'processed' => 'Procesada' ]; @endphp {{ $statusLabels[$retention->status] ?? $retention->status }}

Fecha de Retención:
{{ $retention->retention_date ? $retention->retention_date->format('d/m/Y') : 'N/A' }}
Tipo de Retención:
{{ strtoupper($retention->retention_type ?? 'N/A') }}

Porcentaje:
{{ number_format($retention->retention_percentage ?? 0, 2) }}%
Monto de Retención:
${{ number_format($retention->retention_amount ?? 0, 2) }}
@if($retention->notes)
Notas:
{{ $retention->notes }}
@endif
Información del Cliente
Empresa:
{{ $retention->client ? $retention->client->business_name : 'N/A' }}

Contacto:
{{ $retention->client ? $retention->client->contact_person : 'N/A' }}
Email:
{{ $retention->client ? $retention->client->email : 'N/A' }}

Teléfono:
{{ $retention->client ? $retention->client->phone : 'N/A' }}
Factura Original:
@if($retention->salesInvoice) {{ $retention->salesInvoice->invoice_number }}
IVA: ${{ number_format($retention->salesInvoice->tax_amount ?? 0, 2) }} @else N/A @endif
Usuario que Creó

Nombre: {{ $retention->createdBy ? $retention->createdBy->name : 'N/A' }}
Email: {{ $retention->createdBy ? $retention->createdBy->email : 'N/A' }}
Fecha: {{ $retention->created_at ? $retention->created_at->format('d/m/Y H:i') : 'N/A' }}

@if($retention->approvedBy ?? null)
Usuario que Aprobó

Nombre: {{ $retention->approvedBy->name }}
Email: {{ $retention->approvedBy->email }}
Fecha: {{ $retention->approved_at ? $retention->approved_at->format('d/m/Y H:i') : 'N/A' }}

@endif
@if($retention->status !== 'processed' && $retention->status !== 'rejected')
Cambiar Estado
@csrf
@endif
@endsection