<vn>
<vn-lot-query id="params">
	<vn-spec name="from" type="Date"/>
</vn-lot-query>
<h1 id="title">
	_Invoices
</h1>
<div id="main" class="invoices">
	<div class="card form">
		<div>
			<label>_Show invoices from</label>
			<htk-date-chooser lot="params" name="from"/>
		</div>
	</div>
	<div class="card">
		<htk-grid show-header="false">
			<db-model property="model" lot="params">
				SELECT invoice_id, serial_num, issued, amount
					FROM invoice_view
					WHERE issued >= #from
					ORDER BY issued DESC
			</db-model>
			<htk-column-text title="_Serial" column="serial_num"/>
			<htk-column-date title="_Date" column="issued" format="_%e %b %Y"/>
			<htk-column-spin title="_Import" column="amount" unit="€" digits="2"/>
			<htk-column-button
				column="invoice_id"
				icon="download"
				tip="_Download PDF"
				on-clicked="onDownloadClick"/>
		</htk-grid>
	</div>
</div>
</vn>
