{% from '_macros.html' import td_eur, td_source, td_source_short, copy_btn, verify_btn, casilla_badge, pluralize, cell_amount, casilla_warnings_block, note_block, section_h2, empty_state %} {{ section_h2(casilla, 'Dividendos') }} {{ note_block(casilla) }} {{ casilla_warnings_block(casilla) }}
Para cada activo, introduce el total de dividendos en el campo "Ingresos íntegros" bajo la casilla {{ casilla_badge(29) }} (una entrada por activo, no el total global).
No es necesario rellenar el campo "Retenciones" si el activo es extranjero: esos importes se introducen en la sección de retenciones (doble imposición internacional).
{% if casilla.extras.grupos_dividendos %}

Resumen por activo

{% for grupo in casilla.extras.grupos_dividendos %} {% endfor %}
Activo Total dividendos {{ casilla_badge(casilla.numero) }}
{{ grupo.ticker }} {% if grupo.total_eur is not none %}{{ cell_amount(grupo.total_eur, casilla=29, button='copy') }}{% else %}—{% endif %}
Total {% if casilla.valor is not none %}{{ cell_amount(casilla.valor, casilla=29, button='verify') }}{% else %}—{% endif %}

Detalle de operaciones

{% for grupo in casilla.extras.grupos_dividendos %} {% set ns = namespace(files=[], labels=[]) %} {% for item in grupo.operaciones %}{% if item.fuente and item.fuente.file not in ns.files %}{% set ns.files = ns.files + [item.fuente.file] %}{% set ns.labels = ns.labels + [item.fuente.file_label] %}{% endif %}{% endfor %} {% set single_src = ns.labels|length <= 1 %}
{{ grupo.ticker }} {% if grupo.tiene_errores %}ERROR{% endif %} {% if grupo.tiene_avisos and not grupo.tiene_errores %}AVISO{% endif %} {% if ns.labels %}{{ ns.labels|join(' · ') }}{% endif %} {{ grupo.num_ops }} {{ pluralize(grupo.num_ops, 'dividendo', 'dividendos') }} {% if grupo.total_eur is not none %} ·  Total {{ grupo.total_eur|format_num }} €{% endif %} {% for item in grupo.operaciones %} {% set e = item.extras %} {% if item.error %} {{ td_source_short(item.fuente, multi=not single_src) }} {% elif item.aviso %} {{ td_source_short(item.fuente, multi=not single_src) }} {% else %} {{ td_eur(item.importe_eur, sign=False) }} {{ td_source_short(item.fuente, multi=not single_src) }} {% endif %} {% endfor %}
# Fecha Importe USD Tipo de Cambio Importe EUR Origen
{{ loop.index }} {{ e.get('fecha', '') }} {{ e.get('importe_usd', '') }} {{ item.error }}
{{ loop.index }} {{ e.get('fecha', '') }} {{ e.get('importe_usd', '') }} {{ item.aviso }}
{{ loop.index }} {{ e.get('fecha', '') }} {{ e.get('importe_usd', '') }} {{ e.get('tipo_cambio', '') }}
{% endfor %} {% else %} {{ empty_state('No hay dividendos en este ejercicio.') }} {% endif %}