Bug 22171

Summary: Format shipping cost on invoice.pl with with 2 decimals
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: AcquisitionsAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers, lucas, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 22171: Fix shipping cost display on invoice
Bug 22171: Fix shipping cost display on invoice

Description Katrin Fischer 2019-01-18 16:58:36 UTC
The shipping cost on an invoice will show as 12.00000 instead of 12.00.
Comment 1 Katrin Fischer 2019-02-09 23:00:08 UTC
Created attachment 84935 [details] [review]
Bug 22171: Fix shipping cost display on invoice

When not 0 the shipping cost on the invoice would display with
a lot of numbers after the comma. This fixed it to display with
only 2.

To test:
- Make sure you have an invoice with shipping cost set (example: 5.00)
- Open the invoice for editing (invoice.pl)
- Verify the shipping cost displays with too many decimals (5.000000)
- Apply patch
- Verify now the shipping cost displays correctly (5.00)
Comment 2 Martin Renvoize (ashimema) 2019-02-12 13:42:29 UTC
Created attachment 85014 [details] [review]
Bug 22171: Fix shipping cost display on invoice

When not 0 the shipping cost on the invoice would display with
a lot of numbers after the comma. This fixed it to display with
only 2.

To test:
- Make sure you have an invoice with shipping cost set (example: 5.00)
- Open the invoice for editing (invoice.pl)
- Verify the shipping cost displays with too many decimals (5.000000)
- Apply patch
- Verify now the shipping cost displays correctly (5.00)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize (ashimema) 2019-02-12 13:42:51 UTC
Nice trivial fix, going straight for QA on this one.
Comment 4 Nick Clemens (kidclamp) 2019-02-15 18:50:42 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize (ashimema) 2019-02-25 15:29:50 UTC
Pushed to 18.11.x for 18.11.04
Comment 6 Lucas Gass (lukeg) 2019-03-05 22:58:49 UTC
backported to 18.05.x for 18.05.11