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

Finances & Caisse

Etat des paiements

@include('shared.navbar')
@include('recovrey._search')
@if(session('success'))
{{ session('success') }}
@endif @php $arrayAdvance = []; $total_price = 0; $total_advance = 0; @endphp @foreach($recoveries as $item) @php if ($item->getReservation()) { @endphp @php $total_price += $item->getReservation()->getTotalPrice() + $item->getReservation()->getTotalExtensions(); $total_advance += $item->advance; if(!isset($arrayAdvance[$item->reservation_id])) $arrayAdvance[$item->reservation_id] = (float)$item->advance; else $arrayAdvance[$item->reservation_id] += (float)$item->advance; @endphp @php } @endphp @endforeach {{-- --}}
Payé le Nom de logement Client Créer par Mode de payment Crée le Devises Remarque À payer Payé Reste à payer Actions
{{ date('d-m-Y', strtotime($item->paid_at)) }} {{ $item->property }} {{ $item->f_name }} {{ $item->l_name }} {{ $item->name }} {{ $item->payment_mode }} {{ date('d-m-Y H:i:s', strtotime($item->created_at)) }} {{ $item->currency }} {{ $item->remark ?? '-' }} {{ number_format($item->getReservation()->getTotalPrice() + $item->getReservation()->getTotalExtensions() , 2, '.', ' ') }} TND {{ number_format((float)$item->advance, 2, '.', ' ') }} TND {{ number_format($item->getReservation()->getTotalPrice() + $item->getReservation()->getTotalExtensions() - $arrayAdvance[$item->reservation_id], 2, '.', ' ') }} TND @include('recovrey.edit-modal', ['item' => $item])
Montant Total: {{ number_format($total_advance, 2, '.', ' ') }} TND{{ number_format($total_price - $total_advance, 2, '.', ' ') }} TND
@endsection