lihka1202 / pe

0 stars 0 forks source link

Issue with budget tracking #6

Open lihka1202 opened 1 year ago

lihka1202 commented 1 year ago

Another issue here:

> test
Shortcut used: test
rainyDay will now execute your mapped command: add -out noodles $5
Done! Added: out for noodles, -$5.00, in category miscellaneous on 14/04/2023
You have spent $-37.00/$50.00 for Apr 2023, Keep it up!
> test
Shortcut used: test
rainyDay will now execute your mapped command: add -out noodles $5
Done! Added: out for noodles, -$5.00, in category miscellaneous on 14/04/2023
You have spent $-32.00/$50.00 for Apr 2023, Keep it up!
> test
Shortcut used: test
rainyDay will now execute your mapped command: add -out noodles $5
Done! Added: out for noodles, -$5.00, in category miscellaneous on 14/04/2023
You have spent $-27.00/$50.00 for Apr 2023, Keep it up!
> test
Shortcut used: test
rainyDay will now execute your mapped command: add -out noodles $5
Done! Added: out for noodles, -$5.00, in category miscellaneous on 14/04/2023
You have spent $-22.00/$50.00 for Apr 2023, Keep it up!
> shortcut_view
+------------------------------------+---------------------------------------------------------------+
|Here are your shortcuts!                                                                            |
+------------------------------------+---------------------------------------------------------------+
|Shortcut                            |Mapped Command                                                 |
|test                                |add -out noodles $5                                            |
+------------------------------------+---------------------------------------------------------------+

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

nus-se-script commented 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]

Team's Response

Similar issue to 150, as a negative expenditure was introduced which we do not know how you obtained.

The 'Original' Bug

[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]

Their Response to the 'Original' Bug

[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.

image.png

Items for the Tester to Verify

:question: Issue duplicate status

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]


## :question: Issue response Team chose [`response.CannotReproduce`] - [ ] I disagree **Reason for disagreement:** [replace this with your reason]