@extends('layouts.app') @section('title','Trial Balance') @section('content')

Trial balance

Posted account balances through the selected date.

@php $td=0;$tc=0; @endphp @foreach($balances as $a) @php $td+=(float)$a->debit;$tc+=(float)$a->credit; @endphp @if((float)$a->debit||(float)$a->credit)@endif @endforeach
CodeAccountTypeDebitCreditNet
{{ $a->code }}{{ $a->name_en }}{{ strtoupper($a->type) }}{{ number_format((float)$a->debit,2) }}{{ number_format((float)$a->credit,2) }}{{ number_format((float)$a->debit-(float)$a->credit,2) }}
TOTAL{{ number_format($td,2) }}{{ number_format($tc,2) }}Difference {{ number_format($td-$tc,2) }}
@endsection