{!! Form::open(['url'=>'/reports/standard/profit-loss-details']) !!}
@include('accounts.reports.standard.date-filter-view')
{!! Form::close() !!}
{{ trans('reports.standard.profitandlossdetails') }}
ACCOUNT / DATE |
TRANSACTION TYPE |
NUM |
NAME |
DESCRIPTION |
AMOUNT |
{{-- INCOMES --}}
keyboard_arrow_downIncomes
@php
$incometotal = 0;
@endphp
@foreach($incomes as $income)
@if(count($income->chartofhistory) > 0)
keyboard_arrow_down{{ $income->name }}
@php
$total = 0;
$charts = $income->chartofhistory;
@endphp
@foreach ($charts as $item)
@php
if($item->amount_type == 'add') {
$total = $total + $item->amount;
} else {
$total = $total - $item->amount;
}
@endphp
{{ Carbon::parse($item->created_at)->format($date_format) }} |
{{ $item->transaction_type }} |
{{ $item->number }} |
{{ $item->name }} |
{{ $item->description }} |
{{ ($item->amount_type=='add')?'+':'-' }}@money($item->amount, 'USD', true) |
@endforeach
{{ $income->name }} |
@money($total, 'USD', true) |
@php
$incometotal = $incometotal + $total;
$total = 0;
@endphp
@endif
@endforeach
{{-- INCOME TOTAL --}}
Income Total |
@money($incometotal, 'USD', true) |
{{-- EXPENSES --}}
keyboard_arrow_downExpenses
@php
$expensetotal = 0;
@endphp
@foreach($expenses as $expense)
@if(count($expense->chartofhistory) > 0)
keyboard_arrow_down{{ $expense->name }}
@php
$etotal = 0;
$charts = $expense->chartofhistory;
@endphp
@foreach ($charts as $item)
@php
if($item->amount_type == 'add') {
$etotal = $etotal + $item->amount;
} else {
$etotal = $etotal - $item->amount;
}
@endphp
{{ Carbon::parse($item->created_at)->format($date_format) }} |
{{ $item->transaction_type }} |
{{ $item->number }} |
{{ $item->name }} |
{{ $item->description }} |
{{ ($item->amount_type=='add')?'+':'-' }}@money($item->amount, 'USD', true) |
@endforeach
{{ $expense->name }} |
@money($etotal, 'USD', true) |
@php
$expensetotal = $expensetotal + $etotal;
$etotal = 0;
@endphp
@endif
@endforeach
{{-- EXPENSE TOTAL --}}
Expeses Total |
@money($expensetotal, 'USD', true) |
NET INCOME |
@money($incometotal - $expensetotal, 'USD', true) |
@include('accounts.reports.standard.filter')
@include('includes.datepicker')
@endsection