@using PowderCoating.Core.Entities @model List @{ ViewData["Title"] = "Budgets"; ViewData["PageIcon"] = "bi-pie-chart"; var byYear = Model.GroupBy(b => b.FiscalYear).OrderByDescending(g => g.Key).ToList(); }
@if (TempData["Success"] != null) { } @if (TempData["Error"] != null) { } @if (!Model.Any()) {

No budgets yet. Create your first budget to start tracking variance against actual results.

} else { @foreach (var group in byYear) {
Fiscal Year @group.Key
@foreach (var b in group.OrderBy(b => b.Name)) { var revLines = b.Lines.Where(l => l.Account?.AccountType == PowderCoating.Core.Enums.AccountType.Revenue); var expLines = b.Lines.Where(l => l.Account?.AccountType == PowderCoating.Core.Enums.AccountType.Expense); }
Budget Name Lines Total Revenue Budget Total Expense Budget Default
@b.Name @if (!string.IsNullOrWhiteSpace(b.Notes)) {
@b.Notes
}
@b.Lines.Count @b.Lines.Sum(l => l.Annual).ToString("C") @if (b.IsDefault) { Default } else {
@Html.AntiForgeryToken()
}
@Html.AntiForgeryToken()
} } @section Scripts { }