@extends('accounting::layouts.app') @section('title') {{ trans_choice('accounting::general.balance_sheet', 1) }} @endsection @section('css') @include('accounting::report.partials.report_css') @endsection @section('content') @include('accounting::layouts.nav') @component('accounting::components.section_header') @slot('title') {{ trans_choice('accounting::general.accounting', 1) }} {{ trans_choice('accounting::lang.report', 2) }} @endslot @slot('subtitle') {{ trans_choice('accounting::general.balance_sheet', 1) }} @endslot @endcomponent
@can('product.view')
@component('accounting::components.box') @slot('header')
@component('accounting::components.download_action_button', [ 'url' => Request::url(), 'filters' => http_build_query($_GET), ]) @endcomponent
@endslot @slot('body')

{{ trans_choice('accounting::general.balance_sheet', 1) }} @if (!empty($start_date)) {{ trans('accounting::general.as_on') }}: {{ readable_date($end_date) }} @endif

{{ trans_choice('accounting::lang.clear', 1) }}!
@endslot @endcomponent @if (!empty($end_date)) @component('accounting::components.box') @slot('body') @component('accounting::components.tree_view_table', ['table_responsive' => true])

{{ trans_choice('accounting::general.balance_sheet', 1) }}

@if (!empty($location_id) && !empty($data->first()->business_location)) {{ trans_choice('accounting::lang.business_location', 1) }}: {{ $data->first()->business_location }} @endif {{ trans_choice('accounting::general.as_on', 1) }}: {{ readable_date($end_date) }} {{ trans_choice('accounting::lang.account', 1) }} {{ trans_choice('accounting::general.gl_code', 1) }} {{ trans_choice('accounting::general.balance', 1) }} @php $row_number = 1; @endphp @foreach ($account_types as $account_type) @php $parent1_index = $row_number; @endphp {{ ucfirst($account_type) }} @php $row_number++; $chart_of_account_type = $data->where('account_type', $account_type); @endphp @foreach ($chart_of_account_type as $chart_of_account) {{ $chart_of_account->name }} {{ $chart_of_account->gl_code }} {{ number_format($chart_of_account->credit - $chart_of_account->debit, 2) }} @php $row_number++; @endphp @endforeach {{ trans('accounting::lang.total_for') }} {{ $account_type }} {{ number_format($chart_of_account_type->sum('credit') - $chart_of_account_type->sum('debit'), 2) }} @endforeach {{ trans('accounting::lang.grand_total') }} {{ number_format($data->sum('credit') - $data->sum('debit'), 2) }} @endcomponent @endslot @endcomponent @endif
@endcan
@stop @section('javascript') @include('accounting::report.partials.report_js') @endsection