Bug 14543 - Order lines updated that have a tax rate not in gist will have tax rate set to 0!
Summary: Order lines updated that have a tax rate not in gist will have tax rate set t...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on: 14541
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-16 16:14 UTC by Kyle M Hall
Modified: 2020-06-18 18:43 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.01, 19.11.07


Attachments
Bug 14543 - Order lines updated that have a tax rate not in gist will have tax rate set to 0! (2.88 KB, patch)
2015-07-16 16:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0! (3.12 KB, patch)
2019-12-03 10:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0! (2.66 KB, patch)
2019-12-03 11:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0! (2.80 KB, patch)
2020-05-21 12:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0! (2.86 KB, patch)
2020-05-27 16:06 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0! (2.92 KB, patch)
2020-06-08 10:13 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 14543: (QA follow-up) Add missing filter (1.22 KB, patch)
2020-06-08 10:13 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2015-07-16 16:14:32 UTC
If the tax rate for a given order line has been removed from the system preference gist, that tax rate will show in the pulldown as 0. If a librarian then saves the order line the original tax rate will be overwritten with 0%!
Comment 1 Kyle M Hall 2015-07-16 16:16:17 UTC
Created attachment 41033 [details] [review]
Bug 14543 - Order lines updated that have a tax rate not in gist will have tax rate set to 0!

If the tax rate for a given order line has been removed from the system
preference gist, that tax rate will show in the pulldown as 0. If a
librarian then saves the order line the original tax rate will be
overwritten with 0%!

Test Plan:
1) Find an order line
2) Remove the tax rate set for that order line from the syspref gist
3) Edit the order line
4) Note the tax rate is 0
5) Apply this patch
6) Edit the order line
7) Note the tax rate now displays with a warning
Comment 2 Jonathan Druart 2015-08-28 14:02:27 UTC
I would be happy to test this patch if it was not dependent on bug 14541.
Comment 3 Jonathan Druart 2019-12-03 10:57:47 UTC
Created attachment 95942 [details] [review]
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0!

If the tax rate for a given order line has been removed from the system
preference gist, that tax rate will show in the pulldown as 0. If a
librarian then saves the order line the original tax rate will be
overwritten with 0%!

Test Plan:
1) Find an order line
2) Remove the tax rate set for that order line from the syspref gist
3) Edit the order line
4) Note the tax rate is 0
5) Apply this patch
6) Edit the order line
7) Note the tax rate now displays with a warning
Comment 4 Jonathan Druart 2019-12-03 11:21:47 UTC
Created attachment 95943 [details] [review]
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0!

If the tax rate for a given order line has been removed from the system
preference gist, that tax rate will show in the pulldown as 0. If a
librarian then saves the order line the original tax rate will be
overwritten with 0%!

Test Plan:
1) Find an order line
2) Remove the tax rate set for that order line from the syspref gist
3) Edit the order line
4) Note the tax rate is 0
5) Apply this patch
6) Edit the order line
7) Note the tax rate now displays with a warning
Comment 5 Lisette Scheer 2020-01-15 22:10:24 UTC
It doesn't warn, but it does keep the old GST even once it has been removed from the gist sys pref. 
I tested in a sandbox.
Comment 6 Jonathan Druart 2020-05-21 12:29:17 UTC
Created attachment 105181 [details] [review]
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0!

If the tax rate for a given order line has been removed from the system
preference gist, that tax rate will show in the pulldown as 0. If a
librarian then saves the order line the original tax rate will be
overwritten with 0%!

Test Plan:
1) Find an order line
2) Remove the tax rate set for that order line from the syspref gist
3) Edit the order line
4) Note the tax rate is 0
5) Apply this patch
6) Edit the order line
7) Note the tax rate now displays with a warning
Comment 9 Katrin Fischer 2020-05-22 11:13:12 UTC
Sorry, wrong tab, wrong bug.
Comment 10 Victor Grousset/tuxayo 2020-05-27 16:06:31 UTC
Created attachment 105404 [details] [review]
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0!

If the tax rate for a given order line has been removed from the system
preference gist, that tax rate will show in the pulldown as 0. If a
librarian then saves the order line the original tax rate will be
overwritten with 0%!

Test Plan:
1) Find an order line
2) Remove the tax rate set for that order line from the syspref gist
3) Edit the order line
4) Note the tax rate is 0
5) Apply this patch
6) Edit the order line
7) Note the tax rate now displays with a warning

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 11 Victor Grousset/tuxayo 2020-05-27 16:09:43 UTC
It works! :D
Comment 12 Martin Renvoize 2020-06-08 10:13:33 UTC
Created attachment 105629 [details] [review]
Bug 14543: Order lines updated that have a tax rate not in gist will have tax rate set to 0!

If the tax rate for a given order line has been removed from the system
preference gist, that tax rate will show in the pulldown as 0. If a
librarian then saves the order line the original tax rate will be
overwritten with 0%!

Test Plan:
1) Find an order line
2) Remove the tax rate set for that order line from the syspref gist
3) Edit the order line
4) Note the tax rate is 0
5) Apply this patch
6) Edit the order line
7) Note the tax rate now displays with a warning

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 13 Martin Renvoize 2020-06-08 10:13:36 UTC
Created attachment 105630 [details] [review]
Bug 14543: (QA follow-up) Add missing filter

This patch adds a missing `| html` filter to the tax_rate value option
that the patchset adds

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize 2020-06-08 10:14:03 UTC
Works as expected, with QA followup we pass the QA scripts.

Passing QA
Comment 15 Jonathan Druart 2020-06-12 12:17:24 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 16 Lucas Gass 2020-06-17 21:03:11 UTC
backported to 20.05.x for 20.05.01
Comment 17 Aleisha Amohia 2020-06-17 23:35:00 UTC
backported to 19.11.x for 19.11.07
Comment 18 Victor Grousset/tuxayo 2020-06-18 18:43:04 UTC
Can't backport to 19.05.x: can't solve a conflict.
If there is an interest in having this backported, feel free to submit a patch for 19.05.

The following part of the conflict must considered carefully:

Not sure if it's
                    </select>
                    [% END %]
                    [% IF !gst_found %]<span class="required">Tax rate not defined in system preference gist!</span>[% END %]

or

                    </select>
                    [% IF !gst_found %]<span class="required">Tax rate not defined in system preference gist!</span>[% END %]
                    [% END %]