nus-cs2113-AY2223S1 / pe-dev-response

0 stars 0 forks source link

Wrong budget caculation #775

Open nus-pe-bot opened 1 year ago

nus-pe-bot commented 1 year ago

Wrong budget caculation

image.png


[original: nus-cs2113-AY2223S1/pe-interim#751] [original labels: severity.Medium type.FunctionalityBug]

wcwy commented 1 year ago

Team's Response

Unable to replicate the issue.

image.png

If the expenses for Oct 2022 in the tester's result is empty before the screenshot, he should achieve the same budget value as my screenshot above which shows the correct value (in my screenshot you can see that I purged the list before testing).

Since the amount of budget shown is different despite the same set of commands run by me, the only possibility is that the tester had added an expense of $1 at Oct 2022 before the screenshot.

Let me run through the output provided by the tester to show that there is no bug in the budget calculation, under the scenario where an expense of $1 is added at Oct 2022 before the screenshot:

On the add t/income c/bonus a/10000000 d/03102022 i/thank_you_boss line, as the current monthly budget set is $1, and as there should be one expense of $1 at Oct 2022 before the screenshot, the budget calculated is $0 (same as tester's screenshot).

On the add t/expense c/transport a/10000000 d/02102022 i/bus_fare, the budget set is $1, while the total expense spent in Oct 2022 is $10000000 + $1 = $10000001. As the budget set is $1, the calculated budget remaining is abs($1 - $10000001) = $10000000 (again, same as tester's screenshot).

Unless the tester is able to provide a proof that no expense under Oct 2022 was added for to the transaction list before the command inputs entered by him, the bug raised simply cannot be reproduced and hence will be rejected.

Duplicate status (if any):

--