@extends('accounting::layouts.app') @section('title') {{ trans_choice('accounting::report.journal', 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::report.journal', 1) }} @endslot @endcomponent
@component('accounting::components.box') @slot('header')
@component('accounting::components.download_action_button', [ 'url' => 'report/accounting/journal', 'filters' => 'start_date=' . $start_date . '&end_date=' . $end_date . '&location_id=' . $location_id, ]) @endcomponent
@endslot @slot('body')

@if (!empty($start_date)) {{ trans_choice('accounting::report.journal', 1) }} {{ trans('accounting::lang.for_period') }} {{ readable_date($start_date) }} {{ trans('accounting::lang.to') }} {{ readable_date($end_date) }} @endif

{{ trans_choice('accounting::lang.clear', 1) }}!
@endslot @endcomponent @component('accounting::components.box') @slot('body')

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

@component('accounting::components.tree_view_table') @if (!empty($location_id) && !empty($data->first()->business_location)) {{ trans_choice('accounting::lang.business_location', 1) }}: {{ $data->first()->business_location }} @endif {{ trans_choice('accounting::lang.start_date', 1) }}: {{ readable_date($start_date) }} {{ trans_choice('accounting::lang.end_date', 1) }}: {{ readable_date($end_date) }} {{ trans_choice('accounting::lang.transaction', 1) }} {{ trans_choice('accounting::lang.date', 1) }} {{ trans_choice('accounting::lang.transaction', 1) }}# {{ trans_choice('accounting::lang.type', 1) }} {{ trans_choice('accounting::general.account_subtype', 1) }} {{ trans_choice('accounting::lang.account', 1) }} {{ trans_choice('accounting::general.detail_type', 1) }} {{ trans_choice('accounting::lang.account', 1) }} {{ trans_choice('accounting::lang.created_by', 1) }} {{ trans_choice('accounting::general.debit', 1) }} {{ trans_choice('accounting::general.credit', 1) }} @php $parent2_index = 1; @endphp @foreach ($account_types as $account_type) @php $parent1_index = $parent2_index; @endphp {{ ucfirst($account_type) }} @php $parent2_index++; $chart_of_account_type = $data->where('account_type', $account_type); @endphp @foreach ($chart_of_account_type as $key) {{ $key->date }} {{ $key->transaction_number }} @if ($key->account_type == 'asset') {{ trans_choice('accounting::general.asset', 1) }} @elseif ($key->account_type == 'expense') {{ trans_choice('accounting::general.expense', 1) }} @elseif ($key->account_type == 'equity') {{ trans_choice('accounting::general.equity', 1) }} @elseif ($key->account_type == 'liability') {{ trans_choice('accounting::general.liability', 1) }} @elseif ($key->account_type == 'income') {{ trans_choice('accounting::general.income', 1) }} @endif {{ $key->account_subtype }} {{ $key->account_detail_type }} {{ $key->account_name }} {{ $key->created_by }} {{ number_format($key->debit) }} {{ number_format($key->credit) }} @php $parent2_index++; @endphp @endforeach {{ trans('accounting::lang.total_for') }} {{ $account_type }} {{ number_format($chart_of_account_type->sum('debit'), 2) }} {{ number_format($chart_of_account_type->sum('credit'), 2) }} @endforeach {{ trans('accounting::lang.grand_total') }} {{ number_format($data->sum('debit'), 2) }} {{ number_format($data->sum('credit'), 2) }} @endcomponent @endslot @endcomponent
@stop @section('javascript') @include('accounting::report.partials.report_js') @endsection