You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any errors on deleting a purchase are not being caught appropriately, and are leading to a 500 error instead
Why Fix
Less bank confusion, less support work (fewer 500s are almost always a Good Thing)
Details
To check out this issue
sign in as [email protected]
click on purchases, then new purchases.
Fill out the purchase, with at least one item. Make a note of the quantity (A) of that item, and save.
Click on distribution, then new Distribution
fill out the distribution. Use the same storage location you did for the purchase. For the item you noted in purchase, make sure you distribute enough so that the amount of the item left is left than the quantity (A) of that item noted from the purchase.
Now, click on purchases, then all purchases
Click on view beside the purchase you want to delete
Then click Delete. Confirm that you wish to delete.
You will get a 500 error.
Instead, you should get an error indicating that there is not enough inventory for you to delete that purchase, along with
the amount you tried to remove, and the amount available. E.g. "Could not reduce quantity by 276 - current quantity is 188 for Incontinence Pads in Main Warehouse"
Criteria for completion
errors are caught and displayed properly when deleting purchases
tests to support that behaviour
The text was updated successfully, but these errors were encountered:
Summary
Any errors on deleting a purchase are not being caught appropriately, and are leading to a 500 error instead
Why Fix
Less bank confusion, less support work (fewer 500s are almost always a Good Thing)
Details
To check out this issue
sign in as [email protected]
click on purchases, then new purchases.
Fill out the purchase, with at least one item. Make a note of the quantity (A) of that item, and save.
Click on distribution, then new Distribution
fill out the distribution. Use the same storage location you did for the purchase. For the item you noted in purchase, make sure you distribute enough so that the amount of the item left is left than the quantity (A) of that item noted from the purchase.
Now, click on purchases, then all purchases
Click on view beside the purchase you want to delete
Then click Delete. Confirm that you wish to delete.
You will get a 500 error.
Instead, you should get an error indicating that there is not enough inventory for you to delete that purchase, along with
the amount you tried to remove, and the amount available. E.g. "Could not reduce quantity by 276 - current quantity is 188 for Incontinence Pads in Main Warehouse"
Criteria for completion
The text was updated successfully, but these errors were encountered: