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

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

DATE TRANSACTION TYPE NUM NAME MEMO/DESCRIPTION DEBIT CREDIT AMOUNT
{{-- ASSETS --}}

@php $assetsTotal = 0; @endphp @foreach($assets as $asset) @if(count($asset->chartofhistory) > 0)

@php $atotal = 0; $charts = $asset->chartofhistory; @endphp @foreach ($charts as $chat) @php if($chat->amount_type == 'add') { $atotal = $atotal + $chat->amount; } else { $atotal = $atotal - $chat->amount; } @endphp @endforeach
{{ Carbon\Carbon::parse($chat->created_at)->format($date_format) }} {{ $chat->transaction_type }} {{ $chat->number }} {{ $chat->name }} {{ $chat->description }} {{ ($chat->amount_type=='sub')?money($chat->amount, 'USD', true):'' }} {{ ($chat->amount_type=='add')?money($chat->amount, 'USD', true):'' }} {{ ($chat->amount_type=='add')?'+'.money($chat->amount, 'USD', true):'-'.money($chat->amount, 'USD', true) }}
{{ $asset->name }} @money($atotal, 'USD', true)
@php $assetsTotal = $assetsTotal + $atotal; $atotal = 0; @endphp @endif @endforeach
{{-- ASSETS TOTAL --}}
Assets Total @money($assetsTotal, 'USD', true)
{{-- LIABILITIES --}}

@php $liabilitiesTotal = 0; @endphp @foreach($liabilities as $liability) @if(count($liability->chartofhistory) > 0)

@php $ltotal = 0; $charts = $asset->chartofhistory; @endphp @foreach ($charts as $chat) @php if($chat->amount_type == 'add') { $ltotal = $ltotal + $chat->amount; } else { $ltotal = $ltotal - $chat->amount; } @endphp @endforeach
{{ Carbon::parse($chat->created_at)->format($date_format) }} {{ $chat->transaction_type }} {{ $chat->number }} {{ $chat->name }} {{ $chat->description }} {{ ($chat->amount_type=='sub')?money($chat->amount, 'USD', true):'' }} {{ ($chat->amount_type=='add')?money($chat->amount, 'USD', true):'' }} {{ ($chat->amount_type=='add')?'+'.money($chat->amount, 'USD', true):'-'.money($chat->amount, 'USD', true) }}
{{ $liability->name }} @money($ltotal, 'USD', true)
@php $liabilitiesTotal = $liabilitiesTotal + $ltotal; $ltotal = 0; @endphp @endif @endforeach
{{-- LIABILITITES TOTAL --}}
Liabilities Total @money($liabilitiesTotal, 'USD', true)
@include('accounts.reports.standard.filter') @include('includes.datepicker') @endsection