1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Fixed transaction donation bar showing full when actually empty

This commit is contained in:
Uncled1023 2017-03-08 21:12:36 -08:00
parent 5d27bb9c21
commit afe9a7727a

View File

@ -5,7 +5,7 @@
@{
decimal totalBills = Model.CurrentMonthBills;
decimal totalIncome = Model.CurrentMonthIncome;
int incomePercentage = 100;
int incomePercentage = 0;
if (totalIncome != 0 && totalBills != 0)
{
incomePercentage = (int)Math.Min(Math.Floor((totalIncome / totalBills) * 100), 100);