4 changed files with 190 additions and 82 deletions
@ -0,0 +1,45 @@ |
|||||||
|
<!doctype html> |
||||||
|
<html> |
||||||
|
<head> |
||||||
|
<title>Invoices</title> |
||||||
|
</head> |
||||||
|
|
||||||
|
<body> |
||||||
|
|
||||||
|
<h1>Invoices</h1> |
||||||
|
|
||||||
|
<p><a href="/">Home</a></p> |
||||||
|
<p><a href="/invoices/new">Create Invoice</a></p> |
||||||
|
|
||||||
|
<table border="1" cellpadding="6"> |
||||||
|
|
||||||
|
<tr> |
||||||
|
<th>ID</th> |
||||||
|
<th>Invoice</th> |
||||||
|
<th>Client</th> |
||||||
|
<th>Currency</th> |
||||||
|
<th>Total</th> |
||||||
|
<th>Status</th> |
||||||
|
<th>Issued</th> |
||||||
|
<th>Due</th> |
||||||
|
</tr> |
||||||
|
|
||||||
|
{% for i in invoices %} |
||||||
|
|
||||||
|
<tr> |
||||||
|
<td>{{ i.id }}</td> |
||||||
|
<td>{{ i.invoice_number }}</td> |
||||||
|
<td>{{ i.client_code }} - {{ i.company_name }}</td> |
||||||
|
<td>{{ i.currency_code }}</td> |
||||||
|
<td>{{ i.total_amount }}</td> |
||||||
|
<td>{{ i.status }}</td> |
||||||
|
<td>{{ i.issued_at }}</td> |
||||||
|
<td>{{ i.due_at }}</td> |
||||||
|
</tr> |
||||||
|
|
||||||
|
{% endfor %} |
||||||
|
|
||||||
|
</table> |
||||||
|
|
||||||
|
</body> |
||||||
|
</html> |
||||||
@ -0,0 +1,63 @@ |
|||||||
|
<!doctype html> |
||||||
|
<html> |
||||||
|
<head> |
||||||
|
<title>New Invoice</title> |
||||||
|
</head> |
||||||
|
|
||||||
|
<body> |
||||||
|
|
||||||
|
<h1>Create Invoice</h1> |
||||||
|
|
||||||
|
<form method="post"> |
||||||
|
|
||||||
|
<p> |
||||||
|
Client<br> |
||||||
|
<select name="client_id"> |
||||||
|
{% for c in clients %} |
||||||
|
<option value="{{ c.id }}">{{ c.client_code }} - {{ c.company_name }}</option> |
||||||
|
{% endfor %} |
||||||
|
</select> |
||||||
|
</p> |
||||||
|
|
||||||
|
<p> |
||||||
|
Service<br> |
||||||
|
<select name="service_id"> |
||||||
|
{% for s in services %} |
||||||
|
<option value="{{ s.id }}">{{ s.service_code }} - {{ s.service_name }}</option> |
||||||
|
{% endfor %} |
||||||
|
</select> |
||||||
|
</p> |
||||||
|
|
||||||
|
<p> |
||||||
|
Currency<br> |
||||||
|
<select name="currency_code"> |
||||||
|
<option value="CAD">CAD</option> |
||||||
|
<option value="ETHO">ETHO</option> |
||||||
|
<option value="EGAZ">EGAZ</option> |
||||||
|
<option value="ALT">ALT</option> |
||||||
|
</select> |
||||||
|
</p> |
||||||
|
|
||||||
|
<p> |
||||||
|
Total Amount<br> |
||||||
|
<input type="number" step="0.00000001" name="total_amount"> |
||||||
|
</p> |
||||||
|
|
||||||
|
<p> |
||||||
|
Due Date<br> |
||||||
|
<input type="date" name="due_at"> |
||||||
|
</p> |
||||||
|
|
||||||
|
<p> |
||||||
|
Notes<br> |
||||||
|
<textarea name="notes"></textarea> |
||||||
|
</p> |
||||||
|
|
||||||
|
<p> |
||||||
|
<button type="submit">Create Invoice</button> |
||||||
|
</p> |
||||||
|
|
||||||
|
</form> |
||||||
|
|
||||||
|
</body> |
||||||
|
</html> |
||||||
Loading…
Reference in new issue