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

Debiteurs PDF Excel

@can('authorize', 'add_customers') Ajouter Un Client @endcan
@foreach($sells as $sell) @endforeach
Date du crédit Nom du Client Montant Dû Sommes Payés Restant à Payé
{{ \Carbon\Carbon::create($sell->first()->sell->date)->isoFormat('ll') }}
{{ $sell->first()->customer->name }}
{{ $sell->first()->sell->total }} FCFA
@foreach($sell as $debtor)
{{ $debtor->created_at->isoFormat('l') }} => {{ $debtor->paid_amount }} FCFA
@endforeach
Total: {{ $debtor->sum('paid_amount') }} FCFA
@php $restAmount = $sell->first()->sell->total - $sell->sum('paid_amount') @endphp {{ ($restAmount < 0)?0: $restAmount}} FCFA
@php $debtor->customer; $debtor->sell; @endphp
@if(request()->is('debtors') || request()->is('debtors/*')) @can('authorize', 'add_debtors') @includeIf('debtors.create') @endcan @can('authorize', 'add_customers') @includeIf('customers.create') @endcan @can('authorize', 'edit_debtors') @includeIf('debtors.edit') @endcan @can('authorize', 'delete_debtors') @includeIf('debtors.delete') @endcan @endif @endsection @push('scripts') @endpush