Skip to content

Commit

Permalink
bug 2502: correctly check patron account expiration
Browse files Browse the repository at this point in the history
When placing a hold request from the staff interface,
now correctly indicate if the patron account has expired.
Prior to this patch, would warn that the account
had expired even when the expiry date is in the future,
and vice versa.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
  • Loading branch information
Galen Charlton committed Aug 18, 2008
1 parent 26469d8 commit 2450444
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions reserve/request.pl
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ =head1 request.pl
}

# we check the date expiry of the borrower (only if there is an expiry date, otherwise, set to 1 (warn)
my $expiry = $borrowerinfo->{dateexpiry};
unless ($expiry and $expiry ne '0000-00-00' and
Date_to_Days(split /-/,$date) > Date_to_Days(split /-/,$expiry)) {
my $expiry_date = $borrowerinfo->{dateexpiry};
my $expiry = 0; # flag set if patron account has expired
if ($expiry_date and $expiry_date ne '0000-00-00' and
Date_to_Days(split /-/,$date) > Date_to_Days(split /-/,$expiry_date)) {
$messages = $expiry = 1;
}

Expand Down

0 comments on commit 2450444

Please sign in to comment.