@extends('layouts.master') @section('title', $title) @section('page_js') {{-- --}} @endsection @section('content')
{{-- {{ Form::label('start_date', __('Start Date'), ['class' => 'form-label']) }} {{ Form::date('start_date', $filter['startDateRange'], ['class' => 'month-btn form-control']) }} --}}
{{ __('required_field') }} Start Date
{{-- {{ Form::label('end_date', __('End Date'), ['class' => 'form-label']) }} {{ Form::date('end_date', $filter['endDateRange'], ['class' => 'month-btn form-control']) }} --}}
{{ __('required_field') }} End Date
{{-- {{ Form::label('account', __('Account'), ['class' => 'form-label']) }} {{ Form::select('account', $accounts, isset($_GET['account']) ? $_GET['account'] : '', ['class' => 'form-control select']) }} --}}
{{ __('required_field') }} Account
{{ __('Report') }} :
{{ __('Ledger Summary') }}
{{ __('Duration') }} :
{{ $filter['startDateRange'] . ' to ' . $filter['endDateRange'] }}
@if (!empty($account))
{{ __('Account Name') }} :
{{ $account->name }}
{{ __('Account Code') }} :
{{ $account->code }}
{{ __('Total Debit') }} :
{{ number_format($filter['debit'],2) }}
{{ __('Total Credit') }} :
{{ number_format($filter['credit'],2) }}
{{ __('Balance') }} :
{{ $filter['balance'] > 0 ? __('Cr') . '. ' . number_format(abs($filter['balance']),2) : __('Dr') . '. ' . number_format(abs($filter['balance']),2) }}
@endif
{{-- --}} @php $counter = 0; $balance = 0; $debit = 0; $credit = 0; @endphp @foreach ($journalItems as $item) {{-- --}} @endforeach
# {{ __('Transaction Date') }} {{ __('Create At') }} {{ __('Description') }} {{ __('Debit') }} {{ __('Credit') }} {{ __('Balance') }}
{{ \Carbon\Carbon::parse($item->jour_date)->format('M d, Y') }} {{ \Carbon\Carbon::parse($item->date)->format('M d, Y') }}{{ $item->created_at }}{{ !empty($item->description) ? $item->description : '-' }} {{ number_format($item->debit,2) }} {{ number_format($item->credit,2) }} @if ($item->debit > 0) @php $debit+=$item->debit @endphp @else @php $credit+=$item->credit @endphp @endif @php $balance= $credit-$debit @endphp @if ($balance > 0) {{ __('Cr') . '. ' . number_format($balance,2) }} @elseif($balance < 0) {{ __('Dr') . '. ' . number_format(abs($balance),2) }} @else {{ number_format(0) }} @endif
@endsection