Bug 22171 - Format shipping cost on invoice.pl with with 2 decimals
Summary: Format shipping cost on invoice.pl with with 2 decimals
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Katrin Fischer
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-18 16:58 UTC by Katrin Fischer
Modified: 2020-01-06 20:14 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22171: Fix shipping cost display on invoice (1.73 KB, patch)
2019-02-09 23:00 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22171: Fix shipping cost display on invoice (1.79 KB, patch)
2019-02-12 13:42 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 2019-02-12 13:42:51 UTC
Nice trivial fix, going straight for QA on this one.
Comment 4 Nick Clemens 2019-02-15 18:50:42 UTC
Awesome work all!

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