my $branchloop = GetBranchesLoop(C4::Context->userenv->{branch});
foreach (@$branchloop) {
- my $date = lastseenat( $itm, $_->{value} );
- my ($datechunk, $timechunk) = slashdate($date);
$_->{issues} = issuesat($itm, $_->{value});
- $_->{seen} = $datechunk;
- $_->{seentime} = $timechunk;
+ $_->{seen} = lastseenat( $itm, $_->{value} ) || undef;
}
$template->param(
my $date = ( $date1 lt $date2 ) ? $date2 : $date1 ;
return ($date);
}
-
-#####################################################
-# return date and time from timestamp
-sub slashdate {
- my ($date) = @_;
- $date or return;
- return (
- output_pref({ dt => dt_from_string( $date ), dateonly => 1 }),
- substr($date,11,5)
- );
-}
<td>[% branchloo.branchname %]</td>
<td>[% branchloo.issues %]</td>
<td>[% IF ( branchloo.seen ) %]
- [% branchloo.seen %] [% branchloo.seentime %]
+ [% branchloo.seen | $KohaDates with_hours => 1 %]
[% ELSE %]
<span>Never</span>
[% END %]