@extends('layouts.app') @section('title', 'Financial Transactions') @section('content')

Payment Records & Transactions

Total Money In: Tk {{ number_format($totalIn, 2) }}
Total Money Out: Tk {{ number_format($totalOut, 2) }}
Net Balance: Tk {{ number_format($totalIn - $totalOut, 2) }}
@forelse($records as $rec) @empty @endforelse
Date Payment Type Project Party Name Voucher No Method Money In Money Out
{{ \Carbon\Carbon::parse($rec->transaction_date)->format('d M, Y') }} @php $typeBadge = 'bg-secondary'; $typeName = 'Unknown'; if(str_contains($rec->source_type, 'AccountIncome')) { $typeName = 'Income Entry'; $typeBadge = 'bg-success'; } elseif(str_contains($rec->source_type, 'AccountExpense')) { $typeName = 'Expense Entry'; $typeBadge = 'bg-danger'; } elseif(str_contains($rec->source_type, 'PurchasePayment')) { $typeName = 'Supplier Payment'; $typeBadge = 'bg-warning text-dark'; } elseif(str_contains($rec->source_type, 'ContractorPayment')) { $typeName = 'Contractor Payment'; $typeBadge = 'bg-info text-dark'; } elseif(str_contains($rec->source_type, 'CommissionPayment')) { $typeName = 'Commission Payment'; $typeBadge = 'bg-dark'; } elseif(str_contains($rec->source_type, 'Payment')) { $typeName = 'Customer Collection'; $typeBadge = 'bg-primary'; } @endphp {{ $typeName }} {{ $rec->project->project_name ?? 'General / None' }} {{ $rec->party_name ?? '-' }} {{ $rec->voucher_no ?? '-' }} {{ $rec->payment_method }} {{ $rec->debit_amount > 0 ? 'Tk ' . number_format($rec->debit_amount, 2) : '-' }} {{ $rec->credit_amount > 0 ? 'Tk ' . number_format($rec->credit_amount, 2) : '-' }}
No payment records found.
@endsection