82 lines
3 KiB
PHP
82 lines
3 KiB
PHP
@extends('layouts.bo-layout')
|
|
|
|
@section('content')
|
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
|
<h1 class="h2"><a href="{{route('bo.orders')}}" class="h2 text-decoration-none"><</a>Commande - {{ $order->reference }}</h1>
|
|
@if (session('success'))
|
|
<span class="float-center text-success">{{ session('success') }}</span>
|
|
@endif
|
|
|
|
<div class="btn-toolbar mb-2 mb-md-0">
|
|
@if ($order->status_id < 6 && $order->status_id >=3 )
|
|
<a id="advance_status" href="{{route('bo.change-order-status', $order->reference)}}" class="btn btn-sm btn-primary"><i class="fas fa-forward"></i> {{$order->status->label}}</a>
|
|
@endif
|
|
@if ($order->status_id < 6)
|
|
<a href="{{route('bo.cancel-order', $order->reference)}}" class="btn btn-sm btn-danger" onclick="return confirm('Êtes-vous sûr(e) ?')"><i class="fas fa-times"></i> Annuler la commande</a>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="flex">
|
|
@include('bo.customer.info-card', ['cust' => $order->customer])
|
|
<div class="modal-container fancybox-content" style="">
|
|
<div class="modal-title">Total de la commande : {{number_format($order->total, 2, ',', ' ')}}€</div>
|
|
<div class="modal-body">
|
|
@if(!empty($order->timeslot))
|
|
<p>
|
|
Créneau de collecte : {{$order->timeslot->day}} {{$order->timeslot->time}}
|
|
</p>
|
|
@endif
|
|
<p>
|
|
Statut de la commande : {{$order->status->label}}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
@if(!empty($order->timeslot))
|
|
@include('bo.magasins.info-card', ['magasin' => $order->timeslot->magasin])
|
|
@endif
|
|
</div>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<th scope="col">Ref Externe</th>
|
|
<th scope="col">Produit</th>
|
|
<th scope="col">Quantité</th>
|
|
<th scope="col">Prix unitaire HT</th>
|
|
<th scope="col">Prix Total HT</th>
|
|
<th scope="col">TVA</th>
|
|
<th scope="col">Total TTC</th>
|
|
<th></th>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($order->lines as $line)
|
|
<tr>
|
|
<td>
|
|
@if($line->product->product_type == "foodProduct")
|
|
{{ $line->product->foodProduct->no_art }}
|
|
@endif
|
|
</td>
|
|
<td>
|
|
{{ $line->product->name }}
|
|
</td>
|
|
<td>{{$line->quantity}}</td>
|
|
<td>{{number_format($line->unit_price - $line->discount, 2, ',', ' ')}}€</td>
|
|
<td>{{number_format($line->total_ht - $line->total_discount, 2, ',', ' ')}}€</td>
|
|
<td>{{number_format($line->total_tax, 2, ',', ' ')}}€</td>
|
|
<td>{{number_format($line->total_ttc, 2, ',', ' ')}}€</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@endsection
|
|
|
|
@section('scripts')
|
|
<script>
|
|
// selector and a `content` prop:
|
|
tippy('#advance_status', {
|
|
content: "Faire avancer le statut de la commande",
|
|
placement: 'bottom',
|
|
});
|
|
|
|
|
|
</script>
|
|
@endsection
|