@@ -, +, @@ --------- 1) Log into staff client 2) Click 'Circulation' 3) Click 'Check out' 4a) Type a patron name, click 'Submit' 4b) If necessary, select which one, and click 'Select' 5) Check the error logs, new warnings 6) Apply patch 7) Click 'Circulation' 8) Click 'Check out' 9a) Type a patron name, click 'Submit' 9b) If necessary, select which one, and click 'Select' and adding/deleting restrictions hasn't broken. --- circ/circulation.pl | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -270,7 +270,7 @@ if ($borrowernumber) { 'userdebarred' => $borrower->{debarred}, 'debarredcomment' => $borrower->{debarredcomment}, ); - if ( $borrower->{debarred} ne "9999-12-31" ) { + if ( $borrower->{debarred} && $borrower->{debarred} ne "9999-12-31" ) { $template->param( 'userdebarreddate' => C4::Dates::format_date( $borrower->{debarred} ) ); } @@ -650,7 +650,7 @@ $amountold =~ s/^.*\$//; # remove upto the $, if any my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); -if ( $borrower->{'category_type'} eq 'C') { +if ( $borrowernumber && $borrower->{'category_type'} eq 'C') { my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); my $cnt = scalar(@$catcodes); $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; @@ -748,7 +748,7 @@ $template->param( inprocess => $inprocess, memberofinstution => $member_of_institution, CGIorganisations => $CGIorganisations, - is_child => ($borrower->{'category_type'} eq 'C'), + is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), circview => 1, soundon => C4::Context->preference("SoundOn"), fast_cataloging => $fast_cataloging, --- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc @@ -22,7 +22,7 @@
- [% IF ( debarments.size < 1 ) %] + [% IF ( not debarments.defined || debarments.size < 1 ) %]

Patron is currently unrestricted.

[% ELSE %] --