Bug 12128 - Acq basket shows some values with single decimal
Summary: Acq basket shows some values with single decimal
Status: RESOLVED DUPLICATE of bug 12970
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-23 07:41 UTC by paxed
Modified: 2014-11-09 17:57 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
Format values in acq basket display with two decimals (998 bytes, patch)
2014-04-23 07:41 UTC, paxed
Details | Diff | Splinter Review
[Signed-off] Format some of the values in basket display with two decimals, as adding the values together loses the formatting given by get_order_infos() (1.35 KB, patch)
2014-04-23 13:44 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 12128 [Alternate] - Acq basket shows some values with single decimal (2.65 KB, patch)
2014-04-25 12:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
[Signed-off] Bug 12128 [Alternate] - Acq basket shows some values with single decimal (2.81 KB, patch)
2014-04-25 13:14 UTC, Marc Véron
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2014-04-23 07:41:04 UTC Comment hidden (obsolete)
Comment 1 Marc Véron 2014-04-23 13:44:14 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2014-04-25 12:08:20 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2014-04-25 12:10:28 UTC
I think it would be best to move this formatting logic to the template, rather than formatting the string in perl. Since this is a display issue, we should solve it at the display level whenever possible.

If paxed, Marc or anyone else agrees with me, please sign the alternate patch and deprecate the original patch.
Comment 4 Marc Véron 2014-04-25 13:14:16 UTC
Created attachment 27623 [details] [review]
[Signed-off] Bug 12128 [Alternate] - Acq basket shows some values with single decimal

To test open a basket and see some values without decimal formatting
(e.g. in column Total tax exc.)

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 5 Katrin Fischer 2014-11-09 17:57:37 UTC
I think this patch got lost 'in discussion'. In the current pl file we got:
        total_gste           => sprintf( "%.2f", $total_gste ),
        total_gsti           => sprintf( "%.2f", $total_gsti ),
        total_gstvalue       => sprintf( "%.2f", $total_gstvalue ),
So the display problem no longer appears.

I agree that the formatting should be in the template - Jonathan has worked on a TT plugin for currencies in acq that I think will do that.

*** This bug has been marked as a duplicate of bug 12970 ***