@foreach ($typPohl as $pohledavka)
@if ($loop->first && $typ_spl != 'P')
{{-- řádek počátečního stavu --}}
| Počáteční stav |
@php ($unpaid = -1 * $pohledavka->castka < 0 ? "text-danger fw-bold" : "" )
@if($pohledavka->castka != 0)
{{ number_format(-1 * $pohledavka->castka, 2, ".", " ") }}
@else
{{ $pohledavka->castka }}
@endif
|
@else
{{-- řádek standardní pohledávky --}}
| {{ $pohledavka->obdobi }} |
{{ date('d.m.Y', strtotime($pohledavka->splatnost)) }} |
{{ number_format($pohledavka->castka, 2, ".", " ") }} |
@if (!empty($pohledavka->datUhr))
{{ date('d.m.Y', strtotime($pohledavka->datUhr)) }} |
@else
|
@endif
{{ $pohledavka->zaplaceno != 0 ? number_format($pohledavka->zaplaceno, 2, ".", " ") :
'' }} |
{{ $pohledavka->pouzito != 0 ? number_format($pohledavka->pouzito, 2, ".", " ") : ''
}} |
@if($typ_spl != 'P')
@php ($unpaid = $pohledavka->bilance < 0 ? "text-danger fw-bold" : "" )
{{ number_format($pohledavka->bilance, 2, ".", " ") }}
|
@else
@php ($unpaid = $pohledavka->bilance < 0 ? "text-danger fw-bold" : "" )
{{ number_format(-1 * $pohledavka->bilance, 2, ".", " ") }}
|
@endif
@endif
{{-- řádek víceřádkové úhrady --}}
@if (!empty($pohledavka->uhrPohl))
@foreach ($pohledavka->uhrPohl as $platba)
|
{{ date('d.m.Y', strtotime($platba->datum)) }} |
{{ number_format($platba->celkem, 2, ".", " ") }} |
{{ number_format($platba->pouzito, 2, ".", " ") }} |
@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)
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)
@php ($unpaid = $platba->bilance < 0 ? "text-danger fw-bold" : "" ) @endif
@if ($loop->first)
{{ number_format($platba->bilance, 2, ".", " ") }}
@endif
|
@endforeach
@endif
@endforeach