@extends('layouts.adminapp') @section('title') {{ __('lng.ProfitLoss') }} - {{ __('lng.Print') }} @endsection @section('active_report', 'active') @section('open_report', 'open') @section('open_account', 'open') @section('active_account', 'active') @section('profit_loss', 'active') @section('content')

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

@include('PrintHeader.header')

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

{{ __('lng.FromDate') }}: {{ date('d-m-Y', strtotime($From)) }}, {{ __('lng.ToDate') }}: {{ date('d-m-Y', strtotime($To)) }},
@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))
{{ __('lng.Back') }}
@endsection