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

Trial Balance


{{-- --}} @php $count = 1; $openBalTotal = 0; $debitTotal = 0; $creatidTotal = 0; $balance = 0; $priority = ''; $priorityRow = 0; @endphp @foreach ($trialBalance as $value) @if ($priority == '' || $priority != $value->priority) @php $priority = $value->priority; $priorityRow=1; if($priorityRow==1){ $priorityRow=0; echo " "; } @endphp @endif @php $open_bal_debit = $value->open_bal_debit; $open_bal_credit = $value->open_bal_credit; if($value->trans == 1) { //$open_bal_debit += $value->opening_balance; } if($value->trans == 2) { //$open_bal_credit += $value->opening_balance; } $opening_bal = ($open_bal_debit - $open_bal_credit); @endphp @php $openBalTotal += $opening_bal; $debitTotal += $value->debit; $creatidTotal += $value->credit; $balance += ($opening_bal + $value->debit) - $value->credit; @endphp @endforeach
#DateAccount Code Description Opening Balance({{ $currencyCode }}) Debit({{ $currencyCode }}) Credit({{ $currencyCode }}) Closing Balance({{ $currencyCode }})
$value->account_type
{{ $count++ }} {{ $value->acc_code }} {{ $value->acc_name }} {{ number_format($opening_bal, 2, '.', ',') }} {{ number_format($value->debit, 2, '.', ',') }} {{ number_format($value->credit, 2, '.', ',') }} {{ number_format(($opening_bal + $value->debit) - $value->credit, 2, '.', ',') }}
{{ number_format($debitTotal, 2, '.', ',') }} {{ number_format($creatidTotal, 2, '.', ',') }} {{ number_format($balance, 2, '.', ',') }}
@endsection