
<?php $__env->startSection('status'); ?>
<div class="panel panel-default">
	<div class="panel-heading"><h4>Order Details</h4></div>
	<div class="panel-body">
		<div class="alert alert-warning">
			<b>NOTE :</b> After make payment, please fill in 
			<a href="/member/buy/payment-confirmation">Payment Confirmation</a> form.
		</div>
		<div class="panel-body" style="border:solid 1px #eee">
			<div class="col-md-2"><img src="/img-logo/<?php echo $orderDetail->profile->shop_logo; ?>"></div>
			<div class="col-md-4">
				<h4><?php echo $orderDetail->profile->shop_name; ?></h4>
				<h5><?php echo $orderDetail->profile->shop_address; ?><br><?php echo $orderDetail->profile->officephone; ?></h5>
			</div>
			<div class="col-md-12"><hr style="border:solid 1px #eee"></div>
			<div class="col-md-4">
				<h5 style="margin-top:0px"><b><?php echo $orderDetail->user->name; ?></b><br><?php echo $orderDetail->user->profile->address; ?></h5>
			</div>
			<div class="col-md-8 right top">
				<h5 style="margin-top:0px"><?php echo $orderDetail->orderStatus[0]->tarikh; ?></h5>
			</div>
			<div class="col-md-12">
				<h4 class="center">INVOICE</h4>
				<br>
				<span class="pull-right"><b>Order ID : <?php echo $orderDetail->user_id; ?>/<?php echo $orderDetail->id; ?></b></span>
				<table class="table table-condensed table-bordered">
					<thead>
						<tr>
							<th class="center">#</th>
							<th class="center">Product Code</th>
							<th class="center">Description</th>
							<th class="center">Quantity</th>
							<th class="center">Unit Price</th>
							<th class="center">Amount</th>
						</tr>
					</thead>
					<tbody>
						<?php $i=1; $amount=$total=0;?>
						<?php foreach($orderDetail->orderDetails as $detail): ?>
						<?php $amount = $detail->unit_price * $detail->quantity; ?>
						<tr>
							<td class="center"><?php echo $i++; ?></td>
							<td class="center"><?php echo $detail->product_id; ?></td>
							<td ><?php echo $detail->product->name; ?></td>
							<td class="center"><?php echo $detail->quantity; ?></td>
							<td class="right"><?php echo $detail->unit_price; ?></td>
							<td class="right"><?php echo $amount; ?><?php $total += $amount; ?></td>
						</tr>
						<?php endforeach; ?>
						<tr>
							<td class="center"><?php echo $i++; ?></td>
							<td class="center">-</td>
							<td>Shipping charge</td>
							<td class="center">-</td>
							<td class="center">-</td>
							<td class="right"><?php echo $orderDetail->delivery_charge; ?>
								<?php $total += $orderDetail->delivery_charge; ?>
							</td>
						</tr>
					</tbody>
					<thead>
						<tr>
							<th colspan="5" class="right">Total Price</th>
							<th class="right"><?php echo $total; ?></th>
						</tr>
					</thead>
				</table>
			</div>
			<div class="col-md-12 center">
				<h6>
					Please make payment within 2 days from date approved.
					<br>Thank You for Shopping with Us.
				</h6>
			</div>
		</div>
		<br>
		<button type="button" class="btn btn-warning pull-right">Print Invoice</button>

	</div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('/member/buy/order', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>