Bug 28280

Summary: Item types configuration page doesn't use Price filter for default replacement cost and processing fee
Product: Koha Reporter: Didier Gautheron <didier.gautheron>
Component: TemplatesAssignee: Didier Gautheron <didier.gautheron>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: david, fridolin.somers, kyle, victor
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
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
Bug 28280: itemtype page, add price formatting
Bug 28280: itemtype page, add price formatting

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.