@extends('layout') @inject('carbon', 'Carbon\Carbon') @section('content')
{{ session('success') }}
@php $totalAmount = 0; // Initialize total amount variable @endphp @foreach($recoveriesList as $item) @php // Add the current item's amount to the total $totalAmount += (float)$item->advance; @endphp @endforeach
Nom de logement Client créer par Payé le crée le Montant à payer Montant payé
{{ $item->property }} {{ $item->l_name }} {{ $item->f_name }} {{ $item->name }} {{ date('d-m-Y', strtotime($item->paid_at)) }} {{ date('d-m-Y H:i:s', strtotime($item->created_at)) }} {{ $item->getReservation()->getTotalPrice() + $item->getReservation()->getTotalExtensions() }} TND {{ number_format((float)$item->advance, 2, ',', ' ') ?? number_format(0, 2, ',', ' ') }} TND
Total: {{ number_format((float)$totalAmount, 2, ',', ' ') }} TND
@if($totalAmount !== 0) @endif
@endsection