[Bug 31840] New: Incorrect warning that order total amount exceeds allowed budget when editing existing order
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 Bug ID: 31840 Summary: Incorrect warning that order total amount exceeds allowed budget when editing existing order Change sponsored?: --- Product: Koha Version: 22.05 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: aleisha@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org We've noticed that we're getting a warning that the order total amount exceeds the allowed budget when we shouldn't be. To reproduce: 1. Add an active budget of $1,000 2. Attach a fund of $900 3. In Acquisitions, add an order to a basket, give it a vendor price of $500 with no discount and Save 4. Modify the order and change the vendor price to $450. Save the order 5. Notice the warning that we'll exceed the allowed budget, even though this is the only order using this fund and it does not exceed $900. Koha does a weird 500+450 calculation and thinks we've now ordered more than $900 but it is not considering that we've modified an existing order. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Assignee|koha-bugs@lists.koha-commun |aleisha@catalyst.net.nz |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|22.05 |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 --- Comment #1 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 141949 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141949&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This patch deducts the release notes| |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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31631 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31631 [Bug 31631] Optionally choose for tax-exclusive values to be used for calculating fund values (spent, ordered) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141949|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 142129 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142129&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142129|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143023 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143023&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31840 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org