[Bug 1459] checking out a book dies
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1459 ------- Comment #4 from henridamien@koha-fr.org 2007-10-08 08:39 ------- I bet : 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; + } is not enough. For instance, if $borrower->{'dateexpiry'} is NULL, you will be lost. I suggest : my @expirydate=split /-/, $borrower->{'dateexpiry'}; if(($expirydate[0]>0 && $expirydate[1]>0&& $expirydate[2]>0) && Date_to_Days(Today) > Date_to_Days( split "-", @expirydate ) ){ $issuingimpossible{EXPIRED} = 1; } This would imply that having NO dateexpiry would mean being member forever. Other possibility : if(($expirydate[0]==0 || $expirydate[1]==0|| $expirydate[2]==0) || Date_to_Days(Today) > Date_to_Days( split "-", @expirydate ) ){ $issuingimpossible{EXPIRED} = 1; } This would be more restrictive. ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
participants (1)
-
bugzilla-daemon@pippin.metavore.com