@use('App\Services\Date')
| @lang('reports::reports.account') | @lang('reports::reports.trial_balance.opening_balance') | @lang('reports::reports.trial_balance.period_transactions') | @lang('reports::reports.trial_balance.closing_balance') | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @lang('reports::reports.debit') | @lang('reports::reports.credit') | @lang('reports::reports.debit') | @lang('reports::reports.credit') | @lang('reports::reports.debit') | @lang('reports::reports.credit') | @if (request('exclude_net') == 0)@lang('reports::reports.total closing balance') | @endif||||||||||
| {{$categoryName}} | ||||||||||||||||
| {{ $account['code'] . ' - ' . $account['name'] }} | {{--@if(isset($account['opening']['debit'])) {{number_format($account['opening']['debit'],2)}} @else 0.00 @endif | --}} @if($account['default_type'] == 'debit') @php if(isset($account['opening']['total_balance'])) { if($account['opening']['total_balance']>0) { $debit_openning_balance +=abs(@$account['opening']['total_balance']) ?? 0; } else{ $credit_openning_balance +=abs(@$account['opening']['total_balance']) ?? 0; } } @endphp@isset($account['opening']['debit']) @if($account['opening']['total_balance'] > 0) {{ number_format(abs($account['opening']['total_balance']),2)}} @else {{ number_format(0,2)}} @endif @endisset | @isset($account['opening']['credit']) @if($account['opening']['total_balance'] > 0) {{ number_format(0,2)}} @else {{ number_format(abs($account['opening']['total_balance']),2)}}@endif @endisset | @else @php if(isset($account['opening']['total_balance'])) { if($account['opening']['total_balance']>0) { $credit_openning_balance +=abs(@$account['opening']['total_balance']) ?? 0; }else{ $debit_openning_balance +=abs(@$account['opening']['total_balance']) ?? 0; } } @endphp@isset($account['opening']['debit']) @if($account['opening']['total_balance'] >= 0) {{ number_format(0,2)}} @else{{ number_format(abs($account['opening']['total_balance']) ,2)}} @endif @endisset | @isset($account['opening']['credit']) @if($account['opening']['total_balance'] > 0) {{ number_format(abs($account['opening']['total_balance'] ) ,2)}} @else {{ number_format(0,2)}} @endif @endisset | @endif@isset($account['period']['debit']) {{ number_format($account['period']['debit'],2)}} @endisset | @isset($account['period']['credit']) {{ number_format($account['period']['credit'],2)}} @endisset | @if($account['default_type'] == 'debit') {{-- start for debit + period debit - credit start (0) + period credit --}} {{-- if the balance is negative add it in credit if it positive add it in debit --}} @php if(isset($account['opening']['total_balance'])) { $period = ($account['opening']['total_balance'] + $account['period']['debit']) - (0 + $account['period']['credit']); }else{ $period =0; } if($period > 0) { $debit_closing_balance += abs($period); }else{ $credit_closing_balance += abs($period); } @endphp@isset($account['opening']['debit']) @if($period > 0) {{ number_format(abs($period),2)}} @else {{ number_format(0,2)}} @endif @endisset | @isset($account['opening']['credit']) @if($period < 0) {{ number_format(abs($period),2)}} @else {{ number_format(0,2)}} @endif @endisset | @else @php if(isset($account['opening']['total_balance'])) { $period = ($account['opening']['total_balance'] + $account['period']['credit']) - (0 + $account['period']['debit']); } else{ $period =0; } if($period >0) { $credit_closing_balance += abs($period); }else{ $debit_closing_balance += abs($period); } @endphp@isset($account['opening']['debit']) @if($period < 0) {{ number_format(abs($period),2)}} @else {{ number_format(0,2)}} @endif @endisset | @isset($account['opening']['credit']) @if($period > 0) {{ number_format(abs($period),2)}} @else {{ number_format(0,2)}} @endif @endisset | {{--@isset($childAccount['closing']['debit']) {{ number_format($childAccount['closing']['debit'],2)}} @endisset | @isset($childAccount['closing']['credit']) {{ number_format($childAccount['closing']['credit'],2)}} @endisset | --}} @endif {{--@isset($account['closing']['debit']) {{ number_format($account['closing']['debit'],2)}} @endisset | @isset($account['closing']['credit']) {{ number_format($account['closing']['credit'],2)}} @endisset | --}} @if (request('exclude_net') == 0)@isset($account['closing']['total_balance']) @if($account['closing']['total_balance'] >= 0) {{ number_format($account['closing']['total_balance'],2)}} @else {{ "(" . number_format(abs($account['closing']['total_balance']),2) . ")"}} @endif @endisset | @endif
| {{ $childAccount['code'] . ' - ' . $childAccount['name'] }} | @if($account['default_type'] == 'debit') @isset($childAccount['opening']['debit']) @php if(isset($childAccount['opening']) && $childAccount['opening']['total_balance'] >0) { $debit_openning_balance +=abs(@$childAccount['opening']['total_balance']) ?? 0; }else{ $credit_openning_balance +=abs(@$childAccount['opening']['total_balance']) ?? 0; } @endphp @endisset@isset($childAccount['opening']['debit']) @if($childAccount['opening']['total_balance'] > 0) {{ number_format(abs($childAccount['opening']['total_balance']),2)}} @else {{ number_format(0,2)}} @endif @endisset | @isset($childAccount['opening']['credit']) @if($childAccount['opening']['total_balance'] > 0) {{ number_format(0,2)}} @else {{ number_format(abs($childAccount['opening']['total_balance']),2)}}@endif @endisset | @else @php if(isset($childAccount['opening']) && $childAccount['opening']['total_balance'] >0) { $credit_openning_balance +=abs(@$childAccount['opening']['total_balance']) ?? 0; }else{ $debit_openning_balance +=abs(@$childAccount['opening']['total_balance']) ?? 0; } @endphp@isset($childAccount['opening']['debit']) @if($childAccount['opening']['total_balance'] > 0) {{ number_format(0,2)}} @else{{ number_format(abs($childAccount['opening']['total_balance']),2)}} @endif @endisset | @isset($childAccount['opening']['credit']) @if($childAccount['opening']['total_balance'] > 0) {{ number_format(abs($childAccount['opening']['total_balance']),2)}} @else {{ number_format(0,2)}} @endif @endisset | @endif@isset($childAccount['period']['debit']) {{ number_format($childAccount['period']['debit'],2)}} @endisset | @isset($childAccount['period']['credit']) {{ number_format($childAccount['period']['credit'],2)}} @endisset | {{--@isset($childAccount['closing']['debit']) {{ number_format($childAccount['closing']['debit'],2)}} @endisset | @isset($childAccount['closing']['credit']) {{ number_format($childAccount['closing']['credit'],2)}} @endisset | --}} @if($account['default_type'] == 'debit') {{-- start for debit + period debit - credit start (0) + period credit --}} {{-- if the balance is negative add it in credit if it positive add it in debit --}} @php if(isset($childAccount['opening']['total_balance'])) { $period = ($childAccount['opening']['total_balance'] + $childAccount['period']['debit']) - (0 + $childAccount['period']['credit']); }else{ $period =0; } if($period >0) { $debit_closing_balance += abs($period); }else{ $credit_closing_balance += abs($period); } @endphp@isset($childAccount['opening']['debit']) @if($period > 0) {{ number_format(abs($period),2)}} @else {{ number_format(0,2)}} @endif @endisset | @isset($childAccount['opening']['credit']) @if($period < 0) {{ number_format(abs($period),2)}} @else {{ number_format(0,2)}} @endif @endisset | @else @php if(isset($childAccount['opening']['total_balance'])) { $period = ($childAccount['opening']['total_balance'] + $childAccount['period']['credit']) - (0 + $childAccount['period']['debit']); }else{ $period =0; } if($period >0) { $credit_closing_balance += abs($period); }else{ $debit_closing_balance += abs($period); } @endphp@isset($childAccount['opening']['debit']) @if($period < 0) {{ number_format(abs($period),2)}} @else{{ number_format(0,2)}} @endif @endisset | @isset($childAccount['opening']['credit']) @if($period > 0) {{ number_format(abs($period),2)}} @else {{ number_format(0,2)}} @endif @endisset | {{--@isset($childAccount['closing']['debit']) {{ number_format($childAccount['closing']['debit'],2)}} @endisset | @isset($childAccount['closing']['credit']) {{ number_format($childAccount['closing']['credit'],2)}} @endisset | --}} @endif @if (request('exclude_net') == 0)@isset($childAccount['closing']['total_balance']) @if($childAccount['closing']['total_balance'] >= 0) {{ number_format($childAccount['closing']['total_balance'],2)}} @else {{ "(" . number_format(abs($childAccount['closing']['total_balance']),2) . ")"}} @endif @endisset | @endif|
| @lang('reports::reports.trial_balance.total') | {{number_format($debit_openning_balance,2)}} | {{number_format($credit_openning_balance,2)}} | {{number_format($data['total']['period']['debit'],2)}} | {{number_format($data['total']['period']['credit'],2)}} | {{number_format($debit_closing_balance,2)}} | {{number_format($credit_closing_balance,2)}} | @if (request('exclude_net') == 0)--- | @endif|||||||||
| @lang('reports::reports.accrual_basis') {{ Date::format(now(), 'datetime') }} | ||||||||||||||||