Admin Stripe invoices + recurring subscriptions (customers pay us) #24

Merged
westfarn merged 19 commits from feature/23-admin-stripe-invoices into master 2026-07-31 12:02:41 -07:00
Showing only changes of commit 5596a87cc7 - Show all commits
@@ -0,0 +1,38 @@
{% extends "base.html" %}
{% load static %}
{% block title %}Invoice {{ invoice.pk }} - AI ML Operations{% endblock %}
{% block content %}
<div class="section">
<div class="container">
<div style="margin-bottom: 2rem;">
<a href="{% url 'invoice_list' %}" class="btn">Back to Invoices</a>
</div>
<h1 class="section-title" style="text-align: left;">Invoice #{{ invoice.pk }}</h1>
<div class="card" style="max-width: 720px;">
<p><strong>Customer:</strong> {{ invoice.customer.name }} &lt;{{ invoice.customer.email }}&gt;</p>
<p><strong>Description:</strong> {{ invoice.description }}</p>
<p><strong>Amount:</strong> ${{ invoice.amount_dollars|floatformat:2 }} {{ invoice.currency|upper }}</p>
<p><strong>Status:</strong> {{ invoice.get_status_display }}</p>
<p><strong>Due:</strong> {{ invoice.due_date|default:"—" }}</p>
<p><strong>Stripe invoice:</strong> {{ invoice.stripe_invoice_id|default:"—" }}</p>
{% if invoice.hosted_invoice_url %}
<p><strong>Pay link:</strong> <a href="{{ invoice.hosted_invoice_url }}" target="_blank" rel="noopener">Open hosted invoice</a></p>
{% endif %}
{% if invoice.invoice_pdf_url %}
<p><strong>PDF:</strong> <a href="{{ invoice.invoice_pdf_url }}" target="_blank" rel="noopener">Download</a></p>
{% endif %}
<p><strong>Email sent:</strong> {{ invoice.pay_link_emailed_at|default:"Not yet" }}</p>
{% if invoice.notes %}<p><strong>Notes:</strong> {{ invoice.notes }}</p>{% endif %}
{% if invoice.hosted_invoice_url %}
<form method="post" action="{% url 'invoice_resend_email' invoice.pk %}" style="margin-top: 1.5rem;">
{% csrf_token %}
<button type="submit" class="btn">Resend payment email</button>
</form>
{% endif %}
</div>
</div>
</div>
{% endblock %}