From 6af658ea42bb628e37204d8a7d843ff80c1f0c2c Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 20 Sep 2022 20:49:22 +0000 Subject: [PATCH] Bug 23063: Use Price formatting on amounts in item table in cataloguing Koha can use CurrencyFormat for displaying price amounts and should do so consistently everywhere. Without this patch price and replacement cost will always display as xx.xx independent of CurrencyFormat setting in the table above the edit items form. This patch fixes the table display. To test: * Apply patch * Search or create a record with multiple items * Fill in some price and replacement costs * Try different settings of the CurrencyFormat system preference * The display in the item table above the edit/add form should display according to the system preference * Verify sorting works Signed-off-by: David Nind Signed-off-by: Nick Clemens --- koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 31eaf8e3bd..61a442f6de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -3,6 +3,7 @@ [% USE Koha %] [% USE Branches %] [% USE KohaDates %] +[% USE Price %] [% USE TablesSettings %] [% INCLUDE 'doc-head-open.inc' %] Items › [% biblio.title | html %] [% IF ( biblio.author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %]) › Cataloging › Koha @@ -126,6 +127,8 @@ [% SET attribute = header.attribute %] [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %] [% item.$attribute | $KohaDates %] + [% ELSIF ( item.$attribute && ( attribute == 'price' || attribute == 'replacementprice' ) ) %] + [% item.$attribute | $Price %] [% ELSE %] [% item.$attribute | html %] [% END %] -- 2.30.2