@extends('tenant.accounting.accounting-tabs') @section('style') @endsection @section('breadcrumb') @include('tenant.layouts.breadcrumb', [ 'items' => [ __('home.home') => '/', __('navbar.accounting') => '/accounting/accounts', __('navbar.general_ledger_index') => '#', ], ]) @endsection @section('sidebar') @include('tenant.layouts.sidebar', ['activeItem' => 'accounting.accounts-tree']) @endsection @section('content-field') @php $view = request('view')?? 'table'; @endphp
@if (!$has_previous_year) @can('accounting-initialBalances')
@csrf
@endcan @endif

    @foreach ($accounts as $account) @php $children_count = count($account->sub_accounts); @endphp
  • {{-- Operations --}} @if ($account->sterile == false) @can('accounting-accountsTree-add') @endcan @endif @can('accounting-accountsTree-edit') @endcan @if ($account->removable) @can('accounting-accountsTree-delete') @endcan @endif
  • @endforeach
{{-- Add New Account Modal --}} @include('tenant.accounting.accounts.modals.add-new-account') {{-- Edit Account Modal --}} @include('tenant.accounting.accounts.modals.edit-account') {{-- Delete Account Modal --}}
@csrf @method('DELETE')
@lang('accounting/accounts/add-new-account.account_balance') :
{{--
@php $from_date = (request()->from_date)?? $active_year->from; @endphp
@php $to_date = (request()->to_date)?? $active_year->to; @endphp
--}}
@php $table_options = [ 'enableSumValuesOnColumns' => [1, 2, 3], 'sumValuesCell' => 'b', 'columnResizer' => false, 'hideColumn' => false, ]; $diff_sum_data = [ 'target_col_index' => 0, 'first_col_index' => [1, 3], 'second_col_index' => 2, ]; @endphp @php $debit_sum = $credit_sum = $initial_balance_sum = 0; @endphp @foreach ($leaf_accounts as $account) @php $balance = $account->balance + $account->initial_balance; @endphp @php $statement_data = $statement_items[$account->id] ?? [ 'credit_sum' => 0, 'debit_sum' => 0, 'initial_balance' => 0, ]; @endphp @php $debit_sum += abs($account->debit_balance); $credit_sum += abs($account->credit_balance); $initial_balance_sum += $account->initial_balance; @endphp @endforeach
@lang('accounting/accounts/add-new-account.current_balance') @lang('accounting/accounts/add-new-account.debtor') @lang('accounting/accounts/add-new-account.creditor') @lang('accounting/accounts/add-new-account.opening_balance') @lang('accounting/accounts/add-new-account.account_name') @lang('accounting/accounts/add-new-account.account_number')
{{ dn($statement_data['initial_balance'] + $statement_data['debit_sum'] - $statement_data['credit_sum']) }} {{ dn($statement_data['debit_sum']) }} {{ dn($statement_data['credit_sum']) }} {{ dn($statement_data['initial_balance']) }} {{ $account->number }}
@lang('accounting/accounts/add-new-account.net_balance') :
{{ dn($debit_sum - $credit_sum) }}
@lang('accounting/accounts/add-new-account.debtor') :
{{ dn($debit_sum) }}
@lang('accounting/accounts/add-new-account.creditor') :
{{ dn($credit_sum) }}
{{ dn($initial_balance_sum) }}
@endsection @push('script') @endpush