Skip to content
Snippets Groups Projects
Commit 9345ef0c authored by Harry Linrui XU's avatar Harry Linrui XU
Browse files

Updated method for calculating balance

parent 1c419752
No related branches found
No related tags found
3 merge requests!43Merging frontend-testing into master,!38"Made progressbar dynamic in accordance to spending. Added balance field....,!37Made the sub progress bars respond to changes in expense
......@@ -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();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment