{% extends "base.html" %}

{% block title %}
	Gas Contracts &raquo; {{g_contract.name}} &raquo; Batches
{% endblock %}

{% block nav %}
	<a href="/g/supplier_contracts">Gas Contracts</a> &raquo;
	<a href="/g/supplier_contracts/{{g_contract.id}}">{{g_contract.name}}</a> &raquo;
	Batches [<a href="/g/supplier_contracts/{{g_contract.id}}/add_batch">add</a>]
{% endblock %}

{% block content %}
	<table>
		<thead>
			<tr>
				<th>View</th>
				<th>Reference</th>
				<th>Description</th>
				<th>Number Of Bills</th>
				<th>Net GBP</th>
				<th>VAT GBP</th>
				<th>Gross GBP</th>
				<th>kWh</th>
			</tr>
		</thead>
		<tbody>
			{% for row in g_batches %}
				{% set g_batch = row[0] %}
				<tr>
					<td><a href="/g/batches/{{g_batch.id}}">View</a></td>
					<td>{{g_batch.reference}}</td>
					<td>{{g_batch.description}}</td>
					<td>{{ "{:,}".format(row[1]) }}</td>
					<td>{{ "£{:,}".format(row[2]) }}</td>
					<td>{{ "£{:,}".format(row[3]) }}</td>
					<td>{{ "£{:,}".format(row[4]) }}</td>
					<td>{{ "{:,}".format(row[5]) }}</td>
				</tr>
			{% endfor %}
		</tbody>
	</table>
{% endblock %}
