@php $totalDebit = 0; $totalCredit = 0; $totalRevenue = 0; $rpCheckName = array(); @endphp @foreach($revenueData as $journalEntry) @if(!in_array($journalEntry->getChartOfAccount->parent->name, $rpCheckName)) @endif @php $totalRevenue += $journalEntry->total_balance; $rpCheckName[] = $journalEntry->getChartOfAccount->parent->name; @endphp @endforeach @if($totalRevenue) @endif @php $totalExpense = 0; $epCheckName = array(); @endphp @foreach($expenseData as $journalEntry) @if(!in_array($journalEntry->getChartOfAccount->parent->name, $epCheckName)) @endif @php $totalExpense += $journalEntry->total_balance; $epCheckName[] = $journalEntry->getChartOfAccount->parent->name; @endphp @endforeach @if($totalExpense) @endif @php $total = $totalRevenue-$totalExpense @endphp @if($total > 0) @else @endif
{{__('messages.incomeStatement')}}
from {{ $start_date }} TO {{ $end_date }}
{{ $end_date }}
{{(setUserLang() == "ar") ? $journalEntry->getChartOfAccount->parent->code .'-'. $journalEntry->getChartOfAccount->parent->arabic_name : $journalEntry->getChartOfAccount->parent->code .'-'. $journalEntry->getChartOfAccount->parent->name }}
                {{(setUserLang() == "ar") ? $journalEntry->getChartOfAccount->code .'-'. $journalEntry->getChartOfAccount->arabic_name : $journalEntry->getChartOfAccount->code .'-'. $journalEntry->getChartOfAccount->name }} {{ $journalEntry->total_balance}}
{{__('messages.Total')}} {{$totalRevenue}}
{{__('messages.grossProfit')}} {{$totalRevenue}}
{{(setUserLang() == "ar") ? $journalEntry->getChartOfAccount->parent->code .'-'. $journalEntry->getChartOfAccount->parent->arabic_name : $journalEntry->getChartOfAccount->parent->code .'-'. $journalEntry->getChartOfAccount->parent->name }}
{{(setUserLang() == "ar") ? $journalEntry->getChartOfAccount->code .'-'. $journalEntry->getChartOfAccount->arabic_name : $journalEntry->getChartOfAccount->code .'-'. $journalEntry->getChartOfAccount->name }} {{ $journalEntry->total_balance}}
{{__('messages.total')}} {{$totalExpense}}
{{__('messages.netProfit')}} {{$total}}
{{__('messages.netLosses')}} {{$total}}