From 5ee22b2518374600c0368f3279f43e02d30830f6 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 14 Jan 2020 18:44:01 +0000 Subject: [PATCH] Bug 24395: Show initial float using the Price TT plugin on summary page For displaying monetary amounts, we should be using the Price TT plugin everywhere. This adds it to the cash register summary page. To test: - Create a cash register - Check the cash register table for "Initial float" - Verify the amount shows with more than 2 decimals - Edit cash register - verify the same display there - Apply patch - Check again - it should display now with only 2 decimals Signed-off-by: David Nind Signed-off-by: Caroline Cyr La Rose Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- .../intranet-tmpl/prog/en/modules/admin/cash_registers.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt index fa872b50d2..3d9b8b7aa6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt @@ -1,6 +1,7 @@ [% USE raw %] [% USE Asset %] [% USE Branches %] +[% USE Price %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › Cash registers @@ -97,7 +98,7 @@ <li> <label for="starting_float">Initial float: </label> - <input type="text" pattern='^\d+(?:\.\d{0,2})$' name="starting_float" id="starting_float" value="[% cash_register.starting_float | html %]" /> + <input type="text" pattern='^\d+(?:\.\d{0,2})$' name="starting_float" id="starting_float" value="[% cash_register.starting_float | $Price on_editing => 1 %]" /> </li> </ol> </fieldset> @@ -145,7 +146,7 @@ <td>[% cash_register.description | html %]</td> <td>[% cash_register.library.branchname | html %]</td> <td>[% IF cash_register.branch_default %]Yes[% ELSE %]No[% END %]</td> - <td>[% cash_register.starting_float | html %]</td> + <td>[% cash_register.starting_float | $Price %]</td> [% IF cash_register.archived == '0' %] <td class="actions"> <a class="btn btn-default btn-xs" href="cash_registers.pl?op=add_form&id=[% cash_register.id | uri %]"><i class="fa fa-pencil"></i> Edit</a> -- 2.39.5