@extends('dashboard.layouts.app') @section('content') @include('components.alert')
Filters
@forelse($summaryRows as $rowCostCenterId => $row) @php $costCenterId = $row['cost_center_id'] ?? $rowCostCenterId; $details = $detailsByCostCenter->get($costCenterId, ['accounts' => collect(), 'movements' => collect()]); $accounts = collect($details['accounts'] ?? []); $movements = collect($details['movements'] ?? []); @endphp
{{ $row['cost_center_title'] }} {{ $row['cost_center_code'] ?: '-' }}
@if($row['revenue'] != 0) {{ number_format($row['revenue'], 2) }} @else - @endif @if($row['direct_cost'] != 0) {{ number_format($row['direct_cost'], 2) }} @else - @endif {{ number_format($row['result'], 2) }}
Accounts inside cost center ({{ $accounts->count() }})
@forelse($accounts as $account) @empty @endforelse
Account Parent Section Amount
{{ $account['classification'] }} {{ $account['section'] }} {{ number_format($account['amount'], 2) }}
No accounts found.
Movements ({{ $movements->count() }})
@forelse($movements as $movement) @empty @endforelse
Date Entry Account Section Description Amount
{{ optional($movement['date'])->format('Y-m-d') ?: '-' }} #{{ $movement['journal_entry_id'] }}
{{ $movement['account_title'] }} {{ $movement['account_code'] ?: '-' }}
{{ $movement['section'] }}
{{ $movement['description'] }}
{{ number_format($movement['amount'], 2) }}
No movements found.
@empty
No cost center results found.

Try changing filters or date range.

@endforelse {{-- Total {{ number_format($summaryTotals['revenue'], 2) }} {{ number_format($summaryTotals['direct_cost'], 2) }} {{ number_format($summaryTotals['result'], 2) }} --}}
@if($summaryRows->hasPages())
{{ $summaryRows->appends(request()->except('page'))->links('pagination::bootstrap-5') }}
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush