{% extends "admin/layout.html" %} {% block title %}Withdrawals | {{ brand_short_name }}{% endblock %} {% block admin_title %}Retiros{% endblock %} {% block admin_content %} {% set statuses = [ ("all", "Todos"), ("pending", "Pendientes"), ("approved", "Aprobados"), ("rejected", "Cancelados") ] %}

Retiros

Filtra por estado y revisa todos los retiros. Las fechas se muestran en hora CDMX.

{% for key, label in statuses %} {{ label }} ({{ status_counts[key] }}) {% endfor %}
{% if duplicate_recharge_alerts %}

Aviso de seguimiento

Usuarios con más de 2 recargas el mismo día.

{{ duplicate_recharge_alerts|length }} usuario(s)
{% for alert in duplicate_recharge_alerts %}

{{ alert.phone }}

{{ alert.count }} solicitudes hoy

Revisar
{% endfor %}
{% endif %} {% if withdrawals %}
{% for withdrawal in withdrawals %} {% set today_count = recharge_counts_today.get(withdrawal.user_id, 0) %}

{% if withdrawal.status == 'approved' %}Aprobado{% elif withdrawal.status == 'rejected' %}Cancelado{% else %}Pendiente{% endif %}

{% if today_count > 2 %} 3+ recargas hoy {% endif %}

Usuario {{ withdrawal.user.phone }}

Banco: {{ withdrawal.bank_name }}

Fecha (CDMX): {{ localize_admin_datetime(withdrawal.created_at).strftime("%d/%m/%Y %H:%M") if withdrawal.created_at else "-" }}

${{ "%.2f"|format(withdrawal.net_amount or 0) }}

Titular: {{ withdrawal.account_holder }}

CLABE: {{ withdrawal.clabe }}

Monto total: ${{ "%.2f"|format(withdrawal.amount or 0) }}

Comision: ${{ "%.2f"|format(withdrawal.fee or 0) }}

Neto a pagar: ${{ "%.2f"|format(withdrawal.net_amount or 0) }}

Saldo descontado principal: ${{ "%.2f"|format(withdrawal.deducted_from_main or 0) }}

Saldo descontado referidos: ${{ "%.2f"|format(withdrawal.deducted_from_referrals or 0) }}

Estado actual: {{ withdrawal.status }}

{% if withdrawal.status == 'pending' %}
{% else %} {{ withdrawal.status }} {% endif %}
{% endfor %}
{% else %}
No hay retiros para este filtro.
{% endif %}
{% endblock %}