@extends('layouts.app') @section('main-content')

Commandes PDF Excel

@can('authorize', 'add_orders') {{-- Ajouter Manuellement Une Commande --}} @endcan
{{-- --}} @foreach ($orders as $key => $order) {{-- --}} @endforeach
Date Numéro ClientProduitsPaiement Sous-Total Livraison Total Statut
{{ \Carbon\Carbon::create($order->created_at)->isoFormat('ll') }}
{{ $order->order_number ?? '' }}
{{ $order->user_id ? $order->first_name . ' ' . $order->last_name : '' }}
@php $products = json_decode($order->cart->products_json); @endphp
@isset($products) @foreach ($products as $key => $product) {{ $product->quantity }} {{ App\Models\Product::where('code', $key)->first()->unitMeasures->first()->unit }}(s) de {{ $product->name }},
@endforeach @endif
{{ isset($order->payment_method_id) ? App\Models\PaymentMethod::find($order->payment_method_id)->method : null }}
{{ $order->sub_total }} FCFA
{{ $order->total_amount - $order->sub_total }} FCFA
{{ $order->total_amount }} FCFA
{{ $order->status }}
@php $order->paymentMethod; /* utile pour pouvoir recuperer payment_method dans data-order dans faire de merge */ $order->cart; @endphp
@if (request()->is('orders') || request()->is('orders/*')) @can('authorize', 'browse_orders') @includeIf('backend.orders.show') @includeIf('backend.orders.modal-order-print') @endcan @can('authorize', 'add_orders') @includeIf('backend.orders.create') @endcan @can('authorize', 'edit_orders') @includeIf('backend.orders.edit') @endcan @can('authorize', 'delete_orders') @includeIf('backend.orders.delete') @endcan @endif @endsection @push('scripts') @endpush