@extends('layout') @inject('carbon', 'Carbon\Carbon') @inject('parameter', 'App\Models\Parameter') @section('content')

Finances & Caisse

Liste des récouvrements

@include('shared.navbar')
@include('recovrey._search-index')
@if(session('success'))
{{ session('success') }}
@endif @php $total_price_converted = 0; $total_left_to_paid = 0; $total_amount_recovered = 0; @endphp @foreach($reservations as $key => $item) @php // Notice days $checkInDate = $carbon::create($item['check_out']); $currentDate = $carbon::now(); $diffInDays = $checkInDate->diffInDays($currentDate); @endphp @php $total_price_converted += $item->getTotalPrice(); $total_amount_recovered += $item->getTotalPrice() - $item->getLeftToPaid(); $total_left_to_paid += $item->getLeftToPaid(); @endphp @endforeach
Date de création Source N° Contrat Nom de Logement Client Paiement Date début Date Fin Nuits À payer Payé Reste à payer Actions
{{ $carbon::create($item['created_date'])->format('d/m/Y') }} @if(array_key_exists($item['creator'], config('creators.list'))) {{ config('creators.list')[$item['creator']] }} @endif {{ $item['reservation_id'] }} {{ $item['name'] }} {{ $item['l_name'] }} {{ $item['f_name'] }} @php $status = $item->getPaymentStatus(); $badgeColor = config('status.badge')[$status]; $message = config('status.payment')[$status]; @endphp {{--

{{ config('status.payment')[$item->getPaymentStatus()] }}

--}}
{{ $carbon::create($item['check_in'])->format('d/m/Y') }} {{ $carbon::create($item['check_out'])->format('d/m/Y') }} {{ $carbon::create($item['check_in'])->diffInDays($item['check_out']) }} {{ number_format($item->getTotalPrice() + $item->getTotalExtensions(), 2, '.', ' ') }} TND {{ number_format($item->getTotalPriceRecoveries(), 2, '.', ' ') }} TND {{ number_format($item->getLeftToPaid(), 2, '.', ' ') }} TND @include('recovrey.paiements.modals.paid-modal') @include('recovrey.paiements.modals.list-modal') @include('recovrey.paiements.modals.edit-paid-modal')
Montant Total: {{ number_format($total_price_converted, 2, '.', ' ') }} TND {{ number_format($total_amount_recovered, 2, '.', ' ') }} TND {{ number_format($total_left_to_paid, 2, '.', ' ') }} TND
@endsection