@extends('layouts.inspinia') @section('title', 'Account: ' . $chartOfAccount->account_code) @section('content_header', $chartOfAccount->account_code . ' — ' . $chartOfAccount->account_name) @section('breadcrumb') @endsection @section('content')
{{-- Details + Sub-accounts ──────────────────────────────────── --}}
Account Details
@can('chart_of_accounts.edit') Edit @endcan Back
Group
{{ $chartOfAccount->group->name ?? '—' }}
Type
{{ ucfirst($chartOfAccount->account_type) }}
Normal Balance
{{ ucfirst($chartOfAccount->normal_balance) }}
Parent
{{ $chartOfAccount->parent?->displayNameWithCode() ?? '—' }}
Cash Account
{{ $chartOfAccount->is_cash_account ? 'Yes' : 'No' }}
Bank Account
{{ $chartOfAccount->is_bank_account ? 'Yes' : 'No' }}
Control Account
{{ $chartOfAccount->is_control_account ? 'Yes' : 'No' }}
Opening Balance
{{ number_format($chartOfAccount->opening_balance, 2) }} {{ $chartOfAccount->opening_balance_type ? ucfirst($chartOfAccount->opening_balance_type) : '' }}
Status
{{ $chartOfAccount->is_active ? 'Active' : 'Inactive' }}
@if($chartOfAccount->notes)
Notes
{{ $chartOfAccount->notes }}
@endif
@if($chartOfAccount->children->count())
Sub-accounts
@endif
{{-- Recent Posted Lines ──────────────────────────────────────── --}}
Recent Posted Lines
@if($recentLines->isEmpty())

No posted journal lines yet.

@else
@foreach($recentLines as $line) @endforeach
Date Voucher Description Debit Credit
{{ $line->journalVoucher->journal_date->format('d/m/Y') }} {{ $line->journalVoucher->journal_number }} {{ $line->description ?? $line->journalVoucher->description }} {{ $line->debit > 0 ? number_format($line->debit, 2) : '' }} {{ $line->credit > 0 ? number_format($line->credit, 2) : '' }}
@endif
@endsection