<?php $v->layout("_theme");
$v->insert("views/page-title", ["pageTitle" => $pageTitle, "breadcrumb" => $breadcrumb]);
?>
<section id="content">
<div class="content-wrap">
<div class="container clearfix">
<div class="row clearfix">
<div class="col-md-3 clearfix">
<?php
$v->insert("views/restricted/side-menu");
?>
</div>
<div class="w-100 line d-block d-md-none"></div>
<div class="col-md-9">
<div class="clear"></div>
<div class="row clearfix">
<div class="col-lg-12" id="j_scroll">
<div class="row">
<div class="col-md-3">
<div class="padding-30 center white-text rounded " style="background-color: <?= status($order->status)->color?>; height: 100%; display: table; width: 100%">
<div style="display: table-cell; vertical-align: middle;">
<i class="fal <?= status($order->status)->icon?>" style="font-size: 3em; margin-bottom: 10px"></i><br><span class="small"><?= status($order->status)->text?></span>
</div>
</div>
</div>
<div class="col-md-4 ">
<div class="padding-30 left small rounded bg-gray" style=" height: 100%; ">
<p>
<b>[#<?= order_id($order->id) ?>]</b><br>
<b><?= $order->payment_type ?></b><br>
Nº de Parcelas: <b><?= $order->installments ?>x</b><br>
Entrega: <b><?= $order->shipment_type ?></b><br>
Rastreio: <b><?= $order->shipment_code ? $order->shipment_code : "NA" ?></b><br>
</p>
</div>
</div>
<div class="col-md-5">
<div class="padding-30 left small rounded bg-gray" style=" height: 100%; ">
<p>
<b><?= user()->fullName() ?></b><br>
<?= $order->street ?> <?= $order->complement ? " - ".$order->complement : ""?><br>
<?= $order->city ?><br>
Cep: <?= $order->zipcode ?><br>
CPF: <?= user()->document ?><br>
</p>
</div>
</div>
</div>
<?php if($order->status == "waiting_payment"):?>
<div class="row topmargin-sm bottommargin-sm">
<div class="col-md-12">
<div class="small rounded bg-gray center padding-10">
<p>Código de Barras<br><b class="font-medium"><?= $order->billet_barcode?></b></p>
<p><a href="<?= $order->billet_link?>" class="button button-small rounded nobottommargin notopmargin" target="_blank"> Boleto</a> </p>
</div>
</div>
</div>
<?php endif; ?>
<div class="table-responsive topmargin-sm">
<table class="table cart">
<thead>
<tr>
<th class="cart-product-thumbnail"> </th>
<th class="cart-product-name">Produto</th>
<th class="cart-product-quantity">Quantidade</th>
<th class="cart-product-quantity">Valor</th>
</tr>
</thead>
<tbody>
<?php
foreach ($itens as $products):
?>
<tr class="cart_item padding-30">
<td class="cart-product-thumbnail">
<a href="#"><img src="<?= image($products->product()->cover, 80,80) ?>" title="<?= $products->product_name ?>"></a>
</td>
<td class="cart-product-name">
<a href="#"><?= $products->product_name ?></a>
</td>
<td class="cart-product-quantity">
<div class="quantity clearfix">
<?= $products->quantity ?>
</div>
</td>
<td class="cart-product-price">
<div class="price clearfix">
R$ <?= preco_real($products->price) ?>
</div>
</td>
</tr>
<?php
endforeach;
?>
</tbody>
</table>
<div class="row clearfix bg-gray padding-30 rounded">
<div class="col-lg-12 clearfix">
<h4>Totais</h4>
<div class="table-responsive">
<table class="table cart">
<tbody>
<tr class="cart_item">
<td class="cart-product-name">
<strong>Subtotal</strong>
</td>
<td class="cart-product-name">
<span class="amount"><b>R$ <span id="j_sub_total"><?= preco_real($order->products_price) ?></b></span>
</td>
</tr>
<tr class="cart_item">
<td class="cart-product-name">
<strong>Valor Frete</strong>
</td>
<td class="cart-product-name">
<span class="amount">R$ <?= preco_real($order->shipment_price) ?> </span> (<?= $order->shipment_type ?>)
</td>
</tr>
<tr class="cart_item">
<td class="cart-product-name">
<strong>Total</strong>
</td>
<td class="cart-product-name">
<span class="amount color lead"><strong>R$ <span id="j_total"><?= preco_real($order->products_price + $order->shipment_price ) ?></strong></span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section><!-- #content end -->