Ledger Details: {{ $partner->full_name }}

Opening Balance

{{ number_format($partneropening_balance, 2) }}

Total Allocated

{{ number_format($totalAllocated, 2) }}

Total Withdrawn (Debit)

{{ number_format($totalWithdrawn, 2) }}

Transaction Details

Period: {{ date('d-m-Y', strtotime($startDate)) }} to {{ date('d-m-Y', strtotime($endDate)) }}
@php $runningBalance = 0; $counter = 1; @endphp @forelse($transactions as $transaction) @php // Calculate running balance properly if ($loop->first) { // For first transaction, opening balance is running_balance - (credit - debit) $openingBalance = $transaction->running_balance - ($transaction->credit_amount - $transaction->debit_amount); $runningBalance = $openingBalance; } // Add current transaction effect $runningBalance = $runningBalance + $transaction->credit_amount - $transaction->debit_amount; @endphp @empty @endforelse
# Date Transaction Type Description Debit
{{ $counter++ }} {{ date('d-m-Y', strtotime($transaction->transaction_date)) }} @if($transaction->transaction_type == 'Allocation') Allocation @elseif($transaction->transaction_type == 'Withdrawal') Withdrawal @elseif($transaction->transaction_type == 'Adjustment') Adjustment @else {{ $transaction->transaction_type }} @endif {{ $transaction->description ?? '-' }} @if($transaction->debit_amount > 0) {{ number_format($transaction->debit_amount, 2) }} @else - @endif
No transactions found for the selected period.

Transaction Summary

Total Transactions

{{ $transactions->count() }}

Withdrawals

{{ $transactions->where('transaction_type', 'Withdrawal')->count() }}

Adjustments

{{ $transactions->where('transaction_type', 'Adjustment')->count() }}