#1459 yadc : Yet Another Date::Calc problem...

if dateexpiry is empty, set issuingimpossible without any calculation

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Paul POULAIN 2007-10-05 04:39:38 -05:00 committed by Joshua Ferraro
parent f2031566bb
commit 3033e2ff7e

View file

@ -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
#