Closed cielf closed 2 weeks ago
I'd like to help with this issue.
Please do!
@cielf I started looking at this and I saw that a warning is displayed on the edit pages for donation/distribution/purchase that have an intervening audit (please refer to #4026 and #4086).
I just wanted to confirm with you if the feature for this issue is to be added on top of the existing warning, or if the existing warning needs to be modified at all.
Yes please, we still need it. Because someone could ignore the warning.
Do we need the warning at all if we have the error?
The warning is more wide-spread -- covering the items as well -- we will let them change the item levels, so yes.
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