@extends('layouts.template') @section('title') Liste des Factures @endsection @section('content')
@foreach ($factures as $key => $item) @php $current = ''; $x = ''; $status = $item->invoice_state; switch ($status) { case 0: $current = 'En Attente'; $x = 'bg-theme-12'; break; case 1: $current = 'Paye'; $x = 'bg-theme-1'; break; case 2: $current = 'Credit'; $x = 'bg-theme-6'; break; case 3: $current = 'Avance'; $x = 'bg-theme-9'; break; default: # code... break; } @endphp @endforeach {{-- @if (!empty($from) and !empty($to))
{{$factures?->links()}}
@endif --}}
# Code Code Facture Client Status OBR Date Creation Cree par Action
{{ $key + 1 }} {{ $item->invoice_code }} {{ $item->invoice_number }} {{ $item->client?->customer_name }} {{ $current }} {{ $item->invoice_obr_status == '2' ? '⛔' : ($item->invoice_obr_status == '1' ? '✅' : '📌') }}{{ $item->invoice_obr_status == 0 ? 'Non Envoye' : 'Envoye' }} {{ date('d-m-Y', strtotime($item->created_at)) }} {{ $item->creator->name }}
@if ($current == 'Credit' || $current == 'En Attente') @can("is_semi_admin_or_cashier") @endcan @endif @can("is_semi_admin_or_cashier") @if ($item->invoice_number != null && $item->invoice_is_fa == '0') @endif @if ($item->invoice_number != null && $item->invoice_has_caution == 1 && $item->invoice_caution_remain > 0) @endif @if ($hasObr & ($item->invoice_obr_status != '2')) @endif @if (!$hasObr) @endif @endcan
@endsection @section('js_content') @endsection