From f42176cb6d7f9035f3ca9d97ba2bc0de69307fb3 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 19 Mar 2012 12:35:41 +0100 Subject: [PATCH] Bug 7743: Update opac-account.pl to use KohaDates TT plugin Signed-off-by: Marijana Glavica --- koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tt | 4 +++- opac/opac-account.pl | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tt index 8b9d84b229..9549ea2c79 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tt @@ -1,3 +1,5 @@ +[% USE KohaDates %] + [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Your fines and charges [% INCLUDE 'doc-head-close.inc' %] @@ -35,7 +37,7 @@ [% FOREACH ACCOUNT_LINE IN ACCOUNT_LINES %] [% IF ( ACCOUNT_LINE.odd ) %][% ELSE %][% END %] - [% ACCOUNT_LINE.date %] + [% ACCOUNT_LINE.date | $KohaDates %] [% ACCOUNT_LINE.description %] [% IF ( ACCOUNT_LINE.title ) %][% ACCOUNT_LINE.title |html %][% END %] [% IF ( ACCOUNT_LINE.amountcredit ) %][% ELSE %][% END %][% ACCOUNT_LINE.amount %] diff --git a/opac/opac-account.pl b/opac/opac-account.pl index 22d83b8392..673b70e0ec 100755 --- a/opac/opac-account.pl +++ b/opac/opac-account.pl @@ -24,7 +24,6 @@ use C4::Members; use C4::Circulation; use C4::Auth; use C4::Output; -use C4::Dates qw/format_date/; use warnings; my $query = new CGI; @@ -50,7 +49,6 @@ $template->param( BORROWER_INFO => \@bordat ); my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); for ( my $i = 0 ; $i < $numaccts ; $i++ ) { - $accts->[$i]{'date'} = format_date( $accts->[$i]{'date'} ); $accts->[$i]{'amount'} = sprintf( "%.2f", $accts->[$i]{'amount'} || '0.00'); if ( $accts->[$i]{'amount'} >= 0 ) { $accts->[$i]{'amountcredit'} = 1; -- 2.39.5