@extends('layouts.adminapp') @section('content')
@include('PrintHeader.header')

{{__('lng.TrialBalance')}}

{{-- --}} @php $i=$TotalDebit=$TotalCredit=0; @endphp @foreach ($AccountLedgers as $AccountLedger) {{-- --}} @php $TotalDebit+=$AccountLedger->debited; $TotalCredit+=$AccountLedger->credited; @endphp @endforeach
{{ __('lng.Name') }} {{ __('lng.Invoice') }} {{ __('lng.Date') }} {{ __('lng.Head') }} {{ __('lng.Amount') }}
{{++$i}}{{App\Models\AccountLedger::find($AccountLedger->LedgerID)->title ?? ''}} @currency($AccountLedger->debited) @currency($AccountLedger->credited)
{{__('lng.Total')}} @currency($TotalDebit) @currency($TotalCredit)
{{__('lng.Balance')}} @if ( $TotalCredit - $TotalDebit >= 0 ) @currency($TotalCredit - $TotalDebit) {{__('lng.CR')}} @else @currency(abs($TotalCredit - $TotalDebit)) {{__('lng.DR')}} @endif
@endsection