@extends('layouts.horizontal', ['title' => 'COA', 'topbarTitle' => 'Chart of Accounts']) @section('css') @endsection @section('content')

Chart of Accounts

{{ session('user_role') }}

Branch : {{ $accounts ? $accounts[0]->business_name : '' }}

@php $last_id_main = 0; $last_id_control=0; $last_sub_control_id=0; @endphp @foreach($accounts as $account) @if($account->id_account_main != $last_id_main) @php $last_id_main = $account->id_account_main; @endphp @php $last_id_control = $account->id_account_control; $last_sub_control_id=0; @endphp @php $last_sub_control_id = $account->id_account_sub_control; @endphp @else @if($account->id_account_control != $last_id_control) @php $last_id_control = $account->id_account_control; $last_sub_control_id=0; @endphp @php $last_sub_control_id = $account->id_account_sub_control; @endphp @else @if($account->id_account_sub_control != $last_sub_control_id) @php $last_sub_control_id = $account->id_account_sub_control; @endphp @else @endif @endif @endif @endforeach
Account Main Account Control Account Sub Control Account Head Account Number
{{ $account->account_main_number }} - {{ $account->account_main }} @if(session("user_role")=="Super User") @endif {{ $account->account_control_number }} - {{ $account->account_control }} @if(session("user_role")=="Super User" || session("user_role") == "Super Admin") @endif {{ $account->account_sub_control_number }} - {{ $account->account_sub_control }} @if(session("user_role")=="Super User" || session("user_role") == "Super Admin") @endif {{ $account->account_head_number }} - {{ $account->account_head }} @if(session("user_role")=="Super User" || session("user_role") == "Super Admin") @endif {{ $account->account_number }} {{ $account->account_control_number }} - {{ $account->account_control }} @if(session("user_role")=="Super User" || session("user_role") == "Super Admin") @endif {{ $account->account_sub_control_number }} - {{ $account->account_sub_control }} @if(session("user_role")=="Super User" || session("user_role") == "Super Admin") @endif {{ $account->account_head_number }} - {{ $account->account_head }} @if(session("user_role")=="Super User" || session("user_role") == "Super Admin") @endif {{ $account->account_number }} {{ $account->account_sub_control_number }} - {{ $account->account_sub_control }} {{ $account->account_head_number }} - {{ $account->account_head }} {{ $account->account_number }} {{ $account->account_head_number }} - {{ $account->account_head }} {{ $account->account_number }}
{{-- Edit Main Account Modals --}} {{-- Edit Main Account Modal End --}} {{-- Edit Control Account Modals --}} {{-- Edit Control Account Modal End --}} {{-- Edit Sub Control Account Modals --}} {{-- Edit Sub Control Account Modal End --}} {{-- Edit Head Account Modals --}} {{-- Edit Head Account Modal End --}} @endsection @section('scripts') @endsection