https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14250

--- Comment #4 from Jonathan Druart <[email protected]> ---
I have not tested but this fix should be as simple as:

diff --git a/Koha/Patron/Discharge.pm b/Koha/Patron/Discharge.pm
index 76e04e8533a..b9ebc7653af 100644
--- a/Koha/Patron/Discharge.pm
+++ b/Koha/Patron/Discharge.pm
@@ -39,7 +39,12 @@ sub can_be_discharged {
     return unless $patron;

     my $has_pending_checkouts = $patron->checkouts->count;
-    return $has_pending_checkouts ? 0 : 1;
+    return 0 if $has_pending_checkouts;
+
+    my $has_debt = $patron->account->outstanding_debits->total_outstanding
+    return 0 if $has_debt;
+
+    return 1;
 }

 sub is_discharged {

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to