@extends('layouts.main') @section('title') General Ledger Report @stop @section('navigation') @stop @section('msghead_menu')
  • @stop @section('contentinner')
    @foreach($accounts as $account) @if(sizeof($account->ledgers)>0) {{----}} {{----}} {{----}} {{----}}
    {{$account->name}}
    DrCr
    {{--*/ $dr_total = 0 /*--}} {{--*/ $cr_total = 0 /*--}} {{--*/ $balance = 0 /*--}} @foreach($account->ledgers as $index=>$cash_book_transaction) @if($cash_book_transaction['type']=='DEBITED') @endif @if($cash_book_transaction['type']=='CREDITED') @endif @endforeach
    Date Particulars L.F Debit Credit Balance
    {{\Carbon\Carbon::parse($cash_book_transaction['date'])->toFormattedDateString()}} {{$cash_book_transaction['document']}} @if($account->increase =='DEBITED') {{number_format($cash_book_transaction['amount'],2)}} {{--*/ $dr_total += $cash_book_transaction['amount'] /*--}} {{--*/ $balance -= $cash_book_transaction['amount'] /*--}} @else {{number_format($cash_book_transaction['amount'],2)}} {{--*/ $dr_total += $cash_book_transaction['amount'] /*--}} {{--*/ $balance += $cash_book_transaction['amount'] /*--}} @endif @if($account->increase =='DEBITED') {{number_format($cash_book_transaction['amount'],2)}} {{--*/ $cr_total += $cash_book_transaction['amount'] /*--}} {{--*/ $balance += -$cash_book_transaction['amount'] /*--}} @else {{number_format($cash_book_transaction['amount'],2)}} {{--*/ $cr_total += $cash_book_transaction['amount'] /*--}} {{--*/ $balance += $cash_book_transaction['amount'] /*--}} @endif {{number_format($balance,2)}} {{--*/ $balance /*--}}
    @endif @endforeach
    @stop