View | Details | Raw Unified | Return to bug 21832
Collapse All | Expand All

(-)a/C4/ILSDI/Services.pm (-1 / +9 lines)
Lines 32-37 use XML::Simple; Link Here
32
use HTML::Entities;
32
use HTML::Entities;
33
use CGI qw ( -utf8 );
33
use CGI qw ( -utf8 );
34
use DateTime;
34
use DateTime;
35
use Date::Calc qw/Today Date_to_Days/;
35
use C4::Auth;
36
use C4::Auth;
36
use C4::Members::Attributes qw(GetBorrowerAttributes);
37
use C4::Members::Attributes qw(GetBorrowerAttributes);
37
use Koha::DateUtils;
38
use Koha::DateUtils;
Lines 480-485 sub GetPatronInfo { Link Here
480
        $borrower->{'attributes'} = $attrs;
481
        $borrower->{'attributes'} = $attrs;
481
    }
482
    }
482
483
484
    # Add is expired information
485
    $borrower->{'is_expired'} = 0;
486
    $borrower->{'is_expired'} = 1 if
487
      defined($borrower->{dateexpiry}) &&
488
      $borrower->{'dateexpiry'} ne '0000-00-00' &&
489
      Date_to_Days( Today() ) >
490
      Date_to_Days( split /-/, $borrower->{'dateexpiry'} );
491
483
    return $borrower;
492
    return $borrower;
484
}
493
}
485
494
486
- 

Return to bug 21832