[Bug 9374] New: In baskets, prices between 0 and 1 are displayed in red
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 Bug ID: 9374 Summary: In baskets, prices between 0 and 1 are displayed in red Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: mathieu.saby@univ-rennes2.fr Very cosmetic bug : In a basket, if some prices are between 0 and 1, they are displayed in red, with class = "number error". For example, a VAT of 0.89 euros is displayed in red. In don't think it is normal. this behavior was introduced by http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7112 M. Saby Rennes 2 university -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |mathieu.saby@univ-rennes2.f |ity.org |r -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 --- Comment #1 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Created attachment 21107 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21107&action=edit [PATCH] Bug 9374: Only 0.00 prices must have class error in basket.tt A regexp '^0' in basket.tt is used to give the class "error" to null prices. It is wrong, because it matches prices like "0.15". It should only match "0.00". To test : - apply the patch - display a basket with an order with a price between 0 and 1 (like "0.50") and an order with a price stricty null ("0.00") - only the "0.00" price should be displayed in red -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 cedric.vita@dracenie.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cedric.vita@dracenie.com --- Comment #2 from cedric.vita@dracenie.com --- Signing patches on sandbox (test1) did not work. Thank you to "Sign-off" on. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 Pierre Angot <tredok.pierre@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |tredok.pierre@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21107|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21250 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21250&action=edit Bug 9374: Only 0.00 prices must have class error in basket.tt A regexp '^0' in basket.tt is used to give the class "error" to null prices. It is wrong, because it matches prices like "0.15". It should only match "0.00". To test : - apply the patch - display a basket with an order with a price between 0 and 1 (like "0.50") and an order with a price stricty null ("0.00") - only the "0.00" price should be displayed in red Signed-off-by: Cedric Vita <cedric.vita@dracenie.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m QA Contact| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21250|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21265 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21265&action=edit Bug 9374: Only 0.00 prices must have class error in basket.tt A regexp '^0' in basket.tt is used to give the class "error" to null prices. It is wrong, because it matches prices like "0.15". It should only match "0.00". To test : - apply the patch - display a basket with an order with a price between 0 and 1 (like "0.50") and an order with a price stricty null ("0.00") - only the "0.00" price should be displayed in red Signed-off-by: Cedric Vita <cedric.vita@dracenie.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21266 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21266&action=edit Bug 9374: The color should manage all zero format. The format of prices in Koha is discuted in some bugs (e.g. 9410). The good way will be to introduce a syspref in order to deal with the number of decimal. The previous patch is too restrictive, we should deal with other zero format. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 --- Comment #6 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- I did not know bug 9410... As you rewrite the patch, I suppose it need an other sign off ? Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 21268 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21268&action=edit pic of a basket with several prices -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #8 from Galen Charlton <gmcharlt@gmail.com> --- Bugs 10792 and 10929 are somewhat related, as they touch on the general problem of displaying monetary amounts. Jonathan's follow-up patch bandaids the situation, but would become awkward if (say) the currency symbol started being displayed in the table. The approach I'm proposing in my WIP branch for bug 10929 would instead just pass the numeric currency amount to the template and rely on TT filters to format it for display. This, in turn, would mean that rather than having to use delicate regexes to see if an amount is zero, the template could simply do a numeric test. I'll probably push the patches for this bug as is, but slap a FIXME on them, as the currency formatting revamp will simplify the template logic. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Galen Charlton from comment #8)
Bugs 10792 and 10929 are somewhat related, as they touch on the general problem of displaying monetary amounts.
For information, I proposed a similar way in bug 9410. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master, along with a follow-up adding the promised FIXME. Thanks, Mathieu! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9374 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.8. Thanks Mathieu! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org