strichliste / strichliste-backend

Strichliste Backend
https://www.strichliste.org
Other
24 stars 14 forks source link

incorrect balance after transaction #47

Closed relikd closed 5 years ago

relikd commented 5 years ago

After a couple of transactions and undos the account balance shows +1 € instead of 0 €.

screenshot

sqlite> select * from user where id = 2;
2|Oliver||100|0|2019-02-16 15:08:44|2019-02-16 16:08:21

sqlite> select * from transactions where user_id = 2;
1|2||||||1000|0|2019-02-16 15:08:57
2|2||||||-1000|0|2019-02-16 15:09:00
12|2|1|||1||-100|1|2019-02-16 16:08:09
13|2|1|||1||-100|1|2019-02-16 16:08:15

This may be relevant:

Also, you should change the cursor icon for article buttons. Currently it is not apparent that the button is clickable.

schinken commented 5 years ago

Hi! Thanks for the bug report. I will look into it

Which Database are you using? The only case where I can image this happens is with sqlite, because the database does not support the required transactional feature

schinken commented 5 years ago

aaah sorry. I should have looked first. You're using sqlite. Dang. Jeah this can only happen with sqlite.

As the website states, you should not use sqlite ;) https://www.strichliste.org/install/

I'm also going to change the default .env file