[Koha-patches] [PATCH] [bug #2769][3.0.x] Bad account expiration message when a user isn't, and no message when it is
Nahuel Angelinetti
nahuel.angelinetti at biblibre.com
Mon Nov 10 11:02:13 CET 2008
When you try to hold a document for a non expired user, a warning tell you the account is expired, and when the account is expired there is no
message.
This patch do the inverse.
---
reserve/request.pl | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/reserve/request.pl b/reserve/request.pl
index eb41244..ef410b5 100755
--- a/reserve/request.pl
+++ b/reserve/request.pl
@@ -111,11 +111,13 @@ if ($cardnumber) {
# 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
+ if ($expiry and $expiry ne '0000-00-00' and
Date_to_Days(split /-/,$date) > Date_to_Days(split /-/,$expiry)) {
$messages = $expiry = 1;
+ }else{
+ $expiry = 0;
}
-
+
# check if the borrower make the reserv in a different branch
if ( $borrowerinfo->{'branchcode'} ne C4::Context->userenv->{'branch'} ) {
--
1.5.6.3
More information about the Koha-patches
mailing list