diff --git a/src/main/java/no/ntnu/idatt1002/demo/data/Economics/Overview.java b/src/main/java/no/ntnu/idatt1002/demo/data/Economics/Overview.java index b67373787d8931c2f7dce027fc0973343cf85f3b..e9433046151ca41d1f846ffc33ff333dd3882d11 100644 --- a/src/main/java/no/ntnu/idatt1002/demo/data/Economics/Overview.java +++ b/src/main/java/no/ntnu/idatt1002/demo/data/Economics/Overview.java @@ -77,12 +77,12 @@ public class Overview { } /** - * Method for updating the total revenue - * by taking the total sum of the income register + * Method for updating the total balance + * by taking the max amount of the budget * minus the total sum of the expense register. */ public void updateBalance(){ - balance = incomeRegister.getTotalSum() - expenseRegister.getTotalSum(); + balance = budget.getMaxAmount() - expenseRegister.getTotalSum(); } /**