@extends('layouts.app') @section('title', __('accounting-reports::lang.account_details')) @section('content')

@lang('accounting-reports::lang.account_details')

{{ $account->code }} - {{ $account->name }}

@lang('accounting-reports::lang.account_code') {{ $account->code }}
@lang('accounting-reports::lang.account_name') {{ $account->name }}
@lang('accounting-reports::lang.account_type') {{ ucfirst($account->account_type) }}
@lang('accounting-reports::lang.account_group') {{ ucwords(str_replace('_', ' ', $account->account_group)) }}
@lang('accounting-reports::lang.parent_account') {{ $account->parent ? $account->parent->name : '-' }}
@lang('accounting-reports::lang.status') @if($account->is_active) @lang('accounting-reports::lang.active') @else @lang('accounting-reports::lang.inactive') @endif
@lang('accounting-reports::lang.opening_balance') {{ number_format($openingBalance, 2) }}
@lang('accounting-reports::lang.current_balance') {{ number_format($currentBalance, 2) }}
@lang('accounting-reports::lang.control_account') {{ $account->is_control_account ? 'Yes' : 'No' }}
Allow Negative Balance {{ $account->allow_negative_balance ? 'Yes' : 'No' }}
Requires Contact {{ $account->requires_contact ? 'Yes' : 'No' }}
Created By {{ $account->createdBy ? $account->createdBy->user_full_name : 'N/A' }}
@if($account->description)

@lang('accounting-reports::lang.description')

{{ $account->description }}

@endif @if($account->children->count() > 0)

Sub-Accounts

@endif
@if($recentTransactions->count() > 0)

Recent Transactions

@foreach($recentTransactions as $transaction) @endforeach
Date Voucher No Narration Debit Credit
{{ @format_date($transaction->journalEntry->voucher_date) }} {{ $transaction->journalEntry->voucher_no }} {{ $transaction->narration ?? $transaction->journalEntry->narration }} {{ number_format($transaction->debit_amount, 2) }} {{ number_format($transaction->credit_amount, 2) }}
@endif
@endsection