@extends('admin.layouts.app') @push('css') @endpush @section('content')

Conciliacion Pagos MercadoPago

{{-- Stats Cards --}}

Conciliados

{{ number_format($stats['reconciled_count']) }}

${{ number_format($stats['reconciled_sum'], 2, ',', '.') }}

Sin Conciliar

{{ number_format($stats['unreconciled_count']) }}

${{ number_format($stats['unreconciled_sum'], 2, ',', '.') }}

Ordenes sin Match

{{ number_format($stats['unmatched_orders']) }}

ultimos 90 dias

Ultima Conciliacion

{{ $stats['last_reconciled_at'] ? $stats['last_reconciled_at']->format('d/m/Y') : '-' }}

{{ $stats['last_reconciled_at'] ? $stats['last_reconciled_at']->format('H:i') : 'Nunca' }}
{{-- Auto-reconcile Action --}} @if($unreconciledPayments->count() > 0)
@csrf Volver a Pagos
@endif {{-- Two Column Layout --}}
{{-- Left: Pagos sin conciliar --}}
Pagos MP sin Conciliar {{ $unreconciledPayments->count() }} @if($stats['unreconciled_ml'] > 0) ML: {{ $stats['unreconciled_ml'] }} @endif @if($stats['unreconciled_ecom'] > 0) LP: {{ $stats['unreconciled_ecom'] }} @endif
@forelse($unreconciledPayments as $payment) @empty @endforelse
Payment ID Pagador Origen Total Fecha Acciones
{{ $payment->id_payment }} @if($payment->mla_tran)
{{ Str::limit($payment->mla_tran, 18) }} @endif
{{ $payment->mla_nick ?? $payment->payer_full_name ?? '-' }} {{ $payment->origen === 'ml' ? 'ML' : ($payment->origen === 'ecommerce' ? 'LP' : '?') }} ${{ number_format($payment->mla_total ?? 0, 2, ',', '.') }} {{ $payment->fecha_pago ? $payment->fecha_pago->format('d/m/y H:i') : '-' }}
Todos los pagos estan conciliados
{{-- Right: Ordenes sin match --}}
Ordenes MP sin Match {{ $unmatchedOrders->count() }}
@forelse($unmatchedOrders as $order) @empty @endforelse
# Cliente Total Fecha Pago
#{{ $order->id }} {{ $order->first_name }} {{ $order->last_name }} @if($order->email)
{{ Str::limit($order->email, 25) }} @endif
${{ number_format($order->grand_total, 2, ',', '.') }} {{ $order->created_at->format('d/m/y H:i') }} @if($order->payment_status === 'paid') Pagada @else {{ $order->payment_status }} @endif
Todas las ordenes tienen pago
{{-- Modal Conciliacion Manual --}} @endsection @push('js') @endpush