@page "/reports" @attribute [Authorize] @inject ITransactionRepository TransactionService @inject IAccountRepository AccountService @inject ICategoryRepository CategoryService @inject ISalaryRepository SalaryService @inject AuthenticationStateProvider AuthStateProvider @inject IJSRuntime Js @implements IAsyncDisposable @rendermode InteractiveServer Reports

Reports

Visual breakdown of your spending and income by category for a specified time period.

@if (_loading) {

Loading...

} else if (_accounts.Count == 0) {
No data yet

Add some accounts and transactions to see your spending reports.

} else { @* ── Date Range & Account Filters ── *@
Filters
to
@foreach (var account in _accounts) { }
@* ── Expense by Category (Doughnut) ── *@
Expenses by Category
@if (_categoryBreakdown.Count == 0) {

No expenses in this period.

} else {
}
@* ── Income by Category (Doughnut) ── *@
Income by Category
@if (_incomeBreakdown.Count == 0) {

No income in this period.

} else {
}
@* ── Monthly Income vs Expenses (Bar) ── *@
Monthly Income vs Expenses
@if (_monthlyLabels.Count == 0) {

No transactions in this period.

} else {
}
@* ── Category Breakdown Table ── *@
Category Summary
@if (_categoryBreakdown.Count == 0 && _incomeBreakdown.Count == 0) {

No transactions in this period.

} else {
@foreach (var row in _categorySummary) { } @{ var totalNet = _categorySummary.Sum(r => r.Net); }
Category Income Expenses Net
@row.Icon @row.Name @_currencySymbol@row.Income.ToString("N2") @_currencySymbol@row.Expense.ToString("N2") @_currencySymbol@row.Net.ToString("N2")
Total @_currencySymbol@_categorySummary.Sum(r => r.Income).ToString("N2") @_currencySymbol@_categorySummary.Sum(r => r.Expense).ToString("N2") @_currencySymbol@totalNet.ToString("N2")
}
}