@php
$isGroup = $pos->children->isNotEmpty();
$isOptional = (bool) $pos->is_optional;
$og = $isGroup ? 0 : (float)$pos->quantity * (float)$pos->unit_price;
$om = $og * $vatFact;
$ob = $og + $om;
$indent = $depth * 10;
@endphp
|
@if(!$isGroup)
@if($isOptional)
@else
@endif
@endif
|
{{ $pos->pos_number }}
|
@if($indent)@endif
{{ $pos->title }}
@if(!$isGroup && $isOptional) (optional)@endif
|
@if(!$isGroup){{ $pos->quantity ? number_format($pos->quantity, 2, ',', '.') : '—' }}@endif
|
@if(!$isGroup){{ $pos->positionUnit->name ?? '—' }}@endif
|
@if(!$isGroup){{ $pos->unit_price ? number_format($pos->unit_price, 2, ',', '.') . ' €' : '—' }}@endif
|
@if(!$isGroup){{ $og > 0 ? number_format($og, 2, ',', '.') . ' €' : '—' }}@endif
|
@if(!$isGroup){{ $og > 0 ? number_format($om, 2, ',', '.') . ' €' : '—' }}@endif
|
@if(!$isGroup){{ $ob > 0 ? number_format($ob, 2, ',', '.') . ' €' : '—' }}@endif
|
@foreach($pos->children as $child)
@include('pms.offers._ab_pdf_row', ['pos' => $child, 'depth' => $depth + 1, 'vatFact' => $vatFact])
@endforeach