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.

41 lines
1.3 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>Status</th>
  8. <th></th>
  9. </tr>
  10. {% for tx in transactions %}
  11. <tr>
  12. <td>{{ tx.created_at }}</td>
  13. <td>
  14. {% if tx.payment_instrument_type == "paypal_account" %}
  15. Paypal from {{ tx.paypal.payer_email }}
  16. {% endif %}
  17. {% if tx.payment_instrument_type == "credit_card" %}
  18. {{ tx.credit_card.card_type }} ending in {{ tx.credit_card.last_4 }}
  19. {% endif %}
  20. </td>
  21. <td>
  22. {% if tx.currency_iso_code == "USD" %}
  23. ${{ tx.amount }}
  24. {% elif tx.currency_iso_code == "EUR" %}
  25. €{{ tx.amount }}
  26. {% else %}
  27. {{ tx.currency_iso_code }} {{ tx.amount }}
  28. {% endif %}
  29. </td>
  30. <td><code>{{ tx.status }}</code></td>
  31. <td>
  32. <a href="{% url 'hc-invoice-pdf' tx.id %}">PDF Invoice</a>
  33. </td>
  34. </tr>
  35. {% endfor%}
  36. </table>
  37. {% else %}
  38. <p class="billing-empty">
  39. No past transactions to display here
  40. </p>
  41. {% endif %}