<table width="100%" style="background: #333; border: 0;" cellpadding="0" cellspacing="0">
	<tr>
		<td style="border: 0; padding: 5px;">
			<h1 style="color: #fff; margin: 0;"><?=$order->id_restaurant == 1 ? 'One Button Wenzel' : 'Crunchbutton'?></h1>
		</td>
		<td style="border: 0; padding: 5px; text-align: right;">
			<h1 style="color: #fff; margin: 0;">order #<?=$order->id_order?></h1>
		</td>
	</tr>
</table>

<br />

<table width="100%" celpadding="0" cellspacing="0">
	<tr>
		<td><b>Customer</b></td>
		<td><b>Restaurant</b></td>
	</tr>
	<tr>
		<td width="50%" valign="top">
			<h1><?=$order->name?></h1>
			<h2><?=$order->phone()?></h2>
			<h2>
				<? if ($order->delivery_type == 'delivery') : ?>
					<?=nl2br(strip_tags($order->address))?><br />
				<? endif ; ?>
			</h2>
		</td>
		<td width="50%" valign="top">
			<h1><?=$order->restaurant()->name?></h1>
			<h2><?=$order->date()->format('D, M jS Y, H:i:s (T)')?></h2>
		</td>
	</tr>
</table>

<br /><br />

<h1 style="text-align: center">
	<u><strong><?=strtoupper($order->delivery_type)?></u></strong>, 
	
<? if ($order->pay_type == 'card') : ?>
	already paid & tipped by CARD
<? else : ?>
	paying by CASH
<? endif ; ?>
<br />
	
</h1>

<br />




<? if ($order->notes) : ?>
	<h2>&#9733; NOTES &#9733;<br />
		<?=nl2br(strip_tags($order->notes))?>
	</h2><br />
<? endif ; ?>

<br />
<?=$this->render('order/details',['set' => ['order' => $order, 'user' => $user]]);?>

<? if (!$user) : ?>
	<br /><br /><br />
	<table width="100%" celpadding="0" cellspacing="0" class="noborder">
		<tr>
			<td class="imporant">
				This order was sent on behalf of <b><?=$order->name?></b>.<br />
				Contact the customer at:
				<h1><?=$order->phone()?></h1><br />
			</td>
			<td>
				For technical related issues, contact Crunchbutton at:<br />
				<h2><?=c::config()->phone->restaurant?></h2>
				<h2>restaurant-support@crunchbutton.com</h2>
			</td>
		</tr>
	</table>
<? endif ; ?>





<? if (!$user && $order->restaurant()->customer_receipt) : ?>
	<br /><br />
	<div style="border-top: 1px dashed black"> </div>
	<br /><br />
	
	<h2 align="center">Customer Copy</h2>
	<br /><br />
	<h1 style="text-align: center"><?=$order->restaurant()->name?></h1>
	<br /><br />
	<?=$this->display('order/details',['set' => ['order' => $order]])?>
<? endif ; ?>


<? if ($user) : ?>
<script>window.print();</script>
<? endif ; ?>
