The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

60 lines
2.1 KiB

@model Teknik.Areas.Status.ViewModels.TransactionsViewModel
@using Teknik.Areas.Status.ViewModels
@{
decimal totalBills = Model.CurrentMonthBills;
decimal totalIncome = Model.CurrentMonthIncome;
int incomePercentage = 100;
if (totalIncome != 0 && totalBills != 0)
{
incomePercentage = (int)Math.Min(Math.Floor((totalIncome / totalBills) * 100), 100);
}
string processStyle = "progress-bar progress-bar-success";
if (incomePercentage < 100)
{
processStyle += " progress-bar-striped";
}
}
<div class="row">
<div class="col-sm-12">
<h2 class="text-center"><b>Transactions</b></h2>
<hr>
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<h3 class="text-center">Monthly Donation Target</h3>
<div class="progress">
<div class="@processStyle" role="progressbar" style="width: @incomePercentage%"></div>
</div>
<div class="row">
<div class="col-sm-12 text-center">$@totalIncome Donated / $@totalBills Bills</div>
</div>
</div>
</div>
<h3 class="text-center">Transaction Totals</h3>
<div class="row">
<div class="col-sm-3 text-center">
<h4>Donations</h4>
<p>$@Math.Round(Model.TotalDonations, 2)</p>
</div>
<div class="col-sm-3 text-center">
<h4>Bills</h4>
<p>$@Math.Round(Model.TotalBills, 2)</p>
</div>
<div class="col-sm-3 text-center">
<h4>One-Time Payments</h4>
<p>$@Math.Round(Model.TotalOneTimes, 2)</p>
</div>
<div class="col-sm-3 text-center">
<h4>Net Profit</h4>
<p>$@Math.Round(Model.TotalNet, 2)</p>
</div>
</div>
</div>
</div>
@Html.Partial("~/Areas/Status/Views/Status/Bills.cshtml", Model.Bills)
@Html.Partial("~/Areas/Status/Views/Status/OneTimes.cshtml", Model.OneTimes)
@Html.Partial("~/Areas/Status/Views/Status/Donations.cshtml", Model.Donations)