{~@type=array(@receipt_sales=>'Продажа', @receipt_return=>'Возврат', @receipt_correct_sales=>'Коррекция/Продажа', @receipt_correct_return=>'Коррекция/Возврат', @receipt_cashin=>'Внесение', @receipt_cashout=>'Изъятие', @receipt_cashin=>'Внесение', @receipt_cashout=>'Изъятие', @receipt_change_open=>'Открытие смены', @receipt_change_close=>'Закрытие смены', @receipt_chpok=>'Вскрытие тары')~}
<table width="100%">
	<tr>
		<td valign="top" class="content2" id="receipts_search_result">
			<include href="pagination.htm" />
			<table class="work_table big_table">
				<tr>
					<th width="50" class="order_hide">
						№
					</th>
					<th width="100">
						<div class="order_hide">Дата</div>
						<div class="order_show">Чек</div>
					</th>
					<check if="{{@base_settings['cafe_mode']>0}}">
					<th width="100" class="order_hide">
						Зал, Стол
					</th>
					</check>
					<th width="100" class="order_hide">
						Тип
					</th>
					<th>
						Кассир
					</th>
					<th width="100" class="order_hide">
						Смена
					</th>
					<th width="100">
						Сумма
					</th>
					<th class="receipts_search_buttons">
					</th>
				</tr>
				<repeat group="{{@receipts}}" value="{{@receipt}}">
				<tr>
					<td align="center" class="order_hide">
						{{@receipt.id}}
					</td>
					<td align="center">
						<div class="order_show">№ {{@receipt.id}}</div>
						{{date('d.m.Y H:i:s', @receipt.time)}}
						<div class="order_show">{{@type[@receipt.type]}}</div>
						<check if="{{@base_settings['cafe_mode']>0}}">
						<div class="order_show">
							Зал {{@receipt.room_title}}
							<br>
							Стол {{@receipt.table_title}}
							<br>
						</div>
						</check>
					</td>
					<check if="{{@base_settings['cafe_mode']>0}}">
					<td class="order_hide" align="center">
						{{@receipt.room_title}}
						<br>
						{{@receipt.table_title}}
					</td>
					</check>
					<td align="center" class="order_hide">
						{{@type[@receipt.type]}}
						<check if="{{@receipt.nofr}}">
						<br><small class="false">тест</small>
						</check>
					</td>
					<td>
						{{@receipt.short_name}}<br>
						<small class="gray">({{@receipt.title}})</small>
					</td>
					<td align="center" class="order_hide">
						{{@receipt.changes}}<br>
					</td>
					<td align="center">
						{{number_format(abs(@receipt.sum), 2, '.', '')}}
					</td>
					<td align="right" class="receipts_search_buttons">
						<check if="{{in_array('receipts/show', @authorization_user.module)}}">
						<button class="show_window" href="/receipts/show?id={{@receipt.id}}" title="Просмотр">
							<i class="fas fa-search"></i>
							<br>
							<div class="small">Просмотр</div>
						</button>
						</check>
					</td>
				</tr>
				</repeat>
			</table>
			<include href="pagination.htm" />
		</td>
		<td id="receipts_search_panel" valign="top">
			<form name="receipts_search_form" class="no_ajax" method="GET" action="/receipts/search">
				<input type="text" name="id" class="receipt_id" value="{{@GET.id}}" autofocus autocomplete="off" placeholder="Номер чека">
				<br>
				<input type="text" name="changes" class="changes_id" value="{{@GET.changes}}" autofocus autocomplete="off" placeholder="Номер смены">
				<br>
				<input type="text" name="barcode" class="barcode" value="{{@GET.barcode}}" autocomplete="off" placeholder="Штрих-код товара">
				<br>
				<input type="text" name="dates" value="{{@GET.dates}}" autocomplete="off" placeholder="Период">
				<br>
				<select name="type">
					<option value="">Все чеки</option>
					<repeat group="{{@type}}" key="{{@type_id}}" value="{{@type_title}}">
					<option value="{{@type_id}}" {{@GET.type==@type_id?'selected="selected"':''}}>{{@type_title}}</option>
					</repeat>
				</select>
				<div class="virtual_keyboard">

					<input type="button" class="virtual_key" value='7' for='receipt_id'>
					<input type="button" class="virtual_key" value='8' for='receipt_id'>
					<input type="button" class="virtual_key" value='9' for='receipt_id'>
					<br>
					<input type="button" class="virtual_key" value='4' for='receipt_id'>
					<input type="button" class="virtual_key" value='5' for='receipt_id'>
					<input type="button" class="virtual_key" value='6' for='receipt_id'>
					<br>
					<input type="button" class="virtual_key" value='1' for='receipt_id'>
					<input type="button" class="virtual_key" value='2' for='receipt_id'>
					<input type="button" class="virtual_key" value='3' for='receipt_id'>
					<br>
					<input type="button" class="virtual_key virtual_key_delete" for='receipt_id' value="CE">
					<input type="button" class="virtual_key" value='0' for='receipt_id'>
					<button type="button" class="virtual_key_bks" for='receipt_id'>
						<i class="fas fa-long-arrow-alt-left"></i>
					</button>
					<br>
					<button type="submit">
						<i class="fas fa-search"></i>
					</button>
				</div>
			</form>
		</td>
	</tr>
</table>
<script type="text/javascript" src="/ui/scripts/moment.min.js"></script>
<script type="text/javascript" src="/ui/scripts/daterangepicker.min.js"></script>
<link rel="stylesheet" type="text/css" href="/ui/css/daterangepicker.css" />
<script>
calendar($('input[name="dates"]'));
</script>
