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

{{ (url()->current() == route("sells.index"))? "Sorties" : "Commandes" }} PDF Excel

@foreach($sells as $sell) @endforeach
Date Code Sortie Client Produits TypeSortie Paiement TVA Total Statut
{{ \Carbon\Carbon::create($sell->date)->isoFormat('ll') }}
{{ ($sell->code)?$sell->code:"" }}
{{ ($sell->customer_id)?$sell->customer->name . " ". $sell->customer->phone:"" }}
{!! ($sell->customer_id)?$sell->customer->shipping_address:"" !!}
@php $achats = json_decode($sell->achats); @endphp
@isset($achats) @foreach($achats as $achat) {{ $achat->sell_quantity }} {{ ($achat->sell_measure->unit)??json_decode($achat->sell_measure)->unit }}(s) de {{ ($achat->product->name)??json_decode($achat->product)->name }},
@endforeach @endif
{{ $sell->outType?->name }}
{{ (isset($sell->paymentMethod))?$sell->paymentMethod->method:null }}
{{ $sell->tva }}
{{ $sell->total }} FCFA
{{ $sell->state->name }}
@php $sell->paymentMethod /* utile pour pouvoir recuperer payment_method dans data-sell dans faire de merge */ @endphp
@if(request()->is('sells') || request()->is('sells/*') || request()->is('internal-commands') || request()->is('internal-commands/*')) @can('authorize', 'browse_sells') @includeIf('sells.show') @includeIf('sells.modal-sell-print') @endcan @can('authorize', 'add_sells') @includeIf('sells.create') @endcan @can('authorize', 'edit_sells') @includeIf('sells.edit') @endcan @can('authorize', 'delete_sells') @includeIf('sells.delete') @endcan @endif @endsection @push('scripts') @if(session('last_sell_id') != 0) @endif @endpush