{breadcrumbs}<a href="{$GLOBALS.site_url}/manage-invoices/">[[Orders]]</a> / [[View Order]]{/breadcrumbs}
<div class="page-title page-title--wide">
	<h1 class="title">[[View Order]]</h1>
	<div class="page-title__buttons">
		{if $user}
			<a class="grayButton" href="{$GLOBALS.user_site_url}/invoice/{$invoice_sid}/{$invoice_hash}/" target="_blank">[[View Invoice]]</a>
		{/if}
	</div>
</div>
{include file='errors.tpl'}
<div class="panel panel-default panel--wide">
	<div class="panel-heading">
		<h3 class="panel-title">&nbsp;[[View Order]]</h3>
	</div>
	<form method="post" enctype="multipart/form-data" class="panel-body">
		<input type="hidden" name="action" value="save" id="action">
		<input type="hidden" name="sid" value="{$invoice_sid}"/>
		<div class="table-responsive">
			<table class="table table-clear table__invoice">
				<tr>
					<td class="text-right">[[Customer]]:</td>
					{if $user}
						<td><a href="{$GLOBALS.site_url}/edit-user/?user_sid={$user.sid}">{if $user.CompanyName}{$user.CompanyName|escape}{else}{$user.FullName|escape}{/if}</a></td>
					{else}
						<td><span class="invoice-washy">[[User deleted]]</span></td>
					{/if}
					<td class="text-right">[[Order Status]]:</td>
					<td>{display property="status"}</td>
				</tr>
				<tr>
					<td class="text-right">[[Order Date]]:</td>
					<td>{display property="date"}</td>
					<td class="text-right">[[Payment Method]]:</td>
					<td>{display property="payment_method"}</td>
				</tr>
				{input property='items' template="items_complex.tpl"}
				<tr>
					<td colspan="3" class="text-left">
						[[Sub Total]]
					</td>
					<td>
						{display property='sub_total' assign="subtotal"}{currencyFormat amount=$subtotal}
					</td>
				</tr>
				<tr id="tax_info" {if !$include_tax}style = "display:none"{/if}>
					<td colspan="3" class="text-left">
						[[Tax]]
					</td>
					<td>
						{currencyFormat amount=$tax.tax_amount}
					</td>
				</tr>
				<tr>
					<td colspan="3" class="text-left">
						[[Total]]
					</td>
					<td>
						{display property='total' assign="total"}{currencyFormat amount=$total}
					</td>
				</tr>
			</table>
		</div>
	</form>
</div>
<br/><br/>
{include file="transactions_by_invoice.tpl"}
