@extends('layouts.master') @section('title', 'Transaction Ledger') @section('page-header') Transaction Ledger @stop @push('style') @endpush @section('content')
@include('partials._alert_message') @php $from = request('from',date('Y-m-d')); $to = request('to',date('Y-m-d')); @endphp

@yield('page-header')

@include('includes.input-groups.date-range', ['date1' => $from, 'date2' => $to, 'is_read_only' => true])
@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) }}

@endsection @section('js') @endsection