Created attachment 27450 [details] [review] Format values in acq basket display with two decimals In the acquisitions basket, the values for total GSTE, total GSTI and GST are shown with a single decimal. Attached patch (re)formats the values to have two decimals. (The values are fetched from get_order_infos(), which formats the values correctly, but the formatting is lost when the values are added together)
Created attachment 27478 [details] [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() http://bugs.koha-community.org/show_bug.cgi?id=12128 To test open a basket and see some values without decimal formatting (e.g. in column Total tax exc.) Apply patch Values are now formatted wit two decimals. Patch behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 27611 [details] [review] 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.)
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.
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>
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 ***