specify / specify7

Specify 7
https://www.specifysoftware.org/products/specify-7/
GNU General Public License v2.0
66 stars 36 forks source link

Loan Return Preparations can be saved with negative quantity returned values #5031

Open lexiclevenger opened 4 months ago

lexiclevenger commented 4 months ago

Describe the bug Users can set the value of the quantity returned of a loan preparation to lower than 0 and save the Loan record it is linked to. This does not seem to affect the count available or actual count amount of the preparation but is still visible on the Loan Preparations form.

To Reproduce Steps to reproduce the behavior:

  1. Create or use an existing loan record
  2. Return the record and save
  3. Click on the "LrP" icon to open the Loan Return Preparations form
  4. Lower the value to a negative number and save the Loan record.

Expected behavior Currently, if a number is set lower than 0 in the quantity resolved field, it returns to the original value when the Loan form is save; applying this behavior to the quantity returned field would prevent the issue.

Screenshots

https://github.com/specify/specify7/assets/164079735/4250a98b-17dd-4ddd-af58-a31d91e8be5a

Specify 7 System Information - 2024-06-21T20_47_29.914Z.txt

Please, also fill out the following information manually:

emenslin commented 3 months ago

Can recreate in edge (7.9.6)