{% extends 'gakusei/detail-layout.html' %}

    {% block regresar-url %}{% url 'pagos' %}{% endblock %}


    {% block card-title %}{{object}}{% endblock %}


    {% block edit %}{% endblock %}
    {% block delete %}{% endblock %}


    {% block card-body %}
        <ul class="mb-4 list-group list-group-flush">
            <li class="list-group-item"><span class="fw-bold">Estudiante:</span>     {{object.estudiante     }}</li>
            <li class="list-group-item"><span class="fw-bold">Clase:</span>          {{object.clase          }}</li>
            <li class="list-group-item"><span class="fw-bold">Monto pagado:</span>   {{ object.monto_pagado  }}$</li>
            <li class="list-group-item"><span class="fw-bold">Metodo:</span>         {{ object.metodo        }}</li>
            <li class="list-group-item"><span class="fw-bold">Referencia:</span>     {{ object.referencia                }}</li>
            <li class="list-group-item"><span class="fw-bold">Fecha de Pago:</span>  {{ object.fecha_pago|date:"d/m/y"       }}</li>
            <li class="list-group-item"><span class="fw-bold">Fecha Registro de Pago:</span>  {{ object.fecha|date:"d/m/y f a"       }}</li>
            <li class="list-group-item"><span class="fw-bold">Observacion:</span>    {% if object.obs %}{{ object.obs }}{% else %}---{% endif %}</li>
        </ul>


        <h3>Comprobantes de Pago</h3>

        <ul class="mb-4 list-group">
            {% for comprobante in object.comprobantes.all %}
                <li class="list-group-item">{{comprobante.solvencias.clase}} - {{comprobante.solvencias.mes}} ({{comprobante.solvencias.pagado}}) ({{comprobante.monto_aplicado}}$)</li>
            {% endfor %}
        </ul>
    {% endblock %}
