{% extends "base.html" %}

{% block title %}
	&raquo; MOP Contracts &raquo; {{batch.contract.name}} &raquo; Batches &raquo; 
 	{{batch.reference}} &raquo; Bill Imports
{% endblock %}

{% block nav %}
	&raquo; <a href="/mop_contracts">MOP Contracts</a> &raquo; 
	<a href="/mop_contracts/{{batch.contract.id}}">{{batch.contract.name}}</a>
 	&raquo; 
	<a href="/mop_batches?mop_contract_id={{batch.contract.id}}">Batches</a>
 	&raquo; 
	<a href="/mop_batches/{{batch.id}}">{{batch.reference}}</a>
 	&raquo; Bill Imports
{% endblock %}

{% block content %}

	<!-- Layer Section -->
	<div class="layer-section">
		<!-- Section Header -->
		<div class="section-header">
			<h2>Import Bill File</h2>	
		</div>
		<!-- End Section Header -->
		<!-- Section Content -->
		<div class="section-content">
			<div class="section-data">
				<div class="standardForm">
					<form enctype="multipart/form-data" method="post">
						<fieldset>
							<input type="hidden" name="mop_batch_id" value="{{batch.id}}">
							<input type="file" name="import_file" size="45"
								value="{{request.values.import_file}}">
							<input type="submit" value="Import">
							<p>Valid file name extensions are {{parser_names}}.</p>
							<table class="DataTable widthAuto">
								<caption>The '.csv' Format</caption>
								<tbody>
									<tr>
										<td>
											# Bill Type (N - Normal, W - Withdrawn or F -Final)
										</td>
										<td>Account Reference</td>
										<td>Mpans</td>
										<td>Invoice Reference</td>
										<td>Issue Date (YYYY-mm-dd HH:MM)</td>
										<td>Start Date (YYYY-mm-dd HH:MM)</td>
										<td>Finish Date (YYYY-mm-dd HH:MM)</td>
										<td>kWh</td>
										<td>Net</td>
										<td>VAT</td>
										<td>Gross</td>
										<td>Breakdown</td>
									</tr>
								</tbody>
							</table>
						</fieldset>
					</form>
				</div>
			</div>
			<div class="section-data">
				{% if importer_ids %}
					<ul>
						{% for id in importer_ids %}
							<li>
								<a href="/mop_bill_imports/{{id}}">{{id}}</a>
							</li>
						{% endfor %}
					</ul>
				{% endif %}
			</div>
		</div>
		<!-- End Section Content -->
	</div>
	<!-- End Layer Section -->

{% endblock %}
