[Bug 31984] New: TaxRate system preference - incorrect default value used and warning message on order form
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31984 Bug ID: 31984 Summary: TaxRate system preference - incorrect default value used and warning message on order form Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: david@davidnind.com QA Contact: testopia@bugs.koha-community.org For the TaxRate system preference: 1. The description [1] says that the first value entered will be used by default. 2. When entering an order for a basket, the last value in the list is selected as the default (19.65%). 3. If the values for the TaxRate system preference are changed, for example having the values: 0.15|0.20: - 19.65% is shown as the default value, even though it is not a value entered in the TaxRate system preference - There is a warning for the 'Tax rate' input field for the order: "Tax rate not defined in system preference TaxRates!" - The tax inclusive values for budgets/funds are calculated correctly if you choose another option, despite the warning message. To replicate: 1. Check that there are values entered for the TaxRates system preference (in KTD the values entered are: 0|0.12|0.1965). 2. Create a new basket (or use an existing one). 3. Add a new order to the basket. 4. On the accounting details form, note that the default value for the 'Tax rate' field is 19.65% and the other options are 0% and 12%. 5. Complete adding the order to the basket. 6. On the acquisitions home page, note that the ordered amount is tax inclusive and is calculated correctly. 7. Change the TaxRates system preference to: 0.15|0.20 8. Repeat steps 2-3. 9. Note that on the accounting details form for the 'Tax rate' field: . the options available are 15%, 20%, and 19.65%, with the 19.65% shown as the default - even though 19.65% is not a value entered for the system preference . there is a warning for the field: "Tax rate not defined in system preference TaxRates!" 10. Select the 15% option, and repeat steps 5-6. The tax inclusive amount is correctly calculated, despite the warning that was on the form. [1] Current description in master, with default values used in KTD: Tax rates are [0|0.12|0.1965]. Enter in numeric form, 0.12 for 12%. The first item in the list will be selected by default. For more than one value, separate with | (pipe). Please note: The database will only accept values up to 4 decimals precision, further values will be rounded. -- 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=31984 --- Comment #1 from David Nind <david@davidnind.com> --- Created attachment 142659 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142659&action=edit Screenshot - tax rate field for order form (with custom values) A screenshot showing the accounting details form for an order, where 15% and 20% values are entered into the TaxRate system preference (0.15|0.20). Note that 19.65% is selected by default, even though it is not a value entered into the TaxRate system preference. -- 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=31984 --- Comment #2 from David Nind <david@davidnind.com> --- (In reply to David Nind from comment #1)
Created attachment 142659 [details]
Also note the warning message. -- 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=31984 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 142660 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142660&action=edit Screenshot - Receiving order - formatting and default values Testing notes and issues/query (tested using koha-testing-docker). Three things I noticed: 1. Tax Rate system preference warning message --------------------------------------------- Even though I defined the Tax Rate system preference as 0.15, when adding an item to a basket: for tax rate there is a message saying "Tax rate not defined in system preference TaxRates!". Despite the warning, everything is calculated correctly using the 15% tax rate. I've logged bug 31984 for this, as this was happening before the patches were applied (includes a screenshot to show what I mean). 2. Step 13 - Formatting things ------------------------------ When receiving order (see screenshot): - For the Retail price field: no space after value and the opening bracket; no space between comma and tax exclusive - For the Budgeted cost field: no space after value and the opening bracket 3. For step 13 - Query about using the default values ----------------------------------------------------- I received the order with the default values (see the screenshot). As the actual cost defaulted to $10 (as entered in step 6), then the 10.00 is the value excluding tax, so: - For step 14: spent = 10.00 - For step 15: subtotal = 10.00 - For step 17: spent = 11.50 - For step 18: subtotal = 11.50 These values are correctly calculated, but don't match up with the test plan. So should I have entered the actual costs as 8.00 (the $10 retail price less the 20% discount, tax exclusive)? -- 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=31984 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142660|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Comment on attachment 142660 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142660 Screenshot - Receiving order - formatting and default values Incorrectly added to this bug! -- 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=31984 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Either the pref or the behavior is certainly wrong! Confirmed on current master that the last value of taxrate is selected instead of the first as documented. -- 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=31984 --- Comment #6 from David Nind <david@davidnind.com> --- Worked out that the 19.65 is coming from the vendor information: 1. Check "My Vendor" - tax rate is set to 19.65% - drop down list has values from TaxRates. 2. Change TaxRates, for example: from 0|0.12|0.1965 to 0|0.12|0.15 3. Vendor tax rate remains as 19.65 until you edit the vendor (when editing will default to 0%). -- 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=31984 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to David Nind from comment #6)
Worked out that the 19.65 is coming from the vendor information: 1. Check "My Vendor" - tax rate is set to 19.65% - drop down list has values from TaxRates. 2. Change TaxRates, for example: from 0|0.12|0.1965 to 0|0.12|0.15 3. Vendor tax rate remains as 19.65 until you edit the vendor (when editing will default to 0%).
Ok, that makes sense. When you create a new vendor, the first is selected correctly. So is this ok after all? -- 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=31984 --- Comment #8 from David Nind <david@davidnind.com> --- (In reply to Katrin Fischer from comment #7)
Ok, that makes sense.
When you create a new vendor, the first is selected correctly.
So is this ok after all?
It makes sense. But should there be a warning somewhere? Either (or both): - For the TaxRates system preference to say that vendor information may need updating if you remove existing values (for example, "NOTE: Current vendor information may need updating if existing tax rates values are removed.") - For the warning on the order to say something along the lines of "vendor tax rate needs updating" (Possibly "The tax rate for the vendor does not match any values in the TaxRates system preference - please update the information for this vendor." -- 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=31984 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- To me the warning is ok as is, but I think adding to the pref might be helpful. -- 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=31984 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |david@davidnind.com |ity.org | --- Comment #10 from David Nind <david@davidnind.com> --- (In reply to Katrin Fischer from comment #9)
To me the warning is ok as is, but I think adding to the pref might be helpful.
Have assigned to myself - I think I can manage changing the text for the system preference. -- 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=31984 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement adds a release notes| |note to the TaxRates system | |preference about updating | |vendors tax rates when the | |TaxRates system preference | |values are changed or | |removed. (Vendors retain | |the original value entered, | |and this is used to | |calculate the tax rate for | |orders.) Summary|TaxRate system preference - |TaxRate system preference - |incorrect default value |add note about updating |used and warning message on |vendor tax rates where |order form |required Severity|normal |trivial Status|NEW |ASSIGNED Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31984 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31984 --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 144282 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144282&action=edit Bug 31984: TaxRate preference - add note about vendor updates If a value for the TaxRates system preference is changed or removed, vendors retain the original value recorded in their tax rate field. The vendor tax rate is used to calculate prices for orders added to a basket. Where the tax rate doesn't match with the system preference, a warning message is displayed on the order form "Tax rate not defined in system preference TaxRates!". This patch adds a note to the system preference description about updating vendor tax rate information where required. Test plan: 1. Check the values recorded for the TaxRates system preference. 2. For a vendor (Acquisitions > search for a vendor > Edit vendor), check the value recorded in the tax rate field. 3. Note that the tax rate field is populated from a dropdown list using values from the TaxRates system preference. 4. Change the TaxRates system preferemce to remove a tax rate. For example, change 0|0.12|0.1965 to 0|0.12. 5. Refresh the vendor page. 6. Note that the vendor tax rate remains as the original value until you edit the vendor. 7. Apply the patch. 8. Review the description for the TaxRates system preference and make sure the new note about updating vendor tax rates where required makes sense. 9. Sign off! 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=31984 Lucas Gass <lucas@bywatersolutions.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=31984 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144282|0 |1 is obsolete| | --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 144303 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144303&action=edit Bug 31984: TaxRate preference - add note about vendor updates If a value for the TaxRates system preference is changed or removed, vendors retain the original value recorded in their tax rate field. The vendor tax rate is used to calculate prices for orders added to a basket. Where the tax rate doesn't match with the system preference, a warning message is displayed on the order form "Tax rate not defined in system preference TaxRates!". This patch adds a note to the system preference description about updating vendor tax rate information where required. Test plan: 1. Check the values recorded for the TaxRates system preference. 2. For a vendor (Acquisitions > search for a vendor > Edit vendor), check the value recorded in the tax rate field. 3. Note that the tax rate field is populated from a dropdown list using values from the TaxRates system preference. 4. Change the TaxRates system preferemce to remove a tax rate. For example, change 0|0.12|0.1965 to 0|0.12. 5. Refresh the vendor page. 6. Note that the vendor tax rate remains as the original value until you edit the vendor. 7. Apply the patch. 8. Review the description for the TaxRates system preference and make sure the new note about updating vendor tax rates where required makes sense. 9. Sign off! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31984 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31984 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144303|0 |1 is obsolete| | --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 144479 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144479&action=edit Bug 31984: TaxRate preference - add note about vendor updates If a value for the TaxRates system preference is changed or removed, vendors retain the original value recorded in their tax rate field. The vendor tax rate is used to calculate prices for orders added to a basket. Where the tax rate doesn't match with the system preference, a warning message is displayed on the order form "Tax rate not defined in system preference TaxRates!". This patch adds a note to the system preference description about updating vendor tax rate information where required. Test plan: 1. Check the values recorded for the TaxRates system preference. 2. For a vendor (Acquisitions > search for a vendor > Edit vendor), check the value recorded in the tax rate field. 3. Note that the tax rate field is populated from a dropdown list using values from the TaxRates system preference. 4. Change the TaxRates system preferemce to remove a tax rate. For example, change 0|0.12|0.1965 to 0|0.12. 5. Refresh the vendor page. 6. Note that the vendor tax rate remains as the original value until you edit the vendor. 7. Apply the patch. 8. Review the description for the TaxRates system preference and make sure the new note about updating vendor tax rates where required makes sense. 9. Sign off! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31984 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.05.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=31984 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31984 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00 |23.05.00,22.11.00 released in| | Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31984 --- Comment #15 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Nice work, thanks everyone! Pushed to 22.11.x for the next release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31984 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jacob.omara@ptfs-europe.com Version(s)|23.05.00,22.11.00 |23.05.00,22.11.01 released in| | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org