{% extends "base.html" %}

{% block title %}
	&raquo; DC Contracts &raquo; {{batch.contract.name}} &raquo; Batches
	&raquo; {{batch.reference}} &raquo; Upload Bill File
{% endblock %}

{% block nav %}
	<a href="/e/dc_contracts">DC Contracts</a> &raquo; 
	<a href="/e/dc_contracts/{{batch.contract.id}}">{{batch.contract.name}}</a>
 	&raquo; 
	<a href="/e/dc_batches?dc_contract_id={{batch.contract.id}}">Batches</a> &raquo;
	<a href="/e/dc_batches/{{batch.id}}">{{batch.reference}}</a> &raquo; 
 	Upload Bill File
{% endblock %}

{% block content %}
	<form enctype="multipart/form-data" method="post"
			action="/e/dc_batches/{{batch.id}}/upload_file">
		<fieldset>
			<legend>Upload Bill File</legend>	
			<label>File</label>
			<input type="file" name="import_file" value="{{request.values.import_file}}">
			<label>Parser</label>
			<select name="parser_name">
				{% for parser_name in parser_names  %}
					{{input_option('bill_parser_name', parser_name, parser_name)}}
				{% endfor %}
			</select>
			<input type="submit" value="Upload">
		</fieldset>
	</form>

	<table>
		<caption>The '.csv' Format</caption>
		<tbody>
			<tr>
				<td># Bill Type (N - Normal, W - Withdrawn or F -Final)</td>
				<td>Account Reference</td>
				<td>MPAN Core</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>
		
{% endblock %}
