@extends('layouts.admin') @section('content') @if (session('success')) @endif @if (session('error')) @endif

Integración FV (Dynamics 365)

Salud y registros del webservice CreateSalesOrder usado por los pedidos Express 48h / Coordinadora. Volver a configuraciones

@csrf
{{-- Health --}}

Configuración

Endpoint
@if ($health['endpoint']) {{ $health['endpoint'] }} @else No configurado
{{ $health['endpoint_error'] }}
@endif
SOAPAction
{{ $health['soap_action'] }}
Compañía / Origen venta
{{ $health['company'] }} / {{ $health['origen_venta'] }}
Location / Sequence group
{{ $health['location_invoice'] }} / {{ $health['num_sequence_group'] }}
Almacén por defecto
@if ($health['default_warehouse']) {{ $health['default_warehouse'] }} @else Sin fallback @endif

Estado

Token de Microsoft
@if ($health['token_present']) Presente @else Ausente @endif
Última prueba de conexión
@if ($health['last_check']) @if ($health['last_check']['ok'] ?? false) OK · HTTP {{ $health['last_check']['http_status'] }} · {{ $health['last_check']['latency_ms'] }} ms @else Falló
{{ $health['last_check']['error'] ?? '' }}
@endif
{{ $health['last_check']['checked_at'] ?? '' }}
@else Nunca ejecutada @endif
Última FV creada
@if ($lastFvOrder) {{ $lastFvOrder->fv_number }}
Pedido #{{ $lastFvOrder->id }} · {{ $lastFvOrder->coordinadora_status_at ?? $lastFvOrder->updated_at }}
@else Ninguna @endif
{{-- Stats --}}
{{ $stats['total'] }}
Pedidos 48h Coordinadora
{{ $stats['with_fv'] }}
Con FV creada
{{ $stats['pending'] }}
Pendientes / en espera
{{ $stats['errors'] }}
Con error
{{-- Filters --}}
@if (request()->hasAny(['search', 'status'])) Limpiar @endif
{{-- Orders table --}}
@forelse ($orders as $order) @empty @endforelse
Pedido Fecha Cliente FV Guía Estado Payloads
#{{ $order->id }} {{ $order->created_at?->format('d/m/Y H:i') }} {{ $order->user?->name ?? '—' }} @if ($order->fv_number) {{ $order->fv_number }} @else Sin FV @endif {{ $order->coordinadora_guide_number ?? '—' }} @if ($order->coordinadora_status_text)
{{ $order->coordinadora_status_text }}
@endif
@if ($order->fv_request_payload || $order->fv_response_payload)
Ver FV @php $fvRequest = json_decode($order->fv_request_payload ?? '', true); $fvResponse = json_decode($order->fv_response_payload ?? '', true); @endphp @if (is_array($fvRequest) && !empty($fvRequest['xml']))
Request XML
{{ $fvRequest['xml'] }}
@elseif ($fvRequest)
Request
{{ json_encode($fvRequest, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) }}
@endif @if ($fvResponse)
Response
{{ json_encode(collect($fvResponse)->except('raw')->all(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) }}
@endif
@else @endif
No hay pedidos Express 48h / Coordinadora que coincidan.
{{ $orders->links() }}
{{-- File logs --}}

Registros recientes (soap-requests.log)

Últimas entradas de FV encontradas en los archivos de log SOAP (más recientes primero).

@if (count($fileLogs))
@foreach ($fileLogs as $line){{ $line }}
@endforeach
@else

No se encontraron entradas de FV en los logs recientes.

@endif
@endsection