Comprobante de Movimiento
@if($movimiento->movement) {{ \Carbon\Carbon::parse($movimiento->movement->occurred_at)->format('d/m/Y') }} a las {{ \Carbon\Carbon::parse($movimiento->movement->occurred_at)->format('H:i') }} hs @else {{ \Carbon\Carbon::parse($movimiento->created_at)->format('d/m/Y') }} a las {{ \Carbon\Carbon::parse($movimiento->created_at)->format('H:i') }} hs @endif
@php $isCredit = $movimiento->credit > 0; $statusConfig = [ 'settled' => ['text' => '✓ Movimiento Completado', 'class' => 'status-success'], 'completed' => ['text' => '✓ Movimiento Completado', 'class' => 'status-success'], 'failed' => ['text' => '✗ Movimiento Fallido', 'class' => 'status-failed'], 'reversed' => ['text' => '⟲ Movimiento Revertido', 'class' => 'status-reversed'], 'rejected' => ['text' => '⊘ Movimiento Rechazado', 'class' => 'status-rejected'], 'pending' => ['text' => '⏳ Pendiente', 'class' => 'status-pending'] ]; $currentStatus = $movimiento->movement ? $movimiento->movement->status : 'completed'; $statusInfo = $statusConfig[$currentStatus] ?? ['text' => '✓ Movimiento Completado', 'class' => 'status-success']; @endphp
{{ $statusInfo['text'] }}
@if($isCredit) +${{ number_format($movimiento->credit, 2, ',', '.') }} @else -${{ number_format($movimiento->debit, 2, ',', '.') }} @endif
@if($movimiento->concepto) {{ $movimiento->concepto->descripcion }} @elseif($movimiento->movement) {{ $movimiento->movement->description ?: 'Movimiento PSP' }} @else {{ $movimiento->note ?: 'Movimiento PSP' }} @endif
CVU
{{ $movimiento->cvu ? $movimiento->cvu->cvu : 'N/A' }}
@if($movimiento->cvu && $movimiento->cvu->alias)
Alias: {{ $movimiento->cvu->alias }}
@endif @if($empresa)
{{ $empresa->razon_social }}
CUIT: {{ $empresa->document }}
@endif
Tipo de Movimiento
@if($isCredit) ↓ INGRESO @else ↑ EGRESO @endif
@if($movimiento->concepto)
Concepto: {{ $movimiento->concepto->descripcion }}
@endif
@php // Extraer datos del webhook guardado en movement.raw $raw = ($movimiento->movement ? $movimiento->movement->raw : null); if (is_string($raw)) { $decoded = json_decode($raw, true); if (is_array($decoded)) $raw = $decoded; } $coelsaId = null; $fromInfo = null; $toInfo = null; if (is_array($raw)) { $coelsaId = $raw['detail']['coelsa_id'] ?? ($raw['coelsa_id'] ?? null); if (!empty($raw['from'])) { $fromInfo = [ 'cuit' => $raw['from']['cuit'] ?? null, 'full_name' => $raw['from']['full_name'] ?? null, 'account_key' => $raw['from']['account_key'] ?? ($raw['from']['cvu'] ?? null), ]; } if (!empty($raw['to'])) { $toInfo = [ 'cuit' => $raw['to']['cuit'] ?? null, 'full_name' => $raw['to']['full_name'] ?? null, 'account_key' => $raw['to']['account_key'] ?? null, ]; } } @endphp @if($isCredit && $fromInfo && ($fromInfo['full_name'] || $fromInfo['cuit']))
Datos del Remitente
@if($fromInfo['full_name'])
{{ $fromInfo['full_name'] }}
@endif @if($fromInfo['cuit'])
CUIT: {{ $fromInfo['cuit'] }}
@endif @if($fromInfo['account_key'])
CVU/CBU: {{ $fromInfo['account_key'] }}
@endif
@endif @if(!$isCredit && $toInfo && ($toInfo['full_name'] || $toInfo['cuit'] || $toInfo['account_key']))
Datos del Destinatario
@if($toInfo['full_name'])
{{ $toInfo['full_name'] }}
@endif @if($toInfo['cuit'])
CUIT: {{ $toInfo['cuit'] }}
@endif @if($toInfo['account_key'])
CVU/CBU: {{ $toInfo['account_key'] }}
@endif
@endif
@if($coelsaId)
COELSA ID:
{{ $coelsaId }}
@endif @if($movimiento->movement && $movimiento->movement->trx_id)
ID de Transacción:
{{ $movimiento->movement->trx_id }}
@endif @if($movimiento->movement && $movimiento->movement->status)
Estado:
{{ ucfirst($movimiento->movement->status) }}
@endif @if($movimiento->movement && $movimiento->movement->type)
Tipo de Transacción:
{{ strtoupper($movimiento->movement->type) }}
@endif
Fecha de Registro:
{{ \Carbon\Carbon::parse($movimiento->created_at)->format('d/m/Y H:i:s') }}
@if($movimiento->movement && $movimiento->movement->external_ref)
Referencia Externa:
{{ $movimiento->movement->external_ref }}
@endif
Débito:
@if($movimiento->debit > 0) $ {{ number_format($movimiento->debit, 2, ',', '.') }} @else - @endif
Crédito:
@if($movimiento->credit > 0) $ {{ number_format($movimiento->credit, 2, ',', '.') }} @else - @endif
Saldo después de la operación:
$ {{ number_format($movimiento->balance_after, 2, ',', '.') }}
Número de Operación Taxes PSP
#{{ str_pad($movimiento->id, 12, '0', STR_PAD_LEFT) }}
Conserve este número para futuras consultas
@if($movimiento->movement && in_array($movimiento->movement->status, ['settled', 'completed']))
🔒 Transacción Segura y Verificada
@elseif($movimiento->movement && in_array($movimiento->movement->status, ['failed', 'reversed', 'rejected']))
⚠️ Transacción No Completada
@elseif($movimiento->movement && $movimiento->movement->status === 'pending')
ℹ️ Transacción en Proceso
@else
🔒 Movimiento Registrado
@endif