Initial commit

This commit is contained in:
ai_ml_operations
2026-09-06 04:27:41 -07:00
commit 8a97e3fbe2
302 changed files with 34038 additions and 0 deletions
@@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block title %}Payment cancelled{% endblock %}
{% block content %}
<section class="section section-lg"><div class="container">
<h1>Payment cancelled</h1>
<p>No charge was made for {{ invoice.number }}. You can return to the pay link anytime.</p>
</div></section>
{% endblock %}
@@ -0,0 +1,22 @@
{% extends "portal_base.html" %}
{% block title %}New invoice · Portal{% endblock %}
{% block topbar_title %}New invoice{% endblock %}
{% block portal_content %}
<form method="post" class="form-grid">
{% csrf_token %}
<div class="field">
<label>Contact</label>
<select name="contact" required>
<option value="">Choose…</option>
{% for c in contacts %}
<option value="{{ c.pk }}">{{ c }} · {{ c.email }}</option>
{% endfor %}
</select>
</div>
<div class="field"><label>Description</label><input name="description" required></div>
<div class="field"><label>Amount</label><input name="amount" type="number" step="0.01" min="0.01" required></div>
<div class="field"><label>Due date</label><input name="due_date" type="date"></div>
<div class="field"><label>Notes</label><textarea name="notes"></textarea></div>
<button class="btn btn-primary" type="submit">Create draft</button>
</form>
{% endblock %}
@@ -0,0 +1,17 @@
{% extends "portal_base.html" %}
{% block title %}{{ invoice.number }} · Portal{% endblock %}
{% block topbar_title %}{{ invoice.number }}{% endblock %}
{% block portal_content %}
<p><strong>{{ invoice.contact }}</strong> · {{ invoice.amount }} {{ invoice.currency|upper }} · {{ invoice.get_status_display }}</p>
<p>{{ invoice.description }}</p>
{% if invoice.hosted_invoice_url %}<p><a href="{{ invoice.hosted_invoice_url }}">Stripe pay link</a></p>{% endif %}
{% if invoice.status != 'void' and invoice.status != 'paid' %}
<form method="post" action="{% url 'payments:invoice_send' invoice.pk %}" style="display:inline">{% csrf_token %}
<button class="btn btn-primary" type="submit">Email pay link</button>
</form>
<form method="post" action="{% url 'payments:invoice_void' invoice.pk %}" style="display:inline" onsubmit="return confirm('Void this invoice?');">{% csrf_token %}
<button class="btn btn-ghost" type="submit">Void</button>
</form>
{% endif %}
<p><a href="{% url 'payments:invoice_list' %}">← All invoices</a></p>
{% endblock %}
@@ -0,0 +1,21 @@
{% extends "portal_base.html" %}
{% block title %}Invoices · Portal{% endblock %}
{% block topbar_title %}Invoices{% endblock %}
{% block portal_content %}
<p><a class="btn btn-primary" href="{% url 'payments:invoice_create' %}">New invoice</a></p>
<table class="table">
<thead><tr><th>Number</th><th>Contact</th><th>Amount</th><th>Status</th></tr></thead>
<tbody>
{% for inv in invoices %}
<tr>
<td><a href="{% url 'payments:invoice_detail' inv.pk %}">{{ inv.number }}</a></td>
<td>{{ inv.contact }}</td>
<td>{{ inv.amount }} {{ inv.currency|upper }}</td>
<td>{{ inv.get_status_display }}</td>
</tr>
{% empty %}
<tr><td colspan="4" class="empty-state">No invoices yet.</td></tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
+10
View File
@@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block title %}Pay {{ invoice.number }}{% endblock %}
{% block content %}
<section class="section section-lg"><div class="container">
<h1>Invoice {{ invoice.number }}</h1>
{% if closed %}<p>This invoice is no longer payable.</p>
{% elif error %}<p>{{ error }}</p>
{% else %}<p>Redirecting to checkout…</p>{% endif %}
</div></section>
{% endblock %}
@@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block title %}Payment received{% endblock %}
{% block content %}
<section class="section section-lg"><div class="container">
<h1>Thank you</h1>
<p>Payment for {{ invoice.number }} was received{% if invoice.status == 'paid' %}{% endif %}.</p>
</div></section>
{% endblock %}