<vn>
<vn-lot-query id="params">
	<vn-spec name="ticket" type="Number"/>
</vn-lot-query>
<db-lot id="ticket" lot="params">
	CALL clientTicketGet(#ticket)
</db-lot>
<h1 id="title">
	_OrderDetail
</h1>
<div id="actions" class="action-bar">
	<htk-bar-button
		icon="receipt"
		tip="_Delivery note"
		on-click="onPrintClick"/>
</div>
<div id="main" class="ticket">
	<div class="card form">
		<div class="head">
			<div>
				<p class="important ticket-id">
					@{{ticket.id}}
				</p>
				<p>
					<htk-text lot="ticket" name="delivery" format="%D"/>
				</p>
			</div>
			<div>
				<p>
					<span>_Delivery</span> {{ticket.Agencia}}
				</p>
				<p>
					{{ticket.consignee}}
				</p>
				<p>
					{{ticket.name}}
				</p>
				<p>
					{{ticket.consignee}} {{ticket.city}} ({{ticket.province}})
				</p>
			</div>
			<div>
				<p class="important total">
					_Total 
					<htk-text lot="ticket" name="total" format="%.2d€"/>
				</p>
				<p class="important total">
					_Total + VAT 
					<htk-text lot="ticket" name="totalPlusVat" format="%.2d€"/>
				</p>
			</div>
		</div>
		<htk-repeater renderer="repeaterFunc">
			<db-model property="model" id="movements" lot="params">
				CALL clientTicketRowGet(#ticket)
			</db-model>
			<custom>
				<div class="line">
					<htk-image
						value="{{Foto}}"
						class="photo"
						directory="catalog"
						subdir="200x200"
						full-dir="900x900"/>
					<p class="concept">
						{{concept}} {{Medida}} {{Categoria}}
					</p>
					<p class="amount">
						{{amount}} x 
						<htk-text lot="iter" name="price" format="%.2d€"/>
						<span class="subtotal">
							<htk-text id="subtotal" format="%.2d€"/>
						</span>
					</p>
					<div class="clear"/>
				</div>
			</custom>
		</htk-repeater>
	</div>
</div>
</vn>
