[Koha-cvs] koha/circ circulation.pl [dev_week]
Cindy Murdock
cmurdock at ccfls.org
Thu Apr 19 22:44:33 CEST 2007
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Cindy Murdock <clm> 07/04/19 20:44:33
Modified files:
circ : circulation.pl
Log message:
added an error check for faulty expiry dates like 0000-00-00
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/circ/circulation.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.81.2.14.2.16&r2=1.81.2.14.2.17
Patches:
Index: circulation.pl
===================================================================
RCS file: /sources/koha/koha/circ/circulation.pl,v
retrieving revision 1.81.2.14.2.16
retrieving revision 1.81.2.14.2.17
diff -u -b -r1.81.2.14.2.16 -r1.81.2.14.2.17
--- circulation.pl 16 Apr 2007 02:40:52 -0000 1.81.2.14.2.16
+++ circulation.pl 19 Apr 2007 20:44:32 -0000 1.81.2.14.2.17
@@ -138,8 +138,8 @@
# Renew day is calculated by adding the enrolment period to today
my ($renew_year,$renew_month,$renew_day) = Add_Delta_YM($today_year,$today_month,$today_day, $borrower->{'enrolmentperiod'},0);
- # if the expiry date is before today
- if (Date_to_Days($today_year,$today_month,$today_day) > Date_to_Days($warning_year,$warning_month,$warning_day)) {
+ # if the expiry date is before today or if it is invalid
+ if ( ($borrower->{'expiry'} eq 'NULL') || ($borrower->{'expiry'} eq '0000-00-00') || ($borrower->{'expiry'} eq '') || (Date_to_Days($today_year,$today_month,$today_day) > Date_to_Days($warning_year,$warning_month,$warning_day)) ) {
#borrowercard expired or nearly expired, warn the librarian
$template->param( flagged=>"1",
More information about the Koha-cvs
mailing list