@extends('layouts.app') @section('title') Trial Balance       {{date('M d,Y',strtotime($from))}} - {{date('M d,Y',strtotime($to))}} @stop @section('breadcrumb') @stop @section('css') @stop @section('content')

{{env('APP_NAME')}}

Trial Balance

{{date('M d,Y',strtotime($from))}} - {{date('M d,Y',strtotime($to))}}
User ID:  {{Auth::user()->name}}
@if($level == 0)
@foreach($accounts as $acc) @if($accountBalance[$acc->id]) @foreach($subChild[$acc->id] as $sA) @if($subAccountBalance[$sA->id]) @foreach($child[$sA->id] as $c) @if($childBalance[$c->id]) @if($openingBalance[$c->id] > 0) @elseif($openingBalance[$c->id] < 0) @else @endif @if($totalCredit[$c->id] != 0) @else @endif @if($bln > 0) @elseif($bln < 0) @else @endif @if($total > 0) @elseif($total < 0) @else @endif @endif @endforeach @if($sopenDebit > 0) @elseif($sopenDebit < 0) @else @endif @if($sopenCredit > 0) @elseif($sopenCredit < 0) @else @endif @if($bln > 0) @elseif($bln < 0) @else @endif @if($speriodDebit > 0) @elseif($speriodDebit < 0) @else @endif @if($speriodCredit > 0) @elseif($speriodCredit < 0) @else @endif @if($bln > 0) @elseif($bln < 0) @else @endif @if($sdebit > 0) @elseif($sdebit < 0) @else @endif @if($scredit > 0) @elseif($scredit < 0) @else @endif @if($bln >= 0) @else @endif @endif @endforeach @if($popenDebit > 0) @elseif($popenDebit < 0) @else @endif @if($popenCredit > 0) @elseif($popenCredit < 0) @else @endif @if($bln > 0) @elseif($bln < 0) @else @endif @if($pperiodDebit > 0) @elseif($pperiodDebit < 0) @else @endif @if($pperiodCredit > 0) @elseif($pperiodCredit < 0) @else @endif @if($bln > 0) @elseif($bln < 0) @else @endif @if($pdebit > 0) @elseif($pdebit < 0) @else @endif @if($pcredit > 0) @elseif($pcredit < 0) @else @endif @if($bln > 0) @elseif($bln < 0) @else @endif @endif @endforeach @if($openDebit > 0) @elseif($openDebit < 0) @else @endif @if($openCredit > 0) @elseif($openCredit < 0) @else @endif @if($bln > 0) @elseif($bln < 0) @else @endif @if($periodDebit > 0) @elseif($periodDebit < 0) @else @endif @if($periodCredit > 0) @elseif($periodCredit < 0) @else @endif @if($bln > 0) @elseif($bln < 0) @else @endif @if($debit > 0) @elseif($debit < 0) @else @endif @if($credit > 0) @elseif($credit < 0) @else @endif @if($bln > 0) @elseif($bln < 0) @else @endif
Code Accounts Opening Balance Current Activity(For the Period) Closing Balance
Debit Credit Balance Debit Credit Balance Debit Credit Balance
{{$acc->number}} {{$acc->name}}
{{$sA->number}} {{$sA->name}}
{{$c->number}} {{$c->name}}{{number_format($openingBalance[$c->id])}} {{number_format($openingBalance[$c->id])}} {{number_format(abs($openingBalance[$c->id]))}} ({{number_format(abs($openingBalance[$c->id]))}}) {{ $totalDebit[$c->id] != 0 ? number_format($totalDebit[$c->id]) : ''}}{{number_format(abs($totalCredit[$c->id]))}}-{{number_format($bln)}}({{number_format(abs($bln))}})-{{number_format($total)}} - {{number_format($total)}} {{number_format(abs($total))}} ({{number_format(abs($total))}})
Total {{$sA->number}} {{$sA->name}}{{number_format($sopenDebit)}}({{number_format(abs($sopenDebit))}})-{{number_format($sopenCredit)}}({{number_format(abs($sopenCredit))}})-{{number_format($bln)}}({{number_format(abs($bln))}})-{{number_format($speriodDebit)}}({{number_format(abs($speriodDebit))}})-{{number_format($speriodCredit)}}({{number_format(abs($speriodCredit))}})-{{number_format($bln)}}({{number_format(abs($bln))}})-{{number_format($sdebit)}}({{number_format(abs($sdebit))}})-{{number_format($scredit)}}({{number_format(abs($scredit))}})-{{number_format($bln)}}({{number_format(abs($bln))}})
Total {{$acc->number}} {{$acc->name}}{{number_format($popenDebit)}}({{number_format(abs($popenDebit))}})-{{number_format($popenCredit)}}({{number_format(abs($popenCredit))}})-{{number_format($bln)}}({{number_format(abs($bln))}})-{{number_format($pperiodDebit)}}({{number_format(abs($pperiodDebit))}})-{{number_format($pperiodCredit)}}({{number_format(abs($pperiodCredit))}})-{{number_format($bln)}}({{number_format(abs($bln))}})-{{number_format($pdebit)}}({{number_format(abs($pdebit))}})-{{number_format($pcredit)}}({{number_format(abs($pcredit))}})-{{number_format($bln)}}({{number_format(abs($bln))}})-
Total  {{number_format($openDebit)}}({{number_format(abs($openDebit))}})-{{number_format($openCredit)}}({{number_format(abs($openCredit))}})-{{number_format($bln)}}({{number_format(abs($bln))}})-{{number_format($periodDebit)}}({{number_format(abs($periodDebit))}})-{{number_format($periodCredit)}}({{number_format(abs($periodCredit))}})-{{number_format($bln)}}({{number_format(abs($bln))}})-{{number_format($debit)}}({{number_format(abs($debit))}})-{{number_format($credit)}}({{number_format(abs($credit))}})-{{number_format($bln)}}({{number_format(abs($bln))}})-
@else
@foreach($accounts as $acc) @if($openingBalance[$acc->id] != 0 || $totalDebit[$acc->id] != 0 || $totalCredit[$acc->id] != 0) @if($openingBalance[$acc->id] > 0) @elseif($openingBalance[$acc->id] < 0) @else @endif @if($totalCredit[$acc->id] != 0) @else @endif @if($total > 0) @elseif($total < 0) @else @endif @endif @endforeach
Code Accounts Opening Balance Period Debit Period Credit Debit Credit
{{$acc->number}} {{$acc->name}}{{number_format($openingBalance[$acc->id])}}({{number_format(abs($openingBalance[$acc->id]))}}){{ $totalDebit[$acc->id] != 0 ? number_format($totalDebit[$acc->id]) : ''}}{{number_format(abs($totalCredit[$acc->id]))}}{{number_format($total)}} {{number_format(abs($total))}}
Total   {{number_format($openBalance)}} {{number_format($periodDebit)}} {{number_format($periodCredit)}} {{number_format($debit)}} {{number_format($credit)}}
@endif
@stop @section('js') @stop