Netdeploy2 Babyyyy
This commit is contained in:
34
templates/invoices/list.html
Normal file
34
templates/invoices/list.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<h2>Invoices</h2>
|
||||
|
||||
<table border="1" cellpadding="6">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Client</th>
|
||||
<th>Status</th>
|
||||
<th>Total</th>
|
||||
<th>Paid</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
{% for inv in invoices %}
|
||||
<tr>
|
||||
<td>{{ inv.id }}</td>
|
||||
<td>{{ inv.client.name if inv.client else "" }}</td>
|
||||
<td>{{ inv.status }}</td>
|
||||
<td>${{ inv.total }}</td>
|
||||
<td>${{ inv.amount_paid }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('invoices.view_invoice', invoice_id=inv.id) }}">View</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">No invoices yet.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
41
templates/invoices/view.html
Normal file
41
templates/invoices/view.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<h2>Invoice #{{ inv.id }}</h2>
|
||||
|
||||
<p>
|
||||
<strong>Client:</strong> {{ inv.client.name if inv.client else "" }}<br>
|
||||
<strong>Status:</strong> {{ inv.status }}<br>
|
||||
<strong>Total:</strong> ${{ inv.total }}<br>
|
||||
<strong>Paid:</strong> ${{ inv.amount_paid }}<br>
|
||||
</p>
|
||||
|
||||
<h3>Lines</h3>
|
||||
|
||||
<table border="1" cellpadding="6">
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th>Qty</th>
|
||||
<th>Unit Price</th>
|
||||
<th>Line Total</th>
|
||||
</tr>
|
||||
|
||||
{% for l in inv.lines %}
|
||||
<tr>
|
||||
<td>{{ l.description }}</td>
|
||||
<td>{{ l.qty }}</td>
|
||||
<td>${{ l.unit_price }}</td>
|
||||
<td>${{ (l.qty or 0) * (l.unit_price or 0) }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">No lines found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<p style="margin-top: 16px;">
|
||||
<a href="{{ url_for('invoices.list_invoices') }}">Back to invoices</a>
|
||||
</p>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user