Skip to content

Commit

Permalink
Merge pull request nus-cs2103-AY2021S1#85 from yyutong/master
Browse files Browse the repository at this point in the history
Fix showBudget bug, update UserGuide
  • Loading branch information
tanwayne890 authored Oct 15, 2020
2 parents 7defdaf + e764bde commit b1ac682
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ Action | Format, Examples
**List** | `list`
**Delete** | `delete INDEX`<br> e.g., `delete 3`
**View** | `view INDEX`<br> e.g., `view 5`
**View existing categori labels** | `viewCategory`
**Add Description** | `addDes INDEX d/DESCRIPTION`<br> e.g., `addDes 2 d/ENTERTAINMENT`
**Delete Description** | `deleteDes INDEX`<br> e.g., `deleteDes 2`
**Set Budget** | `setBudget a/AMOUNT`<br> e.g., `setBudget a/1000`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public double getBudget() {

public double getRemainingBudget() {
double used = 0;
for (int i = 0; i < internalList.size() - 1; i++) {
for (int i = 0; i < internalList.size(); i++) {
used += internalList.get(i).getAmount().getValue();
}
return this.budget - used;
Expand Down

0 comments on commit b1ac682

Please sign in to comment.