[Bug 21427] New: Format prices on ordered/spent lists
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Bug ID: 21427 Summary: Format prices on ordered/spent lists Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org On bug 19271 we decided that the work to fix the prices should be split out into it's own bug. Leaving all credit to Katrin for spotting the issue and the initial patch. -- 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=21427 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 79485 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79485&action=edit Bug 21427: Format prices on ordered/spent lists Improvements to the display of lists of ordered and received orders: - Format prices according to CurrencyFormat system preference To test: - Make sure you have some pending and received orders - Access the Spent and Ordered pages by clicking on the amount ordered or spent on the acq start page - Verify that - All price information is shown according to CurrencyFormat Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- 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=21427 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Copying across Jonathans issue with this implimentation: (Jonathan Druart from comment #5)
I would not format the prices in the same patch/bug report, I am expecting regressions here: sum of round numbers (sprintf %.2f) vs round of sum (if it makes sense...)
(Jonathan Druart from comment #7)
use Modern::Perl; my $x = 12.344; my $y = 67.213; say sprintf("%.2f", $x)+sprintf("%.2f", $y); say sprintf("%.2f", $x+$y);'
79.55 79.56
(Martin Renvoize from comment #8)
Man that's upsetting, but I have to agree with Jonathan here.. the totals shouldn't really be calculated in this script in my opinion. But because they are, we can't make this change here.
Could we perhaps split into two bugs please Katrin?
-- 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=21427 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- 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=21427 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |katrin.fischer@bsz-bw.de, | |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18736 -- 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=21427 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Is it possible that this will not be a regression but a bug fix? It seems wrong that we added up the truncated prices int he first place? -- 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=21427 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |In Discussion --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I agree it's likely a bugfix.. however, I'm not sure about its implementation here.. I'd like to get Nicks opinion as it's overlapping with bug 18736 round errors. Ok, so in this case it's only at display time, but it's at display time that users will actually see the end results of the calculations and so those displayed numbers are what end users will expect are used throughout calculations within the system. My point really is that 'different' isn't necessarily wrong.. but I'm not qualified to argue for or against moving to it. -- 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=21427 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Also.. in reality I'd be more comfortable with these calculations being shifted up a level into the objects rather than in the display scripts.. that way the same calculations would be shared system-wide rather than risking them being re-implemented elsewhere in a different way. -- 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=21427 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Talked to Katrin - I think we can do as she suggested on bug 19271 - don't touch the scripts and simply add the price filter on display -- 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=21427 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |ASSIGNED -- 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=21427 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |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=21427 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm game for that :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21282 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 21282 adds a bit of filters. Waiting for that one. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21282 [Bug 21282] Ordered/spent lists should use prices including tax for calculations -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Brian <bklein@dubuque.lib.ia.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bklein@dubuque.lib.ia.us --- Comment #9 from Brian <bklein@dubuque.lib.ia.us> --- what's the status of bug 21427? Carnegie Stout Team -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Bug 21427 depends on bug 21282, which changed state. Bug 21282 Summary: Ordered/spent lists should use prices including tax for calculations https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21282 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=21427 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 83831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83831&action=edit Bug 21427: Format prices on ordered/spent lists consistently Some price information on the spent and ordered list already used the $Price filter. With this patch all amounts should be formatted according to the CurrencyFormat system preference. 1) Switch CurrencyFormat to FR 2) Make sure you have - Pending orders - An open invoice with shipment cost and adjustment with "encumber while open" checked - A received order - A closed invoice with shipment cost and adjustment 3) View the "oder" and "spent" lists clicking on the amounts in the budget and funds table on the acq start page 4) Verify all price information is formatted wit decimal comma 5) Switch CurrencyFormat to other settings and verify display changes accordingly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79485|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Brian from comment #9)
what's the status of bug 21427?
Carnegie Stout Team
Hi Carnegie Stout, took me a bit to get back to this. New patch added, would be easy to test with sandboxes (https://wiki.koha-community.org/wiki/Sandboxes) ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22112 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22112 [Bug 22112] Omnibus: Use Price filter everywhere -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Jack <jke0429@stacmail.net> 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=21427 Jack <jke0429@stacmail.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #83831|0 |1 is obsolete| | --- Comment #12 from Jack <jke0429@stacmail.net> --- Created attachment 84168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84168&action=edit Bug 21427: Format prices on ordered/spent lists consistently Some price information on the spent and ordered list already used the $Price filter. With this patch all amounts should be formatted according to the CurrencyFormat system preference. Signed-off-by: Jack Kelliher <jke0429@stacmail.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84168|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 84886 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84886&action=edit Bug 21427: Format prices on ordered/spent lists consistently Some price information on the spent and ordered list already used the $Price filter. With this patch all amounts should be formatted according to the CurrencyFormat system preference. Signed-off-by: Jack Kelliher <jke0429@stacmail.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 84887 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84887&action=edit Bug 21427: (QA follow-up) Fix for tabs Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Added tab fixing followup. Nice to see this one working it's way through.. happy to pass qa now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21427 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable Severity|enhancement |normal --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.04 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org