{% 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, 'Retenciones extranjero (doble imposición)') }} {{ note_block(casilla) }} {{ casilla_warnings_block(casilla) }}
Introduce estos importes en la casilla 0588 de Renta Web. En el apartado "Rentas incluidas en la base del ahorro" hay que introducir los mismos valores que se pusieron en {{ casilla_badge(29) }} (dividendos). Pueden introducirse por activo o de manera agregada si no hay suficientes filas disponibles.
{% if casilla.extras.grupos_retenciones %}

Resumen por activo

{% for grupo in casilla.extras.grupos_retenciones %} {% set rba = grupo.get('rentas_base_ahorro_eur') %} {% endfor %}
Activo Rentas incluidas en la base del ahorro
(datos de {{ casilla_badge(29) }})
Impuesto satisfecho en el extranjero
{{ grupo.ticker }} {% if rba is not none %} {{ rba | format_num }} €{{ copy_btn(rba) }} {% else %}—{% endif %} {% if grupo.total_eur is not none %} {{ grupo.total_eur | format_num }} €{{ copy_btn(grupo.total_eur) }} {% else %}—{% endif %}
Total {% set t = casilla.extras.get('total_rentas_base_ahorro') %} {% if t is not none %}{{ cell_amount(t, button='verify') }}{% else %}—{% endif %} {% if casilla.valor is not none %}{{ cell_amount(casilla.valor, casilla=588, button='verify') }}{% else %}—{% endif %}

Detalle de operaciones

{% for grupo in casilla.extras.grupos_retenciones %} {% 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, 'movimiento', 'movimientos') }} {% 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, color=True) }} {{ td_source_short(item.fuente, multi=not single_src) }} {% endif %} {% endfor %}
# Fecha Tipo Importe USD Tipo de Cambio Importe EUR Origen
{{ loop.index }} {{ e.get('fecha', '') }} {{ e.get('tipo', '') }} {{ e.get('importe_usd', '') }} {{ item.error }}
{{ loop.index }} {{ e.get('fecha', '') }} {{ e.get('tipo', '') }} {{ e.get('importe_usd', '') }} {{ item.aviso }}
{{ loop.index }} {{ e.get('fecha', '') }} {{ e.get('tipo', '') }} {{ e.get('importe_usd', '') }} {{ e.get('tipo_cambio', '') }}
{% endfor %} {% else %} {{ empty_state('No hay retenciones en el extranjero en este ejercicio.') }} {% endif %}