Open c1thunder opened 2 years ago
Hi there - I know this is a pretty old issue, but I wanted to check and see if you ever got this resolved? If so, can you please close the ticket? If not, can you update us on what version of Snipe-IT you're currently using, so we can see if it's still an issue on latest?
:) Thanks!
I was able to duplicate this. Probably relies on how fast the request to the web server is. First couple times I tried multiple clicks but only got one checkout. I had to spam my mouse pretty hard but I got 6 at a time. This could happen on any form submission I suspect.
HI @snipe, I did some testing by replicating the steps. And the issue is still there
I also replicated this on develop.snipeitapp.com ( our temple for everything related to snipeit ), and the same result was produced
Ignore the timing, just me living in another part of the world, yeah i am living in the future
I do not know if it possible to fix it and i believed you guys are professional and geek enough to fix it.
Cheers
The problem is not limited to consumables. Accidently double-clicking the save button can create duplicate entries. For example, if you create a license and inadvertently double-click save then you will get 2 identical licenses added. Any type of button that interacts with the database should be disabled as soon as it is clicked to prevent multiple fires.
Debug mode
Describe the bug
Some of the users when checkout the toner in consumables, they always spammed the checkout button and made the system register as double checkout. Then the remaining item is different from the stock that has been left.
The picture above shows a negative value
Example of one user double checkout the toner
We can fix the remaining stock by adding to the total quantities, but the issue will arise when we are doing a stock count and the total quantities are not tally with the stock that we are ordering.
To fix this, maybe admin can delete the user checkout if the admin detected double checkout occurred.
Sorry for bad english
Reproduction steps
Go to consumable screen
Click on any consumable item and click on checkout button
Spam click check out ...
Expected behavior
The remaining quantity will be different from the actual stock, and although the stock only has 1 left and under normal circumstances, the checkout button will be greyed out, it still registered as multiple checkouts and remaining quantities will be a negative value.
Screenshots
No response
Snipe-IT Version
5.4.4
Operating System
Windows Server 2012
Web Server
IIS
PHP Version
7.4
Operating System
Windows 10 Pro
Browser
Chrome, Edge
Version
No response
Device
Android Phone, iPhone
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
No response