{% load i18n %}
{% load currency_filters %}

<table class="table table-striped table-bordered table-hover">
    <caption>{% trans "Refunds" %}</caption>

  {% if refunds %}
      <tr>
          <th>{% trans "Refund ID" %}</th>
          <th>{% trans "Number of Items" %}</th>
          <th>{% trans "Total Credit" %}</th>
          <th>{% trans "Created" %}</th>
          <th>{% trans "Status" %}</th>
          <th></th>
      </tr>
    {% for refund in refunds %}
        <tr>
            <td>
                <a href="{% url 'dashboard:refunds:detail' refund.id %}">{{ refund.id }}</a>
            </td>
            <td>{{ refund.num_items }}</td>
            <td>{{ refund.total_credit_excl_tax|currency:refund.currency }}</td>
            <td>{{ refund.created }}</td>
            <td>{{ refund.status|default:"-" }}</td>
            <td><a href="{% url 'dashboard:refunds:detail' refund.id %}"
                   class="btn btn-info">{% trans "View" %}</a></td>
        </tr>
    {% endfor %}
  {% else %}
      <tr>
          <td>{% trans "No refunds found." %}</td>
      </tr>
  {% endif %}

</table>
