{% load static %}

Credit Adjustment History

{% if credit_adjustments %}
{% for adjustment in credit_adjustments %} {% endfor %}
Date & Time Amount Type Description Status

{{ adjustment.created_at|date:"M d, Y" }}

{{ adjustment.created_at|time:"H:i" }}

{% if adjustment.amount > 0 %} +{{ adjustment.amount|floatformat:1 }} {% else %} {{ adjustment.amount|floatformat:1 }} {% endif %} {% if adjustment.amount > 0 %} Addition {% else %} Removal {% endif %}

{{ adjustment.description|truncatechars:60 }}

{% if adjustment.description|length > 60 %} {% endif %}
{% if adjustment.expires_at %} {% if adjustment.is_expired %} Expired {% else %} Valid {% endif %} {% else %} No expiration {% endif %}
{% if credit_adjustments|length == 20 %}

Showing last 20 credit adjustments. View all in Django Admin

{% endif %} {% else %}

No credit adjustments found for this user.

Admin credit adjustments will appear here when performed.

{% endif %}