@extends('layouts.dashboard') @section('title', $pageTitle ?? 'Customer Ledger') @section('page_header') @endsection @section('page_content') @if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif
@if (($selectedCompanyId ?? null) && ($selectedCustomerId ?? null))
Total Debit
{{ number_format((float) ($totalDebit ?? 0), 2) }}
Total Credit
{{ number_format((float) ($totalCredit ?? 0), 2) }}
Balance
{{ number_format((float) ($closingBalance ?? 0), 2) }}
@forelse ($rows as $row) @empty @endforelse
Date Reference Description Debit Credit Balance
{{ $row['date'] ? \Illuminate\Support\Carbon::parse($row['date'])->format('Y-m-d') : '-' }} {{ $row['reference'] }} {{ $row['description'] }} {{ number_format((float) $row['debit'], 2) }} {{ number_format((float) $row['credit'], 2) }} {{ number_format((float) $row['balance'], 2) }}
No ledger entries found for selected filters.
@endif @endsection