[Bug 22115] New: Table of checkouts doesn't respect CurrencyFormat setting
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22115 Bug ID: 22115 Summary: Table of checkouts doesn't respect CurrencyFormat setting Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Depends on: 22112 Target Milestone: --- The table of checkouts on the checkouts and details tabs in the patron account can display the columns Charge, Price and Fine. Those columns are not formatted according to the CurrencyFormat systme preference. I don't know how to fix this. It appears the formatting is currently done in checkouts.js using toFixed(2): Example: "mDataProp": function ( oObj ) { if ( ! oObj.charge ) oObj.charge = 0; return '<span style="text-align: right; display: block;">' + parseFloat(oObj.charge).toFixed(2) + '<span>'; } 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 the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22115 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22112 Depends on|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 the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22115 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Would it make sense to format the price in svc/checkouts? e.g. charge => Koha::Number::Price->new( $charge )->format_for_editing, Not sure if that is correct, copied from Price.pm. -- 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=22115 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28874 CC| |jonathan.druart+koha@gmail. | |com --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Ideally we need a JS function that copies what format_for_editing does. -- 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=22115 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- We already have koha-tmpl/intranet-tmpl/prog/en/includes/format_price.inc: Number.prototype.format_price = function( value, params ) { -- 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=22115 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=22115 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff 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=22115 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 140807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140807&action=edit Bug 22115: Format prices in table of checkouts according to CurrencyFormat setting In the patron account in the staff interface, all amounts in the checkouts table should be formatted according to the CurrencyFormat system preference setting. To test: * Edit some items, setting the replacement cost * Make sure one of the item type is set to charge a rental charge * Check out items * Verify the checkouts table displays on both checkouts and details tabs correctly * Try different settings of CurrencyFormat and verify all amounts display correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22115 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=22115 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140807|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 140811 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140811&action=edit Bug 22115: Format prices in table of checkouts according to CurrencyFormat setting In the patron account in the staff interface, all amounts in the checkouts table should be formatted according to the CurrencyFormat system preference setting. To test: * Edit some items, setting the replacement cost * Make sure one of the item type is set to charge a rental charge * Check out items * Verify the checkouts table displays on both checkouts and details tabs correctly * Try different settings of CurrencyFormat and verify all amounts display correctly 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=22115 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #6 from David Nind <david@davidnind.com> --- The only edge case I noticed was if the charge or replacement price is 1,000.00 or greater and the currency is FR, then because of the space instead of the , it appears in the columns for check out and details tabs as: 1 000,00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22115 Nick Clemens <nick@bywatersolutions.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=22115 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140811|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 141256 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141256&action=edit Bug 22115: Format prices in table of checkouts according to CurrencyFormat setting In the patron account in the staff interface, all amounts in the checkouts table should be formatted according to the CurrencyFormat system preference setting. To test: * Edit some items, setting the replacement cost * Make sure one of the item type is set to charge a rental charge * Check out items * Verify the checkouts table displays on both checkouts and details tabs correctly * Try different settings of CurrencyFormat and verify all amounts display correctly Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <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=22115 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 141257 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141257&action=edit Bug 22115: (QA follow-up) prevent wrap on price columns Signed-off-by: Nick Clemens <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=22115 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22115 --- Comment #9 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22115 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED CC| |lucas@bywatersolutions.com Resolution|--- |FIXED --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- Doesn't apply cleanly to 22.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org