@extends('layouts.dashboard') @section('title', __('Profit & Loss')) @section('page_title', __('Profit & Loss')) @section('content') @include('accounting::partials.nav', ['active' => 'report-pl'])
{{ __('Profit & Loss') }} {{ \Carbon\Carbon::parse($from)->format('d M Y') }} – {{ \Carbon\Carbon::parse($to)->format('d M Y') }}
{{ __('Export CSV') }}
@include('accounting::partials.range')
{{ __('Income') }}
@forelse($income as $r) @php($v = $r->account->signed($r->debit, $r->credit) * ($r->account->normal_balance === 'credit' ? 1 : -1)) @empty @endforelse
{{ $r->account->code }}{{ __($r->account->name) }}{{ money_signed($v) }}
{{ __('No income.') }}
{{ __('Total income') }}{{ money_signed($total_income) }}
{{ __('Expenses') }}
@forelse($expense as $r) @empty @endforelse
{{ $r->account->code }}{{ __($r->account->name) }}{{ money_signed($r->account->signed($r->debit, $r->credit)) }}
{{ __('No expenses.') }}
{{ __('Total expenses') }}{{ money_signed($total_expense) }}
{{ __('Net') }} {{ $net >= 0 ? 'profit' : 'loss' }} {{ money_signed($net) }}
@endsection