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.
63 lines
1.6 KiB
63 lines
1.6 KiB
<!doctype html> |
|
<html> |
|
<head> |
|
<title>Subscriptions</title> |
|
<style> |
|
.status-active { color: #166534; font-weight: bold; } |
|
.status-paused { color: #92400e; font-weight: bold; } |
|
.status-cancelled { color: #991b1b; font-weight: bold; } |
|
</style> |
|
<link rel="icon" type="image/png" href="/static/favicon.png"> |
|
</head> |
|
<body> |
|
|
|
<h1>Subscriptions</h1> |
|
|
|
<p><a href="/">Home</a></p> |
|
<p><a href="/subscriptions/new">Add Subscription</a></p> |
|
|
|
<form method="post" action="/subscriptions/run" style="margin: 0 0 16px 0;"> |
|
<button type="submit">Generate Due Invoices Now</button> |
|
</form> |
|
|
|
{% if request.args.get('run_count') is not none %} |
|
<div style="border:1px solid #166534;background:#dcfce7;padding:10px;margin-bottom:15px;max-width:900px;"> |
|
Recurring billing run completed. Invoices created: {{ request.args.get('run_count') }} |
|
</div> |
|
{% endif %} |
|
|
|
<table border="1" cellpadding="6"> |
|
<tr> |
|
<th>ID</th> |
|
<th>Client</th> |
|
<th>Subscription</th> |
|
<th>Service</th> |
|
<th>Interval</th> |
|
<th>Price</th> |
|
<th>Next Invoice</th> |
|
<th>Status</th> |
|
</tr> |
|
|
|
{% for s in subscriptions %} |
|
<tr> |
|
<td>{{ s.id }}</td> |
|
<td>{{ s.client_code }} - {{ s.company_name }}</td> |
|
<td>{{ s.subscription_name }}</td> |
|
<td> |
|
{% if s.service_code %} |
|
{{ s.service_code }} - {{ s.service_name }} |
|
{% else %} |
|
- |
|
{% endif %} |
|
</td> |
|
<td>{{ s.billing_interval }}</td> |
|
<td>{{ s.price|money(s.currency_code) }} {{ s.currency_code }}</td> |
|
<td>{{ s.next_invoice_date }}</td> |
|
<td class="status-{{ s.status }}">{{ s.status }}</td> |
|
</tr> |
|
{% endfor %} |
|
</table> |
|
|
|
{% include "footer.html" %} |
|
</body> |
|
</html>
|
|
|