From 45e6144b9daf589d4361cd2b3f48525aa1651897 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@biblibre.com>
Date: Mon, 30 Jun 2014 12:05:46 +0200
Subject: [PATCH] Bug 12164: Fix decimal number display
If the funds are not moved, the amount is display like 123.000000.
This patch hardcodes the number of decimal numbers to display (2).
---
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
index 3001978..31139ab 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
@@ -1,4 +1,5 @@
[% USE KohaDates %]
+[% USE format %]
[% INCLUDE 'doc-head-open.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'doc-head-close.inc' %]
@@ -462,7 +463,7 @@
[% IF r.orders_moved.size > 0 %]
[% FOR order IN r.orders_moved %]
<tr>
- <td>[% r.budget.budget_name %] (id=[% r.budget.budget_id %]) Amount=[% r.budget.budget_amount %][% IF r.unspent_moved %] ([% r.unspent_moved %] remaining has been moved)[% END %]</td>
+ <td>[% r.budget.budget_name %] (id=[% r.budget.budget_id %]) Amount=[% r.budget.budget_amount | format ("%.2f") %][% IF r.unspent_moved %] ([% r.unspent_moved | format ("%.2f")%] remaining has been moved)[% END %]</td>
<td>[% order.basketname %]</td>
<td>[% order.ordernumber %]</td>
<td>Moved!</td>
@@ -479,7 +480,7 @@
[% ELSE %]
[% IF r.error == 'budget_code_not_exists' %]
<tr>
- <td>[% r.budget.budget_id %] [% r.budget.budget_amount %][% IF r.unspent_moved %] ([% r.unspent_moved %] remaining has been moved)[% END %]</td>
+ <td>[% r.budget.budget_id %] [% r.budget.budget_amount | format ("%.2f") %][% IF r.unspent_moved %] ([% r.unspent_moved | format ("%.2f") %] remaining has been moved)[% END %]</td>
<td></td>
<td></td>
<td>This fund code does not exist in the destination budget.</td>
--
2.0.0.rc2