# |
{{-- Date | --}}
Account Code |
Description |
Amount({{ $currencyCode }}) |
|
@php
$count = 1;
$debitTotal = 0;
$creatidTotal = 0;
$priority = '';
$priorityRow = 0;
$sectionTotal= 0;
$salesTotal= 0;
$incomeTotal= 0;
$costTotal= 0;
$expenceTotal= 0;
$accountType='';
@endphp
@foreach ($pandl as $value)
@if ($priority == '' || $priority != $value->priority)
@php
$priorityRow = 1;
if($priorityRow == 1 && $priority != '') {
if($priority != $value->priority){
echo "Total $accountType : | ".number_format($sectionTotal, 2, '.', ',')." | |
";
$accountType = $value->account_type;
if($priority == '3') {
$expenceTotal = $sectionTotal;
} elseif ($priority == '4') {
$costTotal = $sectionTotal;
} elseif ($priority == '5') {
$salesTotal = $sectionTotal;
} elseif ($priority == '6') {
$incomeTotal = $sectionTotal;
}
$sectionTotal=0;
}
}
$priority = $value->priority;
if($priorityRow == 1) {
$priorityRow = 0;
echo " $value->account_type |
";
}
@endphp
@endif
{{ $count++ }} |
{{-- {{ $value->date }} | --}}
{{ $value->acc_code }} |
{{ $value->acc_name }} |
@if ($priority == '3' || $priority == '4')
@php
$sectionTotal+=$value->debit-$value->credit;
@endphp
{{ number_format($value->debit-$value->credit, 2, '.', ',') }} |
@elseif ($priority == '5' || $priority == '6')
@php
$sectionTotal+=$value->credit-$value->debit;
@endphp
{{ number_format($value->credit-$value->debit, 2, '.', ',') }} |
@endif
|
@php
$accountType=$value->account_type;
if(count($pandl)==$count-1){
echo " Total $value->account_type : | ".number_format($sectionTotal, 2, '.', ',')." | |
";
if($priority == '3'){
$expenceTotal= $sectionTotal;
}elseif ($priority == '4') {
$costTotal= $sectionTotal;
}elseif ($priority == '5') {
$salesTotal= $sectionTotal;
}elseif ($priority == '6') {
$incomeTotal= $sectionTotal;
}
$sectionTotal=0;
}
@endphp
@endforeach
@php
$profit=($incomeTotal+$salesTotal)-($expenceTotal+$costTotal)
@endphp
Net Ordinary Income : |
{{ number_format($profit, 2, '.', ',') }} | |