Lines 45-51
use Koha::AuthorisedValues;
Link Here
|
45 |
use Koha::CsvProfiles; |
45 |
use Koha::CsvProfiles; |
46 |
use Koha::Patrons; |
46 |
use Koha::Patrons; |
47 |
use Koha::Patron::Debarments qw( GetDebarments ); |
47 |
use Koha::Patron::Debarments qw( GetDebarments ); |
48 |
use Koha::DateUtils qw( dt_from_string ); |
48 |
use Koha::DateUtils qw( dt_from_string format_sqldatetime ); |
49 |
use Koha::Patron::Restriction::Types; |
49 |
use Koha::Patron::Restriction::Types; |
50 |
use Koha::Plugins; |
50 |
use Koha::Plugins; |
51 |
use Koha::Database; |
51 |
use Koha::Database; |
Lines 265-274
if ($patron) {
Link Here
|
265 |
finetotal => $balance, |
265 |
finetotal => $balance, |
266 |
); |
266 |
); |
267 |
|
267 |
|
|
|
268 |
my $debarrment = @{ GetDebarments( { borrowernumber => $borrowernumber } ) }[0] || undef; |
269 |
my $dateformatted = format_sqldatetime( $debarrment->{created} ) if $debarrment; |
270 |
my $debarrmentdate = substr($dateformatted, 0, 10) if $debarrment; |
271 |
|
268 |
if ( $patron and $patron->is_debarred ) { |
272 |
if ( $patron and $patron->is_debarred ) { |
269 |
$template->param( |
273 |
$template->param( |
270 |
'userdebarred' => $patron->debarred, |
274 |
'userdebarred' => $patron->debarred, |
271 |
'debarredcomment' => $patron->debarredcomment, |
275 |
'debarredcomment' => $patron->debarredcomment, |
|
|
276 |
'debarredsince' => $debarrmentdate |
272 |
); |
277 |
); |
273 |
|
278 |
|
274 |
if ( $patron->debarred ne "9999-12-31" ) { |
279 |
if ( $patron->debarred ne "9999-12-31" ) { |