@using PowderCoating.Core.Entities @model FixedAsset @{ ViewData["Title"] = Model.Name; ViewData["PageIcon"] = "bi-building-gear"; var fullyDeprec = Model.AccumulatedDepreciation >= (Model.PurchaseCost - Model.SalvageValue); var depreciableBase = Model.PurchaseCost - Model.SalvageValue; var progress = depreciableBase > 0 ? (double)(Model.AccumulatedDepreciation / depreciableBase) * 100 : 100; var entries = ViewBag.Entries as List ?? new(); var monthsRemaining = (int)(ViewBag.MonthsRemaining ?? 0); }
Asset Register
@if (!Model.IsDisposed) { Edit }
@Html.AntiForgeryToken()
@if (TempData["Success"] != null) { } @if (TempData["Error"] != null) { }
@Model.Name
@if (!string.IsNullOrWhiteSpace(Model.Description)) {

@Model.Description

}
@if (Model.IsDisposed) { Disposed @if (Model.DisposalDate.HasValue) {
Disposed @Model.DisposalDate.Value.ToLocalTime().ToString("MM/dd/yyyy")
} } else if (fullyDeprec) { Fully Depreciated } else { Active
@monthsRemaining month@(monthsRemaining == 1 ? "" : "s") remaining
}
Purchase Date @Model.PurchaseDate.ToLocalTime().ToString("MM/dd/yyyy")
Purchase Cost @Model.PurchaseCost.ToString("C")
Salvage Value @Model.SalvageValue.ToString("C")
Useful Life @Model.UsefulLifeMonths months
Monthly Depreciation @Model.MonthlyDepreciation.ToString("C")
Book Value
Accumulated Depreciation @Model.AccumulatedDepreciation.ToString("C")
Book Value @Model.BookValue.ToString("C")
@if (Model.AssetAccount != null || Model.DepreciationExpenseAccount != null || Model.AccumDepreciationAccount != null) {
GL Accounts
@if (Model.AssetAccount != null) {
Asset Account
@Model.AssetAccount.AccountNumber – @Model.AssetAccount.Name
} @if (Model.DepreciationExpenseAccount != null) {
Depreciation Expense
@Model.DepreciationExpenseAccount.AccountNumber – @Model.DepreciationExpenseAccount.Name
} @if (Model.AccumDepreciationAccount != null) {
Accumulated Depreciation
@Model.AccumDepreciationAccount.AccountNumber – @Model.AccumDepreciationAccount.Name
}
}
Depreciation History
@entries.Count period@(entries.Count == 1 ? "" : "s") posted
@if (!entries.Any()) {

No depreciation posted yet. Use the Post Monthly Depreciation button on the Asset Register.

} else {
@foreach (var e in entries) { }
Period Amount Journal Entry Posted
@(new DateTime(e.PeriodYear, e.PeriodMonth, 1).ToString("MMMM yyyy")) @e.Amount.ToString("C") @if (e.JournalEntry != null) { @e.JournalEntry.EntryNumber } else { } @e.CreatedAt.ToLocalTime().ToString("MM/dd/yyyy")
}