@extends('layouts.master') @section('title','Category Wise Transaction Ledger') @push('style') @endpush @section('content')
Back
@php $company = optional($accountGroups->first())->company; @endphp
@if (optional(optional($company)->company_details)->header) {{ optional($company)->name }} @else

{{ optional($company)->name }}

@endif

Category Wise Transaction Ledger

From: {{fdate(request('from'))}} To: {{fdate(request('to'))}}
@if($accountGroups->count() == 0) @endif @php $sl = 1; $totalOpeningBalance = 0; $totalDebit = 0; $totalCredit = 0; @endphp @foreach($accountGroups as $accountGroup) @foreach($accountGroup->accountControls as $accountControl) @foreach($accountControl->accountSubsidiaries as $accountSubsidiary) @foreach($accountSubsidiary->accounts as $account) @php $balance = $account->credit + $account->debit + $account->opening_balance; $totalOpeningBalance += $account->opening_balance; $totalDebit += $account->debit; $totalCredit += $account->credit; @endphp @endforeach @endforeach @endforeach @endforeach
Sl Account Group Account Control Account Subsidiary Account Name Opening. Dr. Cr. Balance
NO RECORDS FOUND!
{{ $sl++ }} {{ $accountGroup->name }} {{ $accountControl->name }} {{ $accountSubsidiary->name }} {{ $account->name }} {{ number_format($account->opening_balance ?? 0, 2) }} {{ number_format(abs($account->debit ?? 0), 2) }} {{ number_format($account->credit ?? 0, 2) }} {{ number_format($balance ?? 0, 2) }}
Total: {{ number_format(abs($totalOpeningBalance), 2) }} {{ number_format(abs($totalDebit), 2) }} {{ number_format($totalCredit, 2) }} {{ number_format(($totalOpeningBalance + $totalDebit + $totalCredit), 2) }}
@if (optional(optional($company)->company_details)->header) {{ optional($company)->name }} @endif
@endsection @section('js') @endsection