{% extends "base.html" %}

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

{% block nav %}
	<a href="/e/supplier_contracts">Supplier Contracts</a> &raquo; 
	<a href="/e/supplier_contracts/{{batch.contract.id}}">{{batch.contract.name}}</a>
	&raquo; 
	<a href="/e/supplier_batches?supplier_contract_id={{batch.contract.id}}">Batches</a>
	&raquo; 
	<a href="/e/supplier_batches/{{batch.id}}">{{batch.reference}}</a>
 	&raquo; Edit
{% endblock %}

{% block content %}
	
<form action="/e/supplier_batches/{{batch.id}}/edit" method="post">
		<fieldset>
			<legend>Update batch</legend>
			<label>Reference</label> {{input_text('reference', batch.reference)}}
			<label>Description</label> {{input_text('description', batch.description)}}
			<input type="submit" name="update" value="Update">
		</fieldset>
	</form>

	<form hx-delete="/e/supplier_batches/{{batch.id}}/edit"
			hx-confirm="Are you sure you want to delete this batch and all its bills?">
		<fieldset>
			<legend>Delete this batch</legend>
			<input type="submit" name="confirm_delete" value="Delete">
		</fieldset>
	</form>
{% endblock %}
