diff options
Diffstat (limited to 'app/templates/modules/invoices.html')
| -rw-r--r-- | app/templates/modules/invoices.html | 96 | 
1 files changed, 66 insertions, 30 deletions
| diff --git a/app/templates/modules/invoices.html b/app/templates/modules/invoices.html index 76fe267..55a4b87 100644 --- a/app/templates/modules/invoices.html +++ b/app/templates/modules/invoices.html @@ -1,44 +1,80 @@ -{# -*- mode: jinja2; -*- #} +{# -*- mode: web; -*- #}  {% extends "base.html" %}  {% block title %} -  Products +Invoices  {% endblock %} -{% block content %} +{% block actions %} +<li><a href="{{ url_for('common.add_item', module='invoices', table='Invoice') }}" class="button">Add invoice</a></li> +<li></li> +{% endblock %} -  <div id="actions"> -    <a href="{{ url_for('add_invoice') }}" class="button">New invoice</a> -  </div> +{% block content %} +<i>Track your invoices and create new ones here.</i><br/> -      <i>Track your invoices and create new ones here.</i> -   -  <table> +<center> +{% for page_num in invoices.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %} +{% if page_num %} +<!-- Check for the active page and set the link to "Active"--> +{% if invoices.page == page_num %} +<a href="{{ url_for('invoices.view', page=page_num) }}" +   class="button"> +    {{ page_num }} +</a> +{% else %} +<a href="{{ url_for('invoices.view', page=page_num) }}" +   class="button button-light"> +    {{ page_num }} +</a> +{% endif %} +{% else %} +... +{% endif %} +{% endfor %} +</center> +<table>      <thead> -      <tr> -	<th colspan=2><i>Actions</i></th> -	<th>Name</th> -	<th>Price (net)</th> -	<th>Price (gross)</th> -	<th>Updated</th> -      </tr> +	<tr> +	    <th><i>Actions</i></th> +	    <th>ID</th> +	    <th>Created</th> +	    <th>Alternative Invoice ID</th> +	    <th>Customer Name</th> +	    <th>Customer Reference</th> +	    <th>Date Billed</th> +	    <th>Date Due</th> +	    <th>Amount (Net €)</th> +	    <th>Amount (Gross €)</th> +	    <th>Tax Amount (€)</th> +	</tr>      </thead>      <tbody> -      {% for invoice in invoices %} +	{% for invoice in invoices.items %}  	<tr> -	  <td><button>edit</button></td> -	  <td><button formaction="/">delete</button></td> -	  <td>{{ product.name }}</td> -	  <td>{{ product.price_net }}</td> -	  <td>{{ product.price_gross }}</td> -	  {% if product.date_time_updated %} -	    <td>{{ product.date_time_updated }}</td> -	  {% else %} -	    <td>{{ product.date_time_created }}</td> -	  {% endif %} - +	    <td> +		<form method="post" action="{{ url_for('common.delete_item', module='invoices', pk=invoice.primary_key, table='Invoice') }}"> +		    <button>delete</button> +		</form> +		<form method="post" action="{{ url_for('common.edit_item', module='invoices', pk=invoice.primary_key, table='Invoice') }}"> +		    <button>edit</button> +		</form> +		<form method="get" action="{{ url_for('invoices.preview', pk=invoice.primary_key) }}"> +		    <button>preview</button> +		</form> +	    </td> +	    <td>{{ invoice.primary_key }}</td> +	    <td>{{ invoice.date_time_created }}</td> +	    <td>{{ invoice.invoice_id_alt }}</td> +	    <td>{{ invoice.customer.name }}</td> +	    <td>{{ invoice.customer_reference }}</td> +	    <td>{{ invoice.date_billed }}</td> +	    <td>{{ invoice.date_due }}</td> +	    <td>{{ invoice.amount_net }}</td> +	    <td>{{ invoice.amount_gross }}</td> +	    <td>{{ invoice.amount_tax }}</td>  	</tr> -      {% endfor %} +	{% endfor %}      </tbody> -  </table> +</table>  {% endblock %} | 
