@php
// Gruppe = hat Kinder; sonst normale Positionszeile mit Preisen
$isGroup = $pos->children->isNotEmpty();
@endphp
|
{{ $pos->pos_number ?? $nr }}
|
@if($depth > 1)↳ @endif
{{ $pos->title }}
@if(!$isGroup && $pos->description)
{{ $pos->description }}
@endif
|
@if(!$isGroup){{ $pos->quantity ? number_format($pos->quantity, 2, ',', '.') : '' }}@endif
|
@if(!$isGroup){{ $pos->positionUnit->name ?? '' }}@endif
|
@if(!$isGroup){{ $pos->unit_price !== null ? number_format($pos->unit_price, 2, ',', '.') : '' }}@endif
|
@if(!$isGroup){{ $pos->calculated_total !== null ? number_format($pos->calculated_total, 2, ',', '.') : '' }}@endif
|
@foreach($pos->children as $ci => $child)
@include('pms.orders._rechnung_pdf_row', ['pos' => $child, 'depth' => $depth + 1, 'nr' => ($pos->pos_number ?? $nr) . '.' . ($ci + 1)])
@endforeach
@if($isGroup && $pos->children->isNotEmpty())