Summary: | Incorrect warning that order total amount exceeds allowed budget when editing existing order | ||
---|---|---|---|
Product: | Koha | Reporter: | Aleisha Amohia <aleisha> |
Component: | Acquisitions | Assignee: | Aleisha Amohia <aleisha> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | ||
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | Sponsored | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This patch deducts the current cost of an order if modifying it, so that the current cost isn't counted when checking whether the updated cost will take the order total amount above the allowed budget.
|
|
Version(s) released in: |
22.11.00
|
Circulation function: | |
Bug Depends on: | |||
Bug Blocks: | 31631 | ||
Attachments: |
Bug 31840: Consider current cost if modifying order
Bug 31840: Consider current cost if modifying order Bug 31840: Consider current cost if modifying order |
Description
Aleisha Amohia
2022-10-17 00:43:58 UTC
Created attachment 141949 [details] [review] Bug 31840: Consider current cost if modifying order This patch deducts the current cost of an order if modifying it, so that the current cost isn't counted when checking whether the updated cost will take the order total amount above the allowed budget. To test: 1. Add an active budget of $1,000 2. Attach a fund of $1,000. Set the fund to warn at 98% and $900. 3. Add an order to a basket, give it a vendor price of $500 with no discount or tax and Save 4. Modify the order and change the vendor price to $450 and Save 5. Notice you get a warning that this order total amount will exceed the allowed budget - this is incorrect. 6. Apply the patch and cancel the change so you're redirected back to the basket 7. Modify the order and change the vendor price to $450 and Save 8. You should be able to Save without requiring confirmation 9. Add another order to the basket, give it a vendor price of $100 with no discount or tax and Save. This should save normally, confirming we can add new orders that do not exceed the allowed budget 10. Add another order to the basket, give it a vendor price of $500 with no discount or tax and Save. This should trigger the warning that you will exceed the allowed budget, as expected. Sponsored-by: Waikato Institute of Technology Created attachment 142129 [details] [review] Bug 31840: Consider current cost if modifying order This patch deducts the current cost of an order if modifying it, so that the current cost isn't counted when checking whether the updated cost will take the order total amount above the allowed budget. To test: 1. Add an active budget of $1,000 2. Attach a fund of $1,000. Set the fund to warn at 98% and $900. 3. Add an order to a basket, give it a vendor price of $500 with no discount or tax and Save 4. Modify the order and change the vendor price to $450 and Save 5. Notice you get a warning that this order total amount will exceed the allowed budget - this is incorrect. 6. Apply the patch and cancel the change so you're redirected back to the basket 7. Modify the order and change the vendor price to $450 and Save 8. You should be able to Save without requiring confirmation 9. Add another order to the basket, give it a vendor price of $100 with no discount or tax and Save. This should save normally, confirming we can add new orders that do not exceed the allowed budget 10. Add another order to the basket, give it a vendor price of $500 with no discount or tax and Save. This should trigger the warning that you will exceed the allowed budget, as expected. Sponsored-by: Waikato Institute of Technology Signed-off-by: David Nind <david@davidnind.com> Created attachment 143023 [details] [review] Bug 31840: Consider current cost if modifying order This patch deducts the current cost of an order if modifying it, so that the current cost isn't counted when checking whether the updated cost will take the order total amount above the allowed budget. To test: 1. Add an active budget of $1,000 2. Attach a fund of $1,000. Set the fund to warn at 98% and $900. 3. Add an order to a basket, give it a vendor price of $500 with no discount or tax and Save 4. Modify the order and change the vendor price to $450 and Save 5. Notice you get a warning that this order total amount will exceed the allowed budget - this is incorrect. 6. Apply the patch and cancel the change so you're redirected back to the basket 7. Modify the order and change the vendor price to $450 and Save 8. You should be able to Save without requiring confirmation 9. Add another order to the basket, give it a vendor price of $100 with no discount or tax and Save. This should save normally, confirming we can add new orders that do not exceed the allowed budget 10. Add another order to the basket, give it a vendor price of $500 with no discount or tax and Save. This should trigger the warning that you will exceed the allowed budget, as expected. Sponsored-by: Waikato Institute of Technology Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 22.11. Nice work everyone, thanks! |