@extends('layouts.adminapp') @section('content')
@include('PrintHeader.header')

{{__('lng.ProfitLoss')}}

{{--
{{ __('lng.Name') }} {{ __('lng.Invoice') }} {{ __('lng.Date') }} {{ __('lng.Head') }} {{ __('lng.Amount') }}
--}}
@php $TotalIncome=0; @endphp @foreach ($Incomes as $Income) @php $TotalIncome+=$Income->credited; @endphp @endforeach
{{__('lng.Income')}} {{__('lng.Amount')}}
{{App\Models\AccountGroup::find($Income->GroupID)->title ?? ''}} @currency($Income->credited)
@php $TotalExpense=0; @endphp @foreach ($Expenses as $Expense) @php $TotalExpense+=$Expense->debited; @endphp @endforeach
{{__('lng.Expence')}} {{__('lng.Amount')}}
{{App\Models\AccountGroup::find($Expense->GroupID)->title ?? ''}} @currency($Expense->debited)
@if ($TotalIncome - $TotalExpense == 0 ) @elseif($TotalIncome - $TotalExpense > 0) @else @endif
{{__('lng.GrossAmount')}} @currency($TotalIncome - $TotalExpense){{__('lng.GrossProfit')}} @currency($TotalIncome - $TotalExpense){{__('lng.GrossLoss')}} @currency(abs($TotalIncome - $TotalExpense))
@endsection