@page "/reports"
@attribute [Authorize]
@inject TransactionService TransactionService
@inject AccountService AccountService
@inject CategoryService CategoryService
@inject SalaryService SalaryService
@inject AuthenticationStateProvider AuthStateProvider
@inject IJSRuntime JS
@implements IAsyncDisposable
@rendermode InteractiveServer
Visual breakdown of your spending and income by category for a specified time period.
@if (loading) {Loading...
} else if (accounts.Count == 0) {Add some accounts and transactions to see your spending reports.
No expenses in this period.
} else {No income in this period.
} else {No transactions in this period.
} else {No transactions in this period.
} else {| 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") | @{ var totalNet = categorySummary.Sum(r => r.Net); }@currencySymbol@totalNet.ToString("N2") |