{% for card in selected_cards %}
{{ card['bank'] }} {{ card['last_four_digits'] }}
{% for statement in statements %} {% if statement['card_id'] == card['id'] %} {% if statement['balance'] is not none %}
{{ statement['issue_date'].strftime('%b')|upper }}
{{ statement['issue_date'].year }}
${{ statement['balance']|currency }}
{% if statement['payment_date'] %} {% endif %}
{% endif %} {% endif %} {% endfor %}
{% endfor %}