# |
{{-- Date | --}}
Account Code |
Description |
Amount({{ $currencyCode }}) |
|
@php
$count = 1;
$debitTotal = 0;
$creatidTotal = 0;
$priority = '';
$priorityRow = 0;
$sectionTotal = 0;
$nonCurrentAssets = 0;
$currentAssets = 0;
$ownerEquity = 0;
$currentLiabilities = 0;
$nonCurrentLiabilities = 0;
$retainAdd=0;
$retainAdd2=0;
$accountType = '';
@endphp
@foreach ($balanceSheet as $value)
@if ($priority == '' || $priority != $value->priority)
@php
$priorityRow = 1;
if ($priorityRow == 1 && $priority != '') {
if ($priority != $value->priority) {
@endphp
@if ($priority == '7' && $retainAdd==0)
{{ $count++ }} |
- |
Retained Earnings |
{{ number_format($pAndL, 2, '.', ',') }} |
|
@php
$retainAdd=1;
@endphp
@endif
@php
echo " Total $accountType : | " . number_format($sectionTotal, 2, '.', ',') . ' | |
';
$accountType = $value->account_type;
if ($priority == '1') {
$nonCurrentAssets = $sectionTotal;
} elseif ($priority == '2') {
$currentAssets = $sectionTotal;
} elseif ($priority == '7') {
$ownerEquity = $sectionTotal;
} elseif ($priority == '8') {
$currentLiabilities = $sectionTotal;
} elseif ($priority == '9') {
$nonCurrentLiabilities = $sectionTotal;
}
$sectionTotal = 0;
if ($priority == '2') {
echo " Total Current Assets & Non-Current Assets : | " . number_format($nonCurrentAssets+$currentAssets, 2, '.', ',') . ' | |
';
}
}
}
$priority = $value->priority;
if ($priorityRow == 1) {
$priorityRow = 0;
echo "
$value->account_type |
";
}
@endphp
@endif
{{ $count++ }} |
{{ $value->acc_code }} |
{{ $value->acc_name }} |
@if ($priority == '1' || $priority == '2')
@php
$debit = $value->debit;
$credit = $value->credit;
if($value->trans == 1)
{
//$debit += $value->opening_balance;
}
if($value->trans == 2)
{
//$credit += $value->opening_balance;
}
$sectionTotal += $debit - $credit;
@endphp
{{ number_format($debit - $credit, 2, '.', ',') }} |
@elseif ($priority == '8' || $priority == '9' || $priority == '7')
@php
$debit = $value->debit;
$credit = $value->credit;
if($value->trans == 1)
{
//$debit += $value->opening_balance;
}
if($value->trans == 2)
{
//$credit += $value->opening_balance;
}
$sectionTotal += $credit - $debit;
if($retainAdd2 == 0)
{
$sectionTotal += $pAndL;
$retainAdd2 = 1;
}
@endphp
{{ number_format($credit - $debit, 2, '.', ',') }} |
@endif
|
@php
$accountType = $value->account_type;
if ($priority == '1') {
$nonCurrentAssets = $sectionTotal;
} elseif ($priority == '2') {
$currentAssets = $sectionTotal;
} elseif ($priority == '7') {
$ownerEquity = $sectionTotal;
} elseif ($priority == '8') {
$currentLiabilities = $sectionTotal;
} elseif ($priority == '9') {
$nonCurrentLiabilities = $sectionTotal;
}
@endphp
@endforeach
@if ($retainAdd == 0)
Owner equity |
{{ $count++ }} |
- |
Retained Earnings |
{{ number_format($pAndL, 2, '.', ',') }} |
|
@php
echo " Total Owner equity : | " . number_format($pAndL, 2, '.', ',') . ' | |
';
$retainAdd=1;
@endphp
Total Equity, Current Liabilities & Non-Current Liabilities : | {{ number_format($ownerEquity+$currentLiabilities+$nonCurrentLiabilities, 2, '.', ',') }} | |
';
@else
Total Equity, Current Liabilities & Non-Current Liabilities : | {{ number_format($ownerEquity+$currentLiabilities+$nonCurrentLiabilities, 2, '.', ',') }} | |
';
@endif