@props([ 'details' => [], 'countPeriods' => 0, 'subColsCount' => 0, 'detailColsCount' => 0, 'showContent' => '', ]) @foreach($details as $detail) @php $depth = $detail['depth'] ?? 0; $bgClass = isset($detail['details']) ? 'bg-gray-' . (400 - ($depth * 100)) : ''; $indent = ' ps-' . ($depth + 1); @endphp @if(isset($detail['details'])) {{ $detail['name'] }} @include('components.reports.recursive-sales-period-detail', ['details' => $detail['details'], 'countPeriods' => $countPeriods, 'colsCount' => $detailColsCount, 'showContent' => $showContent]) {{ __('validation.attributes.subtotal'). ' ' . $detail['name'] }} @foreach($detail['periods'][$showContent] as $key => $value) {{ accounting_format($value) }} @endforeach @if($countPeriods > 1) {{ accounting_format($detail['periods'][$showContent]['total'] / $countPeriods) }} @endif @else @if(isset($detail['code'])) {{ $detail['code'] }} @endif {{ $detail['name'] }} @foreach($detail['periods'][$showContent] as $key => $value) {{ accounting_format($value) }} @endforeach @if($countPeriods > 1) {{ accounting_format($detail['periods'][$showContent]['total'] / $countPeriods) }} @endif @endif @endforeach