From 69d491bd1d5f28eb348ba83ccdd69f1f82e9b8d8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 1 Aug 2022 15:43:51 +0200 Subject: [PATCH] Bug 29983: Format dates in templates using KohaDates (and display the time part) The time part is displayed on the checkout list Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- circ/overdue.pl | 7 +------ koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index 9e96c4c013..69750c6bcd 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -311,11 +311,6 @@ if ($noreport) { my $pattrs = $borrowernumber_to_attributes{$data->{borrowernumber}} || {}; # patron attrs for this borrower # $pattrs is a hash { attrcode => [ [value,displayvalue], [value,displayvalue]... ] } - my $return_claim_created_on = $data->{return_claim_created_on}; - if ( defined $return_claim_created_on ) { - $return_claim_created_on = output_pref({ dt => dt_from_string($return_claim_created_on ) }); - } - my @patron_attr_value_loop; # template array [ {value=>v1}, {value=>v2} ... } ] for my $pattr_filter (grep { ! $_->{isclone} } @patron_attr_filter_loop) { my @displayvalues = map { $_->[1] } @{ $pattrs->{$pattr_filter->{code}} }; # grab second value from each subarray @@ -355,7 +350,7 @@ if ($noreport) { itemcallnumber => $data->{itemcallnumber}, replacementprice => $data->{replacementprice}, itemnotes_nonpublic => $data->{itemnotes_nonpublic}, - return_claim_created_on => $return_claim_created_on, + return_claim_created_on => $data->{return_claim_created_on}, return_claim_id => $data->{return_claim_id}, enumchron => $data->{enumchron}, itemtype => $data->{itype}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 3926f80d0b..04b43cd210 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -122,7 +122,7 @@ [% overdueloo.itemnotes_nonpublic | html %] [% IF ( overdueloo.return_claim_created_on ) %] - [% overdueloo.return_claim_created_on | html %] + [% overdueloo.return_claim_created_on | $KohaDates with_hours => 1 %] [% ELSIF Koha.Preference('ClaimReturnedLostValue') %] Claim returned -- 2.39.5