{% 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
| Activo |
Total dividendos {{ casilla_badge(casilla.numero) }} |
{% for grupo in casilla.extras.grupos_dividendos %}
| {{ grupo.ticker }} |
{% if grupo.total_eur is not none %}{{ cell_amount(grupo.total_eur, casilla=29, button='copy') }}{% else %}—{% endif %}
|
{% endfor %}
| 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 %}
| # |
Fecha |
Importe USD |
Tipo de Cambio |
Importe EUR |
Origen |
{% for item in grupo.operaciones %}
{% set e = item.extras %}
{% if item.error %}
| {{ loop.index }} |
{{ e.get('fecha', '') }} |
{{ e.get('importe_usd', '') }} |
— |
{{ item.error }} |
{{ td_source_short(item.fuente, multi=not single_src) }}
{% elif item.aviso %}
| {{ loop.index }} |
{{ e.get('fecha', '') }} |
{{ e.get('importe_usd', '') }} |
— |
{{ item.aviso }} |
{{ td_source_short(item.fuente, multi=not single_src) }}
{% else %}
| {{ loop.index }} |
{{ e.get('fecha', '') }} |
{{ e.get('importe_usd', '') }} |
{{ e.get('tipo_cambio', '') }} |
{{ td_eur(item.importe_eur, sign=False) }}
{{ td_source_short(item.fuente, multi=not single_src) }}
{% endif %}
{% endfor %}
{% endfor %}
{% else %}
{{ empty_state('No hay dividendos en este ejercicio.') }}
{% endif %}