Bug 23822: Fix deletion of patrons with credit

There are bugs in both master and 19.05, but different.

Anyway we should have this check to make sure a negative value will have
the same behavior: trigger the confirmation message (instead of a blank
page).

If we want to reject the deletion of a patron with credit we should
handle it on a separate bug report (behavior change)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-11-11 12:35:30 +01:00 committed by Martin Renvoize
parent 17d2211446
commit d23e50f0b2
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $charges or $is_guarantor )
$template->param(ItemsOnHold => $countholds);
}
# This is silly written but reflect the same conditions as above
if ( not $countissues > 0 and not $charges and not $is_guarantor ) {
if ( not $countissues > 0 and not $charges > 0 and not $is_guarantor ) {
$template->param(
op => 'delete_confirm',
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }),