<h1>{{@page_data['title']}}</h1>
<h2>{{@products['products'][0]['title']}}</h2>
<form name="receipts_chpok_end_form" method="POST" action="/receipts/chpok">
	<input type="hidden" name="product_id" value="{{@products['products'][0]['id']}}">
	<table width="100%">
		<tr style="{{@products['products'][0]['egais']==2?'display: none;':''}}">
			<td>
				<i class="fas icon fa-qrcode"></i>
			</td>
			<td>
				<input type="text" name="code" placeholder="Код марки товара" autocomplete="off" {{@products['products'][0]['egais']==1?'required="true"':''}}>
			</td>
		</tr>
		<tr style="{{@products['products'][0]['barcodes'][0]['barcode']?'display: none;':''}}">
			<td>
				<i class="fas icon fa-barcode"></i>
			</td>
			<td>
				<input type="text" name="barcode" value="{{@products['products'][0]['barcodes'][0]['barcode']}}" placeholder="Штрих-код товара" autocomplete="off" required="true">
			</td>
		</tr>
		<tr style="{{@products['products'][0]['price']>0?'display: none;':''}}">
			<td>
				<i class="fas icon fa-ruble-sign"></i>
			</td>
			<td>
				<input type="text" name="price" placeholder="Цена товара" value="{{(float)@products['products'][0]['price']>0?@products['products'][0]['price']:''}}" autocomplete="off" {{(float)@products['products'][0]['price']<=0?'required="true"':''}}>
			</td>
		</tr>
		<tr>
			<td align="center" colspan="2">
				<button type="submit" title="Вскрыть">
					<i class="fas fa-glass-cheers"></i>
					Вскрыть
				</button>
			</td>
		</tr>
	</table>
</form>
<script type="text/javascript">
$('form[name="receipts_chpok_end_form"] input[name="code"]').focus();
</script>