Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][Checkout] Not enough components remaining: 1 remaining, 1 requested #12854

Closed
2 tasks done
koelle25 opened this issue Apr 17, 2023 · 0 comments · Fixed by #12855
Closed
2 tasks done

[Bug][Checkout] Not enough components remaining: 1 remaining, 1 requested #12854

koelle25 opened this issue Apr 17, 2023 · 0 comments · Fixed by #12855

Comments

@koelle25
Copy link
Contributor

koelle25 commented Apr 17, 2023

Debug mode

Describe the bug

If a component stock is down to one item, it's not possible to checkout this last one to an asset.

Reproduction steps

  1. Create a component, set available stock to 1
  2. Try to check it out to an asset

Expected behavior

I can checkout components down to the very last one, so none is available anymore after the checkout (stock = 0).

Screenshots

Creating a component with stock=1

Error when trying to checkout component with stock=1

Snipe-IT Version

v6.1.0

Operating System

Official Docker Image (Ubuntu 20.04.6)

Web Server

Official Docker Image (Apache2 2.4.41)

PHP Version

Official Docker Image (7.4.3)

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

I think I already found the culprit and will post a PR trying to fix this issue.

koelle25 added a commit to koelle25/snipe-it that referenced this issue Apr 17, 2023
snipe added a commit that referenced this issue Apr 17, 2023
Allow checkout of available components down to zero stock (fixes #12854)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant