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