@php $data = $this->data(); $tabs = $this->tabs(); $periods = $this->periods(); @endphp
Perioadă: @foreach ($periods as $key => $label) @endforeach
@foreach ($tabs as $key => $label) @endforeach
@if ($tab === 'overview')
Încasări
{{ number_format($data['income'], 2, '.', ' ') }} MDL
Cheltuieli
{{ number_format($data['expenses'], 2, '.', ' ') }} MDL
Profit
{{ number_format($data['profit'], 2, '.', ' ') }} MDL
Datorii clienți
{{ number_format($data['debtTotal'], 2, '.', ' ') }} MDL
@elseif ($tab === 'cashflow')
Total intrări
{{ number_format($data['totalIn'], 2, '.', ' ') }} MDL
Total ieșiri
{{ number_format($data['totalOut'], 2, '.', ' ') }} MDL
Cashflow zilnic — verde = încasări, roșu = cheltuieli
@foreach ($data['rows'] as $r)
@if (count($data['rows']) <= 31)
{{ $r['date'] }}
@endif
@endforeach
Net: {{ number_format($data['net'], 2, '.', ' ') }} MDL
@elseif ($tab === 'pnl')
Venituri
Manopere{{ number_format($data['worksRevenue'], 2, '.', ' ') }}
Piese (vânzare){{ number_format($data['partsRevenue'], 2, '.', ' ') }}
Total venituri{{ number_format($data['totalRevenue'], 2, '.', ' ') }}
Costuri
@foreach ($data['expensesByCat'] as $row) @endforeach
Cost piese (achiziție){{ number_format($data['partsCost'], 2, '.', ' ') }}
{{ \App\Models\Tenant\Expense::CATEGORIES[$row->category] ?? $row->category }}{{ number_format((float) $row->total, 2, '.', ' ') }}
Total costuri{{ number_format($data['partsCost'] + $data['totalExpenses'], 2, '.', ' ') }}
Profit net
{{ number_format($data['netProfit'], 2, '.', ' ') }} MDL
Marjă: {{ $data['marginPct'] }}%
Marjă piese: {{ number_format($data['partsMargin'], 2, '.', ' ') }} MDL
@elseif ($tab === 'balance')
Active
Numerar net (toate plățile - cheltuieli){{ number_format($data['netCash'], 2, '.', ' ') }} MDL
Datorii clienți (de încasat){{ number_format($data['debt'], 2, '.', ' ') }} MDL
Stoc piese (la preț achiziție){{ number_format($data['stockValue'], 2, '.', ' ') }} MDL
Total active{{ number_format($data['netCash'] + $data['debt'] + $data['stockValue'], 2, '.', ' ') }}
Toate timpurile
Total încasat{{ number_format($data['allTimePayments'], 2, '.', ' ') }} MDL
Total cheltuit{{ number_format($data['allTimeExpenses'], 2, '.', ' ') }} MDL
@endif