<div class="content2">
	<h1>{{@receipt_search[@order['type_id']]}} № {{@order['number']}} от {{date('d.m.Y', @order['time'])}}</h1>
	<check if="{{@order['status']}}">
	<p><b>Статус заказа</b>: <span class="order_status">{{@order['status']}}</span></p>
	</check>
	<p><b>Заказчик</b>: {{@order['partner_title']}}</p>
	<check if="{{@order['other']['email']}}">
	<p><b>E-mail</b>: {{@order['other']['email']}}</p>
	</check>
	<check if="{{@order['other']['phone']}}">
	<p><b>Телефон</b>: {{@order['other']['phone']}}</p>
	</check>
	<repeat group="{{@order['payment']}}" value="{{@pay}}">
		<p><b>{{@paymentmethods[@pay[0]]}}</b>: {{number_format(@pay[1], 2, '.', '')}}</p>
	</repeat>
	<table width="100%">
		<tr>
			<th colspan="2" align="center">Наименования</th>
		</tr>
		<repeat group="{{@order['receiptlines']}}" value="{{@l}}">
		<tr>
			<td>
				{{html_entity_decode(@l['title'])}}
			</td>
			<td align="right" width="150">
				{{numberformat(@l['count'], 3, '.', '')}}
				X
				{{number_format(@l['sum']/@l['count'], 2, '.', '')}}
				&equiv;
				{{number_format(@l['sum'], 2, '.', '')}}
			</td>
		</tr>
		</repeat>
		<tr>
			<td align="right">
				<b>Итого</b>:
			</td>
			<td align="right">
				<big>{{number_format(@order['sum'], 2, '.', '')}}</big>
			</td>
		</tr>
		<tr>
			<td align="center" colspan="2">
				<check if="{{isset(@order['other']['delivery']['sd_data']['button']) && is_array(@order['other']['delivery']['sd_data']['button'])}}">
				<button type="button" class="delivery_button" href="/api/deliveryaction?url={{urlencode(@order['other']['delivery']['sd_data']['button']['url'].'?id='.@order['id'])}}">
					{{@order['other']['delivery']['sd_data']['button']['title']}}
				</button>
				</check>
				<form action="/receipts/search_online_order" method="POST">
					<input type="hidden" name="order" value="{{urlencode(json_encode(@order))}}">
					<input type="submit" value="Создать чек">
					<check if="{{@order['status']}}">
					<input type="button" value="Изменить cтатус" class="show_window" href="/receipts/online_order_status?id={{@order['id']}}">
					</check>
				</form>
			</td>
		</tr>
	</table>
</div>