{% if args.taxyear %}
{% if not args.summary %}
Audit
{% include "audit.html" %}
{% endif %}
{% set tax_year = args.taxyear %}
Tax Year -
{{config.format_tax_year(tax_year)}}
({{config.get_tax_year_start(tax_year)|datefilter2}} to {{config.get_tax_year_end(tax_year)|datefilter2}})
{% include "capital_gains.html" %}
{% if not args.summary %}
{% include "income.html" %}
Appendix
{% include "price_data.html" %}
{% endif %}
{% else %}
{% if not args.summary %}
Audit
{% include "audit.html" %}
{% endif %}
{% for tax_year in tax_report|sort %}
Tax Year -
{{config.format_tax_year(tax_year)}}
({{config.get_tax_year_start(tax_year)|datefilter2}} to {{config.get_tax_year_end(tax_year)|datefilter2}})
{% include "capital_gains.html" %}
{% if not args.summary %}
{% include "income.html" %}
{% endif %}
{% if not loop.last %}
{% endif %}
{% endfor %}
{% if not args.summary %}
Appendix
{% for tax_year in price_report|sort %}
{% include "price_data.html" %}
{% endfor %}
{% include "holdings.html" %}
{% endif %}
{% endif %}