Bug 23063 - Item table in cataloguing doesn't respect CurrencyFormat
Summary: Item table in cataloguing doesn't respect CurrencyFormat
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-06 09:24 UTC by paxed
Modified: 2023-12-28 20:42 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This makes sure that the price and replacement price of an item is displayed according to the CurrencyFormat setting in the items table above the add/edit item form.
Version(s) released in:
22.11.00
Circulation function:


Attachments
Bug 23063: Use Price formatting on amounts in item table in cataloguing (2.22 KB, patch)
2022-09-20 20:56 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23063: Use Price formatting on amounts in item table in cataloguing (2.26 KB, patch)
2022-09-20 22:57 UTC, David Nind
Details | Diff | Splinter Review
Bug 23063: Use Price formatting on amounts in item table in cataloguing (2.32 KB, patch)
2022-10-03 12:08 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2019-06-06 09:24:37 UTC
Adding or editing an item, fields mapped to items.price and items.replacementprice do not obey CurrencyFormat.
Comment 1 Katrin Fischer 2019-06-17 21:56:01 UTC
You are right, but it's the same for all price/monetary amounts. Koha currently only works with decimal .

Something we need to find a global fix for - changing to enh.
Comment 2 Katrin Fischer 2022-09-20 20:56:19 UTC
Created attachment 140806 [details] [review]
Bug 23063: Use Price formatting on amounts in item table in cataloguing

Koha can use CurrencyFormat for displaying price amounts and should do
so consistently everywhere. Without this patch price and replacement cost
will always display as xx.xx independent of CurrencyFormat setting in
the table above the edit items form. This patch fixes the table display.

To test:
* Apply patch
* Search or create a record with multiple items
* Fill in some price and replacement costs
* Try different settings of the CurrencyFormat system preference
* The display in the item table above the edit/add form should display
  according to the system preference
* Verify sorting works
Comment 3 David Nind 2022-09-20 22:57:52 UTC
Created attachment 140812 [details] [review]
Bug 23063: Use Price formatting on amounts in item table in cataloguing

Koha can use CurrencyFormat for displaying price amounts and should do
so consistently everywhere. Without this patch price and replacement cost
will always display as xx.xx independent of CurrencyFormat setting in
the table above the edit items form. This patch fixes the table display.

To test:
* Apply patch
* Search or create a record with multiple items
* Fill in some price and replacement costs
* Try different settings of the CurrencyFormat system preference
* The display in the item table above the edit/add form should display
  according to the system preference
* Verify sorting works

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Katrin Fischer 2022-09-22 11:29:13 UTC
Thank you, David!
Comment 5 Nick Clemens (kidclamp) 2022-10-03 12:08:50 UTC
Created attachment 141259 [details] [review]
Bug 23063: Use Price formatting on amounts in item table in cataloguing

Koha can use CurrencyFormat for displaying price amounts and should do
so consistently everywhere. Without this patch price and replacement cost
will always display as xx.xx independent of CurrencyFormat setting in
the table above the edit items form. This patch fixes the table display.

To test:
* Apply patch
* Search or create a record with multiple items
* Fill in some price and replacement costs
* Try different settings of the CurrencyFormat system preference
* The display in the item table above the edit/add form should display
  according to the system preference
* Verify sorting works

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi (tcohen) 2022-10-03 15:41:43 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!