<div id="display" align="">
	<table class="work_table reload">
		<tr class="hover_no">
			<th height="30">
				Архив заказов за {{date('d.m.Y', @GET.time)}}
			</th>
			<td width="100" align="right">
				<button onclick="window.open('','_self').close();">Закрыть</button>
			</td>
		</tr>
		<tr class="hover_no">
			<td colspan="2">
				<table width="100%">
					<tr class="hover_no">
						<td align="left">
							<a href="/receipts/archive?time={{@GET.time-(3600*24)}}&kitchen={{@GET.kitchen}}&bar={{@GET.bar}}">
								<button>Предыдущий день</button>
							</a>
						</td>
						<td align="center">
							<a href="/receipts/archive?time={{time()}}&kitchen={{@GET.kitchen}}&bar={{@GET.bar}}">
								<button>Сегодня</button>
							</a>
						</td>
						<td align="right">
							<a href="/receipts/archive?time={{@GET.time+(3600*24)}}&kitchen={{@GET.kitchen}}&bar={{@GET.bar}}">
								<button>Следующий день</button>
							</a>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr class="hover_no">
			<td valign="top" align="left" colspan="2">
				<repeat group="{{@receipts}}" key="{{@number}}" value="{{@turn}}">
					<repeat group="{{@turn}}" key="{{@turn_number}}" value="{{@order}}">
				<div class="order">
					<table width="100%">
						<tr class="h">
							<td colspan="3">
								<h2>{{@number}}</h2>
								Очередь {{@turn_number}}
							</td>
						</tr>
						<tr>
							<td colspan="3">
								<table width="100%">
									<tr class="hover_no">
										<th width="33%">Создан</th>
										<th>Готов</th>
										<th width="33%">Выдан</th>
									</tr>
									<tr class="hover_no">
										<td align="center">
											{{date('H:i', @receipts[@number][@turn_number]['create_order'])}}
										</td>
										<td align="center">
											<check if="{{@receipts[@number][@turn_number]['complite_order']>0}}">
												<true>
											{{date('H:i', @receipts[@number][@turn_number]['complite_order'])}}
												</true>
												<false>
											Не готов
												</false>
											</check>
										</td>
										<td align="center">
											<check if="{{@receipts[@number][@turn_number]['issued_order']>0}}">
												<true>
											{{date('H:i', @receipts[@number][@turn_number]['issued_order'])}}
											</true>
												<false>
											Не выдан
												</false>
											</check>
										</td>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					<repeat group="{{@order['lines']}}" value="{{@l}}">
						<tr class="hover_no line line_{{@l['id']}}">
							<td>
								<b>{{@l['product_title']}}</b>
							</td>
							<td width="10" align="center">
								X
							</td>
							<td width="90" align="right">
								{{numberformat(@l['count'], 3, '.', '')}}
							</td>
						</tr>
						<repeat group="{{@l['modifiers']}}" value="{{@m}}">
						<tr class="hover_no line tree last_tree line_{{@m['id']}}">
							<td>
								<b>{{@m['product_title']}}</b>
							</td>
							<td width="10" align="center">
								X
							</td>
							<td width="90" align="right">
								{{numberformat(@m['count'], 3, '.', '')}}
							</td>
						</tr>
						</repeat>
						<tr class="modifiers_add_{{@l['id']}} hide"><td colspan="3"></td></tr>
					</repeat>
					</table>
				</div>
					</repeat>
				</repeat>
			</td>
		</tr>
	</table>
</div>
