From 28ff1ea38580e6c8ea4a758710791d1fda0a40c2 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 10 Jan 2014 13:07:10 -0500 Subject: [PATCH] Bug 11182 [1] - Warnings in circulation TEST PLAN --------- 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' 10) Check the error logs, no new warnings 11) Click the 'Restrictions' tab 12) Click 'Add manual restriction' 13) Add a dummy restriction 14) Click the 'Restrictions' tab 15) Click 'Remove' 16) Click 'OK' 17) Confirm that no additional error log entries were added and adding/deleting restrictions hasn't broken. Signed-off-by: Jesse Weaver Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- circ/circulation.pl | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 7d214ea..b45b567 100755 --- a/circ/circulation.pl +++ b/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} ) ); } @@ -651,7 +651,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; @@ -749,7 +749,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, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc index cea3416..8d6ac33 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc +++ b/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 %] -- 1.8.3.2