@php ($i = 0) @foreach ($pohledavky as $typPohl) @php ($typP = $pohledavky->keys()[$i])

{{ $typyPohl[$typP] }} {{ $typ_splatn }}

@foreach ($typPohl as $pohledavka) @if ($loop->first && $typ_spl != 'P') {{-- řádek počátečního stavu --}} @php ($unpaid = -1 * $pohledavka->castka < 0 ? "text-danger fw-bold" : "" ) @else {{-- řádek standardní pohledávky --}} @if (!empty($pohledavka->datUhr)) @else @endif @if($typ_spl != 'P') @php ($unpaid = $pohledavka->bilance < 0 ? "text-danger fw-bold" : "" ) @else @php ($unpaid = $pohledavka->bilance < 0 ? "text-danger fw-bold" : "" ) @endif @endif {{-- řádek víceřádkové úhrady --}} @if (!empty($pohledavka->uhrPohl)) @foreach ($pohledavka->uhrPohl as $platba) @if($typ_spl != 'P') @php ($unpaid = $pohledavka->bilance < 0 ? "text-danger fw-bold" : "" ) @else @php ($unpaid = $pohledavka->castka - $pohledavka->pouzito < 0 ? "text-danger fw-bold" : "" ) @endif @endforeach @endif {{-- řádek nepřiřazené úhrady --}} @if (!empty($pohledavka->neprirazene) && $typ_spl=='S') @foreach ($pohledavka->neprirazene as $platba) @if ($loop->first) @php ($unpaid = $platba->bilance < 0 ? "text-danger fw-bold" : "" ) @endif @endforeach @endif @endforeach
Obdobi Splatnost do Částka pohledávky Datum úhrady Zaplaceno Přiřazeno @if($typ_spl != 'P') Bilance @else Zbýva zaplatit @endif
Počáteční stav @if($pohledavka->castka != 0) {{ number_format(-1 * $pohledavka->castka, 2, ".", " ") }} @else {{ $pohledavka->castka }} @endif
{{ $pohledavka->obdobi }} {{ date('d.m.Y', strtotime($pohledavka->splatnost)) }} {{ number_format($pohledavka->castka, 2, ".", " ") }}{{ date('d.m.Y', strtotime($pohledavka->datUhr)) }}{{ $pohledavka->zaplaceno != 0 ? number_format($pohledavka->zaplaceno, 2, ".", " ") : '' }} {{ $pohledavka->pouzito != 0 ? number_format($pohledavka->pouzito, 2, ".", " ") : '' }} {{ number_format($pohledavka->bilance, 2, ".", " ") }} {{ number_format(-1 * $pohledavka->bilance, 2, ".", " ") }}
{{ date('d.m.Y', strtotime($platba->datum)) }} {{ number_format($platba->celkem, 2, ".", " ") }} {{ number_format($platba->pouzito, 2, ".", " ") }}
@if ($loop->first) Nepřiřazené úhrady @endif {{ date('d.m.Y', strtotime($platba->datum)) }} {{ number_format($platba->celkem, 2, ".", " ") }} {{ number_format($platba->pouzito, 2, ".", " ") }} @if ($loop->first) {{ number_format($platba->bilance, 2, ".", " ") }} @endif
@php ($i = $i + 1) @endforeach