@@ -, +, @@ /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X --- C4/ILSDI/Services.pm | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/C4/ILSDI/Services.pm +++ a/C4/ILSDI/Services.pm @@ -32,6 +32,7 @@ use XML::Simple; use HTML::Entities; use CGI qw ( -utf8 ); use DateTime; +use Date::Calc qw/Today Date_to_Days/; use C4::Auth; use C4::Members::Attributes qw(GetBorrowerAttributes); use Koha::DateUtils; @@ -480,6 +481,14 @@ sub GetPatronInfo { $borrower->{'attributes'} = $attrs; } + # Add is expired information + $borrower->{'is_expired'} = 0; + $borrower->{'is_expired'} = 1 if + defined($borrower->{dateexpiry}) && + $borrower->{'dateexpiry'} ne '0000-00-00' && + Date_to_Days( Today() ) > + Date_to_Days( split /-/, $borrower->{'dateexpiry'} ); + return $borrower; } --