@extends('layouts.master') @section('title', 'Ledger Journal') @section('page-header') Ledger Journal @stop @push('style') @endpush @section('content')

@yield('page-header')

@include('includes.input-groups.date-range', ['date1' => request('from', date('Y-m-d')), 'date2' => request('to', date('Y-m-d')), 'is_read_only' => true])
@php $totalDebit = 0; $totalCredit = 0; $sl = 1; @endphp @forelse ($transactions->groupBy('invoice_no') as $items) @foreach ($items as $item) @php $totalDebit += $item->debit_amount; $totalCredit += $item->credit_amount; @endphp @endforeach @php $sl++; @endphp @empty @endforelse @if (count($transactions) > 0) @endif
SL Account Description Dr. Cr.
@if ($loop->first) {{ $sl }} @endif {{ optional($item->account)->name }} {{ $item->getDescription() }} {{ number_format($item->debit_amount ?? 0, 2) }} {{ number_format($item->credit_amount ?? 0, 2) }}
NO RECORDS FOUND!
Total {{ number_format($totalDebit, 2) }} {{ number_format($totalCredit, 2) }}

@include('partials._paginate', ['data' => $transactions])
@endsection {{-- @foreach ($value as $item) @endforeach
{{$item->account->name}} Description {{number_format($item->amount < 0 ? abs($item->amount) : 0, 2)}} {{number_format($item->amount >= 0 ? abs($item->amount) : 0, 2)}}
--}} @section('js') @endsection