{% load static %} {% load widget_tweaks %} {% load short_number %} {% load tz %}

Export

{% for ad in ads_history %} {% if not ad.status == "2" %} {% else %} {% endif %} {% endfor %}
# Status Start End Cost Clicks Impressions Invoice
{{ ad.slug }} {% if ad.status == "1"%}

A

{% elif ad.status == "2" %}

R

{% elif ad.status == "4" %}

S

{% else %}

P

{% endif %}
{% if ad.ad_start_date %} {{ ad.ad_start_date }} {% else %}

N/A

{% endif %}
{% if ad.ad_end_date %} {{ ad.ad_end_date }} {% else %}

N/A

{% endif %}
{% if ad.amount_due %} £{{ad.amount_due|floatformat:0}} {% else %}

N/A

{% endif %}
{% if ad.clicks %} {{ ad.clicks.all.count|short_number }} {% else %}

N/A

{% endif %}
{% if ad.clicks %} {{ ad.impressions|short_number }} {% else %}

N/A

{% endif %}
VV
{% if ads_history.paginator.num_pages > 1 %} {% endif %}

Total: {{ ads.count }}