@extends('accounting::layouts.app') @section('title') {{ $chart_of_account->name }} @endsection @section('content') @include('accounting::layouts.nav') @component('accounting::components.section_header') @slot('title') {{ trans_choice('accounting::general.accounting', 1) }} @endslot @slot('subtitle') {{ trans_choice('accounting::lang.account', 1) }} {{ trans_choice('accounting::lang.detail', 2) }} @endslot @endcomponent
@can('product.view')
@component('accounting::components.box') @slot('title') {{ $chart_of_account->name }} @endslot @slot('body')

  {{ number_format($chart_of_account->opening_balance, 2) }}

{{ trans('account.opening_balance') }}

  {{ number_format($chart_of_account->current_balance, 2) }}

{{ trans('accounting::lang.current') }} {{ trans('accounting::lang.balance') }}

{{ trans_choice('accounting::lang.currency', 1) }} {{ $chart_of_account->currency->name }}
{{ trans_choice('accounting::general.gl_code', 2) }} {{ $chart_of_account->gl_code }}
{{ trans_choice('accounting::lang.parent', 1) }} {{ trans_choice('accounting::lang.account', 1) }} {{ $chart_of_account->parent->name }}
{{ trans_choice('accounting::lang.account', 1) }} {{ trans_choice('accounting::lang.type', 1) }} @if ($chart_of_account->account_type == 'asset') {{ trans_choice('accounting::general.asset', 1) }} @elseif ($chart_of_account->account_type == 'expense') {{ trans_choice('accounting::general.expense', 1) }} @elseif ($chart_of_account->account_type == 'equity') {{ trans_choice('accounting::general.equity', 1) }} @elseif ($chart_of_account->account_type == 'liability') {{ trans_choice('accounting::general.liability', 1) }} @elseif ($chart_of_account->account_type == 'income') {{ trans_choice('accounting::general.income', 1) }} @endif
{{ trans_choice('accounting::general.manual_entries_allowed', 1) }} @if ($chart_of_account->allow_manual == 1) {{ trans_choice('accounting::lang.yes', 1) }} @else {{ trans_choice('accounting::lang.no', 1) }} @endif
{{ trans_choice('accounting::lang.active', 1) }} @if ($chart_of_account->active == 1) {{ trans_choice('accounting::lang.yes', 1) }} @else {{ trans_choice('accounting::lang.no', 1) }} @endif
{{ trans_choice('accounting::lang.note', 2) }} {!! $chart_of_account->notes !!}
@endslot @endcomponent @component('accounting::components.box') @slot('title') {{ trans_choice('accounting::general.journal', 1) }} {{ trans_choice('accounting::lang.entry', 2) }} @endslot @slot('body')
@php //group the results $total_debit = 0; $total_credit = 0; @endphp @foreach ($chart_of_account->journal_entries as $key) @php //group the results $total_debit = $total_debit + $key->debit; $total_credit = $total_credit + $key->credit; @endphp @endforeach
{{ trans_choice('accounting::general.gl_code', 1) }} {{ trans_choice('accounting::general.debit', 1) }} {{ trans_choice('accounting::general.credit', 1) }} {{ trans_choice('accounting::general.balance', 1) }}
{{ $chart_of_account->gl_code }} {{ number_format($key->debit, 2) }} {{ number_format($key->credit, 2) }} {{ number_format($total_credit - $total_debit, 2) }}
{{ trans_choice('accounting::lang.total', 1) }} {{ number_format($total_debit, 2) }} {{ number_format($total_credit, 2) }} {{ number_format($total_credit - $total_debit, 2) }}
@endslot @endcomponent
@endcan
@stop @section('javascript') @endsection