Bug 28280 - Item types configuration page doesn't use Price filter for default replacement cost and processing fee
Summary: Item types configuration page doesn't use Price filter for default replacemen...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Didier Gautheron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-04 07:13 UTC by Didier Gautheron
Modified: 2022-06-06 20:25 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the display of 'Default replacement cost' and a 'Processing fee (when lost)' when adding item types so that amounts use two decimals instead of six.
Version(s) released in:
21.11.00,21.05.02,20.11.08


Attachments
Bug 28280: itemtype page, add price formatting (1.86 KB, patch)
2021-05-04 07:26 UTC, Didier Gautheron
Details | Diff | Splinter Review
Bug 28280: itemtype page, add price formatting (1.91 KB, patch)
2021-05-28 23:47 UTC, David Nind
Details | Diff | Splinter Review
Bug 28280: itemtype page, add price formatting (1.96 KB, patch)
2021-06-03 10:33 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Didier Gautheron 2021-05-04 07:13:13 UTC
I don't know if it's an oversight or because they couldn't be NULL anymore if $Price is used but in /cgi-bin/koha/admin/itemtypes.pl page detail  defaultreplacecost and processfee aren't formatted unlike 

To Test:
1- create an item type with a 'Default replacement cost' and a 
'Processing fee (when lost)' 
2- numbers are displayed with 6 decimals.
4- apply patch
5- numbers are displayed with 2 decimals.
Comment 1 Didier Gautheron 2021-05-04 07:26:26 UTC
Created attachment 120427 [details] [review]
Bug 28280: itemtype page, add price formatting

To Test:
1- create an item type with a 'Default replacement cost' and a
'Processing fee (when lost)'
2- numbers are displayed with 6 decimals.
4- apply patch
5- numbers are displayed with 2 decimals.
Comment 2 David Nind 2021-05-28 23:47:40 UTC
Created attachment 121502 [details] [review]
Bug 28280: itemtype page, add price formatting

To Test:
1- create an item type with a 'Default replacement cost' and a
'Processing fee (when lost)'
2- numbers are displayed with 6 decimals.
4- apply patch
5- numbers are displayed with 2 decimals.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2021-05-28 23:50:29 UTC
Testing notes (koha-testing-docker):
- Numbers are displayed with six decimals when you edit the item type, otherwise they display correctly on the item type listing page
Comment 4 Katrin Fischer 2021-06-03 10:33:12 UTC
Created attachment 121573 [details] [review]
Bug 28280: itemtype page, add price formatting

To Test:
1- create an item type with a 'Default replacement cost' and a
'Processing fee (when lost)'
2- numbers are displayed with 6 decimals.
4- apply patch
5- numbers are displayed with 2 decimals.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-06-21 10:05:35 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall 2021-07-02 13:25:55 UTC
Pushed to 21.05.x for 21.05.02
Comment 7 Fridolin Somers 2021-07-10 03:28:51 UTC
Pushed to 20.11.x for 20.11.08
Comment 8 Victor Grousset/tuxayo 2021-07-11 02:35:32 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.