@if(userCan('ChartOfAccounts-show')==0) @php header("Location: " . URL::to('errors.403'), true, 302); exit(); @endphp @endphp @endif @extends('layouts.default') @php $pageTitle = 'Trial Balance'; @endphp @section('title',$pageTitle) @section('PageHead') @php $Date1= app('request')->input('date1'); $Date2= app('request')->input('date2'); @endphp
@stop @section('content')

{{ config('app.appFullName', 'Business Name') }}

Trial Balance
{{date('F d, Y')}}
Print On: {{date('d/m/Y h:iA')}}
@php $balanceDr = $balanceCr = 0; @endphp @foreach($datas as $key=>$data) @php $balance =$dr =$cr = 0; $lable= ''; if($data->sense==1){ $lable = ' Dr'; @$dr = $data->DrTotalByAccID->total - $data->CrTotalByAccID->total; $dr += $data->account_opening_balance; $balanceDr += $dr; } elseif($data->sense==2){ $lable = ' Cr'; @$cr = $data->CrTotalByAccID->total - $data->DrTotalByAccID->total; $cr += $data->account_opening_balance; $balanceCr += $cr; } @endphp @if($dr!=0 || $cr!=0) @endif @endforeach
Account Debit Credit
{{@$data->account_name}} @if($dr!=0){{@number_format($dr,2)}}@endif @if($cr!=0){{number_format(@$cr,2)}}@endif
TOTAL {{@number_format($balanceDr,2)}} {{number_format(@$balanceCr,2)}}
@stop