Open lihka1202 opened 1 year ago
[IMPORTANT!: Please do not edit or reply to this comment using the GitHub UI. You can respond to it using CATcher during the next phase of the PE]
Similar issue to 150, as a negative expenditure was introduced which we do not know how you obtained.
[The team marked this bug as a duplicate of the following bug]
Budget Calculator keeping track of expenses even after they are removed
> delete 1 Unable to execute the operation without transaction data! Please add transactions first! > setbudget 50 Monthly Budget Goal set to $50.00! > add -out food $25 Done! Added: out for food, -$25.00, in category miscellaneous on 14/04/2023 You have spent $-42.00/$50.00 for Apr 2023, Keep it up! > view -all +====================================================================================================+ |Here is your financial report! | +------+---------------------------------------------+--------------+---------------------+----------+ |Index |Description |Amount |Category |Date | |000001|food |-$25.00 |miscellaneous |14/04/2023| +------+---------------------------------------------+--------------+---------------------+----------+ |Viewing all entries from the start of time | |Total Inflow: $0.00 | |Total Outflow: $25.00 | |Remaining value: -$25.00 | +====================================================================================================+
In this program I have deleted all the entries, set a new budget of 50. However, when I add in a new expense of 25, the expenditure report states that "You have spent $-42.00/$50.00 for Apr 2023, Keep it up!". This couldn't be possible as I had deleted all records and restarted, which means that the budget tracker is unable to remove expenses after they have been removed from the list. This could be a higher level issue, but I've kept it at medium
[original: nus-cs2113-AY2223S2/pe-interim#126] [original labels: type.FunctionalityBug severity.Medium]
[This is the team's response to the above 'original' bug]
We are unable to duplicate this issue of obtaining a negative amount of expenditure to begin with. Our attempt to recreate the bug does not work as well.
Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)
Reason for disagreement: [replace this with your reason]
Another issue here:
Whenever an expense is added, the spent budget is increasing. This means that the program is showing negative expenditure, which isn't logical. Ideally, you cant spend negative amounts of money. Perhaps this is an issue with the display