@extends('layouts.default') @section('title', trans('reports.standard.journal')) @section('new_button') {{-- // --}} @endsection @section('content')
{!! Form::open(['url'=>'/reports/standard/journal']) !!} @include('accounts.reports.standard.date-filter-view') {!! Form::close() !!}

{{ trans('reports.standard.profitandlossdetails') }}

DATE TRANSACTION TYPE NUM NAME DESCRIPTION ACCOUNT DEBIT CREDIT
{{-- INCOMES --}} @php $incometotal = 0; @endphp @foreach($lists as $list) @if(count($list->items) > 0)

@php $ctotal = 0; $dtotal = 0; $items = $list->items; @endphp @foreach ($items as $item) @php $ctotal = $ctotal + $item->credit; $dtotal = $ctotal + $item->debit; $accnt = $item->account; @endphp @endforeach
{{ Carbon\Carbon::parse($item->created_at)->format($date_format) }} {{ $item->transaction_type }} {{ $item->number }} {{ $item->description }} {{ isset($accnt)?$accnt->name:'' }} {{ ($item->debit!='')?money($item->debit, 'USD', true):'' }} {{ ($item->credit!='')?money($item->credit, 'USD', true):'' }}
{{ $list->name }} @money($dtotal, 'USD', true) @money($ctotal, 'USD', true)
@php $ctotal = 0; $dtotal = 0; @endphp @endif @endforeach
@include('accounts.reports.standard.filter') @include('includes.datepicker') @endsection