@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')

@foreach($project_names as $key => $project_name) {{ $project_name }} @if($key < count($project_names) - 1) , @endif @endforeach

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($sbln > 0) @elseif($sbln < 0) @else @endif @if($closingDebt > 0) @elseif($closingDebt < 0) @else @endif @if($closingCredit > 0) @elseif($closingCredit < 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($level1_close_debt > 0) @elseif($level1_close_debt < 0) @else @endif @if($level1_close_cred > 0) @elseif($level1_close_cred < 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))}}){{number_format(abs($closing_debits))}} {{number_format(abs($closing_credits))}} ({{$total}})
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))}})-
@elseif($level == 4)
@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($bln > 0) @elseif($bln < 0) @else @endif @if($speriodDebit > 0) @elseif($speriodDebit < 0) @else @endif @if($speriodCredit > 0) @elseif($speriodCredit < 0) @else @endif @if($sbln > 0) @elseif($sbln < 0) @else @endif @if($bln >= 0) @else @endif @endif @endforeach @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($bln > 0) @elseif($bln < 0) @else @endif @endif @endforeach @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($bln > 0) @elseif($bln < 0) @else @endif
Code Accounts Opening Balance Current Activity(For the Period) Closing Balance
Balance Debit Credit Balance Balance
{{$acc->number}} {{$acc->name}}
{{$sA->number}} {{$sA->name}}
{{$c->number}} {{$c->name}} {{number_format($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(abs($total))}})
Total   {{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($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