[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-bugs] [Bug 1459] checking out a book dies
From: |
bugzilla-daemon |
Subject: |
[Koha-bugs] [Bug 1459] checking out a book dies |
Date: |
Mon, 8 Oct 2007 08:39:41 -0700 (PDT) |
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1459
------- Comment #4 from address@hidden 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.
- [Koha-bugs] [Bug 1459] checking out a book dies, bugzilla-daemon, 2007/10/05
- [Koha-bugs] [Bug 1459] checking out a book dies, bugzilla-daemon, 2007/10/05
- [Koha-bugs] [Bug 1459] checking out a book dies, bugzilla-daemon, 2007/10/05
- [Koha-bugs] [Bug 1459] checking out a book dies, bugzilla-daemon, 2007/10/06
- [Koha-bugs] [Bug 1459] checking out a book dies,
bugzilla-daemon <=
- [Koha-bugs] [Bug 1459] checking out a book dies, bugzilla-daemon, 2007/10/11
- [Koha-bugs] [Bug 1459] checking out a book dies, bugzilla-daemon, 2007/10/11