<div class="content2">
	<h1>{{@data['title']?@data['title']:@page_data['title']}}</h1>
	<div class="ticket">
		<table width="100%">
			<repeat group="{{@data['lines']}}" value="{{@line}}">
			<tr>
				<td>
					{{@line['title']}}
				</td>
				<td align="right">
					{{numberformat(@line['count'], 3, '.', '')}}
				</td>
				<td width="5" align="right">
					X
				</td>
				<td width="25" align="right">
					{~@price=@line['price']+(@line['price']*(@line['vat']/100))*max(0, @line['vat_type'])~}
					{~@price=round(@price, 2)~}
					{{number_format(@price, 2, '.', '')}}
				</td>
				<td width="5" align="right">
					&equiv;
				</td>
				<td width="25" align="right">
					{~@sum=@price*@line['count']~}
					{~@total+=@sum~}
					{{number_format(@sum, 2, '.', '')}}
				</td>
			</tr>
			</repeat>
			<tr>
				<td colspan="6">
					<br>
				</td>
			</tr>
			<tr>
				<td colspan="4">
					<b>ИТОГ</b>
				</td>
				<td width="5" align="right">
					&equiv;
				</td>
				<td align="right">
					{{number_format(@total, 2, '.', '')}}
				</td>
			</tr>
		</table>
	</div>
	<br>
	<p align="center">
		<button type="button" class="show_window" href="/messages/continue?uri={{urlencode("/receipts/add_linesset?id=".@data['id'])}}">
			<i class="fas fa-receipt"></i>
			<br>
			<div class="small">Добавить в чек</div>
		</button>
		<a href="/receipts/pricetags?linesset_id={{@data['id']}}"><button type="button"><i class="fa fa-pen"></i><br><div class="small">Изменить</div></button></a>
		<button type="button" class="show_window" href="/messages/continue?uri={{urlencode("/linesset/delete?id=".@data['id'])}}">
			<i class="fa fa-times"></i>
			<br>
			<div class="small">Удалить</div>
		</button>
	</p>
</div>
<script>
window_open_alarm();
</script>