Bug 12128

Summary: Acq basket shows some values with single decimal
Product: Koha Reporter: paxed <pasi.kallinen>
Component: Staff interfaceAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: gmcharlt, katrin.fischer, kyle, veron
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:
Attachments: Format values in acq basket display with two decimals
[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()
Bug 12128 [Alternate] - Acq basket shows some values with single decimal
[Signed-off] Bug 12128 [Alternate] - Acq basket shows some values with single decimal

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 ***