@extends('layouts.master') @section('title') {{translate('trial_balance')}} @endsection @section('content')
{{translate('trial_balance')}} @if(!empty($start_date)) for period: {{$start_date}} to {{$end_date}} @endif
{!! Form::open(array('url' => Request::url(), 'method' => 'post','class'=>'form-horizontal', 'name' => 'form')) !!}
{!! Form::close() !!}
@if(!empty($start_date))
@php $credit_total = 0; $debit_total = 0; @endphp @foreach($chart_of_accounts as $index=> $key) @php $cr = $key->journal_entries_sum_credit ?? 0; $dr = $key->journal_entries_sum_debit ?? 0; $credit_total = $credit_total + $cr; $debit_total = $debit_total + $dr; @endphp @endforeach
# {{translate('gl_code')}} {{translate('account')}} {{translate('debit')}} {{translate('credit')}}
{{$index+1}} {{ $key->gl_code }} {{$key->name}} {{ currency_converter($dr) }} {{ currency_converter($cr) }}
{{translate('total')}} {{currency_converter($debit_total)}} {{currency_converter($credit_total)}}
@endif @endsection @section('footer-scripts') @endsection