@props([ 'label' => 'Mois', 'rows' => [], 'idx' => null ]) @php $attributes = $attributes->class([ 'table', ])->merge([ // ]); @endphp @php $tin = 0; $tca = 0; $tis = 0; $tco = 0; @endphp @foreach($rows as $i => $row) @php $last = $i == count($rows) -1; @endphp @if($row['interestAmount'] > 1) @php $tin += $row['interestAmount']; $tca += $row['capitalAmount']; $tis += $row['insurance']; $tco += $row['cost']; @endphp $idx === $i])> @endif @if($label == 'Mois' && ($i && $i%11 == 0) || $last ) @endif @endforeach
{{ $label }} Intérêts Amortissement Capital restant dû Assurance Mensualité
{{ $i+1 }} @dcf($row['interestAmount']) @dcf($row['capitalAmount']) @dcf($row['remaining']) @dcf($row['insurance']) @dcf($row['cost'])
@if($last) Cumul @else Année {{ floor($i / 11) }} @endif @dcf($tin) @if($last) @dcf(round($tca)) @else @dcf($tca) @endif @dcf($row['remaining']) @dcf($tis) @dcf($tco)