From 3033e2ff7edc67d27d5b5ea87ca3274b916a1267 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Fri, 5 Oct 2007 04:39:38 -0500 Subject: [PATCH] #1459 yadc : Yet Another Date::Calc problem... if dateexpiry is empty, set issuingimpossible without any calculation Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Circulation.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 71a9dc12f5..6917110f25 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -681,15 +681,15 @@ sub CanBookBeIssued { if ( $borrower->{flags}->{'DBARRED'} ) { $issuingimpossible{DEBARRED} = 1; } - if ( Date_to_Days(Today) > - Date_to_Days( split "-", $borrower->{'dateexpiry'} ) ) - { - - # - #if (&Date_Cmp(&ParseDate($borrower->{expiry}),&ParseDate("today"))<0) { + if ( $borrower->{'dateexpiry'} eq '0000-00-00') { $issuingimpossible{EXPIRED} = 1; + } else { + if ( Date_to_Days(Today) > + Date_to_Days( split "-", $borrower->{'dateexpiry'} ) ) + { + $issuingimpossible{EXPIRED} = 1; + } } - # # BORROWER STATUS # -- 2.39.5