human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Prevent changing storage location on itemizables if there has been an intervening audit of the items involved

Open cielf opened this issue 1 year ago • 0 comments

Summary

Prevent changing storage location on donation/distribution/purchase if there has been an intervening audit on the items involved.

Why?

It's an extremely edge case, and we're not sure what the effects on inventory should be in this case. It gets really messy if new items are added at the same time, for example!

Details

For each of purchase, donation, and distribution: On edit, on save, if the storage location has been changed, and there has been an intervening audit on any of the items involved (either original or new) for either of the storage locations, give the error message as follows:

For distribution: "Cannot change the storage location because there has been an intervening audit of some items. If you need to change the storage location, please reclaim this distribution and create a new distribution from the new storage location"

For donation: "Cannot change the storage location because there has been an intervening audit of some items. If you need to change the storage location, please delete this donation and create a new donation with the new storage location"

For purchases: "Cannot change the storage location because there has been an intervening audit of some items. If you need to change the storage location, please delete this purchase and create a new purchase with the new storage location"

Criteria for completion

  • [ ] functionality as described above
  • [ ] tests to support functionality as described above

cielf avatar Apr 25 '24 19:04 cielf