Bug 23063

Summary: Item table in cataloguing doesn't respect CurrencyFormat
Product: Koha Reporter: paxed <pasi.kallinen>
Component: CatalogingAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, lucas, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
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
Attachments: Bug 23063: Use Price formatting on amounts in item table in cataloguing
Bug 23063: Use Price formatting on amounts in item table in cataloguing
Bug 23063: Use Price formatting on amounts in item table in cataloguing

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 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 2022-10-03 15:41:43 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!