#!/usr/bin/perl
-# $Id$
#writen 2/1/00 by chris@katipo.oc.nz
# Copyright 2000-2002 Katipo Communications
$maxreserves = 1;
}
- # we check the date expiricy of the borrower
- my $warning = (Date_to_Days(split /-/,$date) > Date_to_Days( split /-/,$borrowerinfo->{'dateexpiry'}));
-
- if ( $warning > 0 ) {
+ # we check the date expiricy of the borrower (only if there is an expiry date, otherwise, set to 1 (warn)
+ if ($borrowerinfo->{'dateexpiry'} ne '0000-00-00') {
+ my $warning = (Date_to_Days(split /-/,$date) > Date_to_Days( split /-/,$borrowerinfo->{'dateexpiry'}));
+ if ( $warning > 0 ) {
+ $expiry = 1;
+ }
+ } else {
$expiry = 1;
}
+
# check if the borrower make the reserv in a different branch
if ( $borrowerinfo->{'branchcode'} ne C4::Context->userenv->{'branch'} ) {
}
$template->param(
- borrowernumber => $borrowerinfo->{'borrowernumber'},
- borrowersurname => $borrowerinfo->{'surname'},
- borrowerfirstname => $borrowerinfo->{'firstname'},
- borrowerreservs => $count_reserv,
- maxreserves => $maxreserves,
- expiry => $expiry,
- diffbranch => $diffbranch
+ borrowernumber => $borrowerinfo->{'borrowernumber'},
+ borrowersurname => $borrowerinfo->{'surname'},
+ borrowerfirstname => $borrowerinfo->{'firstname'},
+ borrowerstreetaddress => $borrowerinfo->{'address'},
+ borrowercity => $borrowerinfo->{'city'},
+ borrowerphone => $borrowerinfo->{'phone'},
+ borrowermobile => $borrowerinfo->{'mobile'},
+ borrowerfax => $borrowerinfo->{'fax'},
+ borrowerphonepro => $borrowerinfo->{'phonepro'},
+ borroweremail => $borrowerinfo->{'email'},
+ borroweremailpro => $borrowerinfo->{'emailpro'},
+ borrowercategory => $borrowerinfo->{'category'},
+ borrowerreservs => $count_reserv,
+ maxreserves => $maxreserves,
+ expiry => $expiry,
+ diffbranch => $diffbranch
);
}
push( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} }, $itemnumber );
}
-@branchcodes = uniq @branchcodes;
+# @branchcodes = uniq @branchcodes;
my @biblioitemnumbers = keys %itemnumbers_of_biblioitem;