@php $frais = DB::table('budgets')->where('copropriete_id', Auth::user()->copropriete_active)->where('id', $budget->id)->get(); $fraistotaux = $frais[0]->fraiscommuns + $frais[0]->chargespecial; @endphp
@php $debut = substr($budget->debut, 0, 4); $fin = substr($budget->fin, 0, 4); $mois = substr($budget->debut, -5, 2); $test = new DateTime($budget->debut); @endphp

Paiements du {{ $budget->debut }} au {{ $budget->fin }}

@php $modify = $test->modify('-1 year')->format('F Y'); @endphp @for ($i = 1; $i <= 12; $i++) @php $modify = $test->modify('+1 month')->format('F Y'); $pilltitle = $test->format('m-Y'); @endphp
@foreach($registreprivatif as $registre) @php $total = number_format($registre->quotepart * $fraistotaux/100 / 12, 2, '.', ' '); $soldes = DB::table('comptes')->where('copropriete_id', Auth::user()->copropriete_active)->where('unite_id', $registre->unite_id)->get(); @endphp @endforeach
# Propriétaires Frais mensuels Solde {{ $pilltitle }}
#{{ $registre->unite_id }}
@foreach(json_decode($registre->tenants) as $key => $tenants) @if(strpos($key, "proprio") !== false) @if(!empty($tenants->nom)) {{ $tenants->nom }} @if(!empty($tenants->telephone))@endif @if(!empty($tenants->courriel))@endif @endif
@endif @endforeach
{{ number_format($registre->quotepart * $fraistotaux/100 / 12, 2, '.', ' ') }} $ @foreach($soldes as $solde) @php $soldepaye = new DateTime($solde->paye); @endphp @if($pilltitle == $soldepaye->format('m-Y')) @if(($soldepaye->format('m-Y') == date('m-Y', strtotime($modify))) && ($solde->solde == $total && $registre->unite_id == $solde->unite_id)) {{ number_format($solde->solde, 2, '.', ' ') }}$qqw @elseif($solde->solde > 0) {{ $solde->solde }} @else N/A @endif @endif @endforeach @foreach($soldes as $solde) @php $soldepaye = new DateTime($solde->paye); @endphp @if($pilltitle == $soldepaye->format('m-Y')) @if(($soldepaye->format('m-Y') == date('m-Y', strtotime($modify))) && ($solde->solde == $total && $registre->unite_id == $solde->unite_id))
@csrf
@else
@csrf
@endif @endif @endforeach
@endfor