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

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

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

@php $total = 0; $charts = $list->chartofhistory; @endphp @foreach ($charts as $item) @php if($item->amount_type == 'add') { $total = $total + $item->amount; } else { $total = $total - $item->amount; } @endphp @endforeach
{{ Carbon\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)
{{ $list->name }} @money($total, 'USD', true)
@php $incometotal = $incometotal + $total; $total = 0; @endphp @endif @endforeach
@include('accounts.reports.standard.filter') @include('includes.datepicker') @endsection