@@ -, +, @@ --- circ/circulation.pl | 7 ++++++- .../intranet-tmpl/prog/en/includes/patron_messages.inc | 2 +- members/moremember.pl | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -45,7 +45,7 @@ use Koha::AuthorisedValues; use Koha::CsvProfiles; use Koha::Patrons; use Koha::Patron::Debarments qw( GetDebarments ); -use Koha::DateUtils qw( dt_from_string ); +use Koha::DateUtils qw( dt_from_string format_sqldatetime ); use Koha::Patron::Restriction::Types; use Koha::Plugins; use Koha::Database; @@ -265,10 +265,15 @@ if ($patron) { finetotal => $balance, ); + my $debarrment = @{ GetDebarments( { borrowernumber => $borrowernumber } ) }[0] || undef; + my $dateformatted = format_sqldatetime( $debarrment->{created} ) if $debarrment; + my $debarrmentdate = substr($dateformatted, 0, 10) if $debarrment; + if ( $patron and $patron->is_debarred ) { $template->param( 'userdebarred' => $patron->debarred, 'debarredcomment' => $patron->debarredcomment, + 'debarredsince' => $debarrmentdate ); if ( $patron->debarred ne "9999-12-31" ) { --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc @@ -58,7 +58,7 @@ [% IF ( userdebarred ) %]