@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
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") |