File: /home/armgroup/libs/storage/framework/views/2077138a108e36598f0535beb894fbb42a01ec6c.php
<?php $__env->startSection('content'); ?>
<div class="container my-5 body-content">
<div class="row">
<div class="col-lg-3 col-sm-12">
<?php echo $__env->make('account.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<div class="col-lg-9 col-sm-12">
<div class="card">
<h5 class="card-header"><?php echo e(__('Order')); ?> <?php echo e($order->tracking_code); ?>
<a href="<?php echo e(route('account.orders.index')); ?>" class="float-end btn btn-sm btn-dark"><?php echo e(__('Orders')); ?> <span class="fa fa-arrow-left"></span></a>
</h5>
<div class="card-body">
<?php if($order->delivery_code): ?>
<div class="alert alert-danger">
<strong><?php echo e($order->delivery_date ? __('Delivery Code') : __('Post tracking code')); ?>: </strong>
<?php echo e($order->delivery_code); ?>
</div>
<?php endif; ?>
<div class="table-responsive">
<table class="table table-hover table-condensed table-bordered table-striped tbl-card">
<thead class="thead">
<tr>
<th scope="col"><?php echo e(__('Tracking Code')); ?></th>
<th scope="col"><?php echo e(__('Price')); ?></th>
<th scope="col"><?php echo e(__('Payment Type')); ?></th>
<th scope="col"><?php echo e(__('Status')); ?></th>
<th scope="col"><?php echo e(__('Date')); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo e($order->tracking_code); ?></td>
<td><?php echo e(to_persian_numbers(number_format($order->price))); ?></td>
<td>
<span class="badge bg-<?php echo e($order->payment_type->color()); ?>">
<?php echo e($order->payment_type->description); ?>
</span>
</td>
<td>
<span class="badge bg-<?php echo e($order->status->color()); ?>">
<?php echo e($order->status->description); ?>
</span>
</td>
<td><?php echo e(to_persian_numbers(jdate($order->created_at))); ?></td>
</tr>
</tbody>
</table>
</div>
<?php if($order->payment_type->is(\App\Enums\OrderPaymentType::ONLINE)): ?>
<hr>
<div class="table-responsive">
<table class="table table-hover table-condensed table-bordered table-striped tbl-card">
<thead class="thead">
<tr>
<th scope="col">شناسه تراکنش</th>
<th scope="col">کد ارجاع</th>
<th scope="col">درگاه بانکی</th>
<th scope="col">IP</th>
<th scope="col">وضعیت</th>
<th scope="col">تاریخ</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $order->payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($payment->transaction_id); ?></td>
<td><?php echo e($payment->reference_id); ?></td>
<td><?php echo e(__($payment->driver)); ?></td>
<td><?php echo e($payment->ip); ?></td>
<td>
<span class="badge bg-<?php echo e($payment->status ? 'success' : 'danger'); ?>">
<?php if($payment->status): ?>
موفق
<?php else: ?>
ناموفق
<?php if($payment->error_message): ?>
(<?php echo e($payment->error_message); ?>)
<?php endif; ?>
<?php endif; ?>
</span>
</td>
<td><?php echo e(to_persian_numbers(jdate($order->created_at))); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<?php endif; ?>
<hr>
<div class="table-responsive">
<table class="table table-hover table-condensed table-bordered table-striped tbl-card">
<thead>
<tr class="text-center">
<th>#</th>
<th><?php echo e(__('Name')); ?></th>
<th><?php echo e(__('Quantity')); ?></th>
<th><?php echo e(__('Unit Price')); ?></th>
<th>تخفیف واحد</th>
<th><?php echo e(__('Total')); ?></th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $orderProducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $orderProduct): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr class="text-center">
<td><?php echo e($loop->iteration); ?></td>
<td>
<?php echo e($orderProduct->name); ?>
</td>
<td><?php echo e(to_persian_numbers($orderProduct->quantity)); ?></td>
<td><?php echo e(to_persian_numbers(number_format($orderProduct->price + $orderProduct->discount))); ?></td>
<td><?php echo e(to_persian_numbers(number_format($orderProduct->discount))); ?></td>
<td><?php echo e(to_persian_numbers(number_format($orderProduct->price * $orderProduct->quantity))); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
<tfoot>
<?php if($order->discount_code_price): ?>
<tr>
<th colspan="5">
<?php echo e(__('Discount Code')); ?>
<?php if($order->discountCode->title): ?>
(<?php echo e($order->discountCode->title); ?>)
<?php endif; ?>
</th>
<td class="text-center"><?php echo e(to_persian_numbers(number_format($order->discount_code_price))); ?></td>
</tr>
<?php endif; ?>
<?php if($order->discount): ?>
<tr>
<th colspan="5"><?php echo e(__('Your profit from this purchase')); ?></th>
<td class="text-center"><?php echo e(to_persian_numbers(number_format($order->discount + $order->discount_code_price))); ?></td>
</tr>
<?php endif; ?>
<tr>
<th colspan="5"><?php echo e(__('Shipping Price')); ?> (<?php echo e(is_null($order->shipping_type) ? __('Free') : \App\Models\Order::SHIPPING_TRANSLATE[$order->shipping_type]); ?>)</th>
<td class="text-center">
<?php echo e(to_persian_numbers(number_format($order->shipping_price))); ?>
</td>
</tr>
<tr>
<th colspan="5"><?php echo e(__('Total')); ?></th>
<td class="text-center"><?php echo e(to_persian_numbers(number_format($order->price))); ?></td>
</tr>
</tfoot>
</table>
</div>
<hr>
<div class="table-responsive">
<table class="table table-hover table-condensed table-bordered table-striped tbl-card">
<thead>
<tr>
<th><?php echo e(__('Recipient Name')); ?></th>
<th><?php echo e(__('Mobile')); ?></th>
<th><?php echo e(__('National Code')); ?></th>
<th><?php echo e(__('Province')); ?></th>
<th><?php echo e(__('City')); ?></th>
<th><?php echo e(__('Postal Code')); ?></th>
<th><?php echo e(__('Plaque')); ?></th>
<th><?php echo e(__('Floor')); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo e($address->name); ?></td>
<td><?php echo e(to_persian_numbers($address->mobile)); ?></td>
<td><?php echo e(to_persian_numbers($address->national_code)); ?></td>
<td><?php echo e($address->city->province->name); ?></td>
<td><?php echo e($address->city->name); ?></td>
<td><?php echo e(to_persian_numbers($address->postal_code)); ?></td>
<td><?php echo e(to_persian_numbers($address->plaque)); ?></td>
<td><?php echo e(to_persian_numbers($address->floor)); ?></td>
</tr>
</tbody>
<tfoot>
<tr>
<th><?php echo e(__('Address')); ?></th>
<td colspan="7">
<?php echo e($address->address); ?>
<?php if($address->lat && $address->lng): ?>
<div id="map" style="height: 300px; width: inherit; margin-top: 20px;"></div>
<?php endif; ?>
</td>
</tr>
<?php if($order->delivery_date && $order->delivery_time): ?>
<tr>
<th colspan="4"><?php echo e(__('Delivery Date')); ?></th>
<th colspan="4"><?php echo e(__('Delivery Time')); ?></th>
</tr>
<tr>
<td colspan="4">
<?php echo e(jdate($order->delivery_date)->format('Y/m/d')); ?>
</td>
<td colspan="4">
<?php echo e($order->delivery_time); ?>
</td>
</tr>
<?php endif; ?>
</tfoot>
</table>
</div>
<?php if($order->description): ?>
<hr>
<div class="alert alert-info">
<strong><?php echo e(__('User Description')); ?>: </strong>
<?php echo e($order->description); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php if($address->lat && $address->lng): ?>
<?php $__env->startSection('header'); ?>
<link rel="stylesheet" href="<?php echo e(asset('leaflet/leaflet.css')); ?>" />
<link rel="stylesheet" href="<?php echo e(asset('Leaflet.EasyButton/src/easy-button.css')); ?>">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('footer'); ?>
<script src="<?php echo e(asset('leaflet/leaflet.js')); ?>"></script>
<script src="<?php echo e(asset('Leaflet.EasyButton/src/easy-button.js')); ?>"></script>
<script>
var map = L.map('map').setView([<?php echo e($address->lat); ?>, <?php echo e($address->lng); ?>], 14);
map.scrollWheelZoom.disable()
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '',
maxZoom: 18,
tileSize: 512,
zoomOffset: -1,
}).addTo(map);
L.easyButton( 'fa-location-arrow', function(){
window.open('https://www.google.com/maps/search/?api=1&query=<?php echo e($address->lat); ?>,<?php echo e($address->lng); ?>', '_blank');
}).addTo(map);
var marker = L.marker([<?php echo e($address->lat); ?>, <?php echo e($address->lng); ?>]).addTo(map);
</script>
<?php $__env->stopSection(); ?>
<?php endif; ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/armgroup/libs/resources/views/account/orders/show.blade.php ENDPATH**/ ?>