| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- {% extends "base.html" %}
- {% load humanize %}
- {% load range_filters %}
- {% block interface %}
- <section id="interface">
- {% include "_navigation.html" %}
- <h3 class="i-name">
- Bienvenido, {{ user.nombre }}
- </h3>
- <div class="values">
- {% for f in favoritas %}
- <div class="val-cuenta">
- <div>
- <h3>{{ f.nombre }}</h3>
- <span>{{ f.saldo|floatformat:2|intcomma }}</span>
- </div>
- </div>
- {% empty %}
- <li>Sin cuentas favoritas configuradas</li>
- {% endfor %}
- </div>
- <div class="values">
- {% for f in frecuentes %}
- <div class="val-favoritos">
- <div>
- <a href="{% url 'agregar_movimiento' %}?origen={{ f.cuenta_origen.nombre|urlencode }}&destino={{ f.cuenta_destino.nombre|urlencode }}&monto={{ f.monto }}&categoria={{ f.categoria.nombre|urlencode }}&descripcion={{ f.descripcion }}">
- {{ f.nombre }} ({{ f.monto }} €)
- </a>
- </div>
- </div>
- {% empty %}
- <li>Sin movimientos frecuentes configurados</li>
- {% endfor %}
- </div>
- <div class="board">
- <div>
- <form method="get" class="mb-3">
- <select name="mes">
- {% for m in 1|to:12 %}
- <option value="{{ m }}" {% if m == mes %}selected{% endif %}>
- {{ m }}
- </option>
- {% endfor %}
- </select>
- <select name="anio">
- {% for y in 2020|to:anio %}
- <option value="{{ y }}" {% if y == anio %}selected{% endif %}>{{ y }}</option>
- {% endfor %}
- </select>
- <button type="submit">Filtrar</button>
- </form>
- </div>
- <h3>Movimientos recientes</h3>
- <table width="100%">
- <thead>
- <tr>
- <td>Fecha</td>
- <td>Origen</td>
- <td>Destino</td>
- <td>Cantidad</td>
- <td>Descripción</td>
- <td></td>
- </tr>
- </thead>
- <tbody>
- {% for m in movimientos %}
- <tr class="{% cycle 'fila-impar' 'fila-par' %}">
- <td class="movimiento">
- {{ m.fecha|date:"d-m-Y H:i" }}
- </td>
-
- <td class="movimiento">
- {{ m.cuenta_origen }}
- </td>
- <td class="movimiento">
- {{ m.cuenta_destino }}
- </td>
- <td class="movimiento-monto">
- {{ m.monto|floatformat:2|intcomma }} €
- </td>
- <td class="movimiento">
- {{ m.descripcion }}
- </td>
- <td class="edit">
- <a href="{% url 'editar_movimiento' m.id %}">
- <i class="bi bi-pencil-square"></i>
- </a>
- <a href="{% url 'eliminar_movimiento' m.id %}">
- <i class="bi bi-trash3"></i>
- </a>
- <a href="{% url 'duplicar_movimiento' m.id %}">
- <i class="bi bi-copy"></i>
- </a>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </section>
- {% endblock %}
|