You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.4 KiB

  1. {% if transactions %}
  2. <table class="table">
  3. <tr>
  4. <th>Date</th>
  5. <th>Payment Method</th>
  6. <th>Amount</th>
  7. <th>Type</th>
  8. <th>Status</th>
  9. <th></th>
  10. </tr>
  11. {% for tx in transactions %}
  12. <tr {% if tx.type == "credit" %}class="text-muted"{% endif %}>
  13. <td title="{{ tx.created_at }}">{{ tx.created_at|date:"N j, Y" }}</td>
  14. <td>
  15. {% if tx.payment_instrument_type == "paypal_account" %}
  16. Paypal from {{ tx.paypal.payer_email }}
  17. {% endif %}
  18. {% if tx.payment_instrument_type == "credit_card" %}
  19. {{ tx.credit_card.card_type }} ending in {{ tx.credit_card.last_4 }}
  20. {% endif %}
  21. </td>
  22. <td>
  23. {% if tx.type == "credit" %}
  24. -{{ tx.amount }} {{ tx.currency_iso_code }}
  25. {% else %}
  26. {{ tx.amount }} {{ tx.currency_iso_code }}
  27. {% endif %}
  28. </td>
  29. <td>{{ tx.type|capfirst }}</td>
  30. <td><code>{{ tx.status }}</code></td>
  31. <td>
  32. {% if tx.type == "credit" %}
  33. {% else %}
  34. <a href="{% url 'hc-invoice-pdf' tx.id %}">PDF Invoice</a>
  35. {% endif %}
  36. </td>
  37. </tr>
  38. {% endfor%}
  39. </table>
  40. {% else %}
  41. <p class="billing-empty">
  42. No past transactions to display here
  43. </p>
  44. {% endif %}