From 261199c3e2d689accc9113e95a73d2dea56beae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Wed, 23 Sep 2015 10:19:42 +0200 Subject: [PATCH] Bug 14890 - Remove C4::Dates from circ/bookcount.pl This patch removes deprecated C4::Dates from circ/bookcount.pl To test: - Search for biblio with an item that has been checked out several times and that has been transferred - In left navigation click on 'Items' - In list of items click on 'View item's checkout history' - Verify that dates in 'Date arrived at current library' and in column 'Last seen' display properly. --- circ/bookcount.pl | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/circ/bookcount.pl b/circ/bookcount.pl index 6869c39..610fd5e 100755 --- a/circ/bookcount.pl +++ b/circ/bookcount.pl @@ -31,7 +31,7 @@ use C4::Koha; use C4::Auth; use C4::Branch; # GetBranches use C4::Biblio; # GetBiblioItemData -use C4::Dates qw/format_date/; +use Koha::DateUtils; my $input = new CGI; my $itm = $input->param('itm'); @@ -86,7 +86,7 @@ $template->param( biblioitemnumber => $bi, homebranch => $homebranch, holdingbranch => $holdingbranch, - lastdate => $lastdate ? format_date($lastdate) : 0, + lastdate => $lastdate ? $lastdate : 0, count => $count, branchloop => $branchloop, ); @@ -177,7 +177,7 @@ sub slashdate { my ($date) = @_; $date or return; return ( - format_date($date), + output_pref({ dt => dt_from_string( $date ), dateonly => 1 }), substr($date,11,5) ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt index 725ca4b..e83955f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Circulation statistics for [% title |html %] [% INCLUDE 'doc-head-close.inc' %] @@ -28,7 +29,7 @@ $(document).ready(function(){ [% homebranch %] [% holdingbranch %] - [% IF ( lastdate ) %][% lastdate %][% ELSE %]Item has no transfer record[% END %] + [% IF ( lastdate ) %][% lastdate | $KohaDates %][% ELSE %]Item has no transfer record[% END %] [% count %] -- 1.7.10.4