Lines 90-101
if (!$borrowernumber) {
Link Here
|
90 |
|
90 |
|
91 |
# get borrower information .... |
91 |
# get borrower information .... |
92 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
92 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
93 |
my $borr = $patron->unblessed; |
93 |
my $borr = $patron ? $patron->unblessed : {}; |
94 |
|
94 |
|
95 |
my ( $today_year, $today_month, $today_day) = Today(); |
95 |
my ( $today_year, $today_month, $today_day) = Today(); |
96 |
my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'}; |
96 |
my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'}; |
97 |
|
97 |
|
98 |
my $debar = Koha::Patrons->find( $borrowernumber )->is_debarred; |
98 |
my $debar = $patron ? $patron->is_debarred : undef; |
99 |
my $userdebarred; |
99 |
my $userdebarred; |
100 |
|
100 |
|
101 |
if ($debar) { |
101 |
if ($debar) { |
Lines 118-124
if ( $userdebarred || $borr->{'gonenoaddress'} || $borr->{'lost'} ) {
Link Here
|
118 |
$canrenew = 0; |
118 |
$canrenew = 0; |
119 |
} |
119 |
} |
120 |
|
120 |
|
121 |
my $amountoutstanding = $patron->account->balance; |
121 |
my $amountoutstanding = $patron ? $patron->account->balance : 0; |
122 |
if ( $amountoutstanding > 5 ) { |
122 |
if ( $amountoutstanding > 5 ) { |
123 |
$borr->{'amountoverfive'} = 1; |
123 |
$borr->{'amountoverfive'} = 1; |
124 |
} |
124 |
} |
125 |
- |
|
|